From e45cc1d3c6ef2a1eac66e39e6674241ebe366d5a Mon Sep 17 00:00:00 2001 From: kazu Date: Thu, 26 Jul 2018 08:43:46 +0200 Subject: [PATCH] fixed order issue --- floorplan/3D/WallsViaCuttedQuads.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/floorplan/3D/WallsViaCuttedQuads.h b/floorplan/3D/WallsViaCuttedQuads.h index a8e119d..4157366 100644 --- a/floorplan/3D/WallsViaCuttedQuads.h +++ b/floorplan/3D/WallsViaCuttedQuads.h @@ -265,8 +265,13 @@ namespace Floorplan3D { for (const Floorplan::FloorObstacleWallDoor* door : doors) { - const Point2 pds = door->getStart(wall.line); - const Point2 pde = door->getEnd(wall.line); + Point2 pds = door->getStart(wall.line); + Point2 pde = door->getEnd(wall.line); + + // inverted door, swap start and end for correct triangle order + if (door->leftRight) { + std::swap(pds, pde); + } const Point3 dp1(pds.x, pds.y, z1); const Point3 dp2(pde.x, pde.y, z1);