mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
Change AddSlabFromWalls to consistently create walls in a counterclockwise direction.
This guarantees that the external face of the walls aligns with the edges of the slab.
This commit is contained in:
@@ -618,6 +618,8 @@ class DumbWallGenerator:
|
|||||||
polyline_points = extrusion.SweptArea.OuterCurve.Points.CoordList
|
polyline_points = extrusion.SweptArea.OuterCurve.Points.CoordList
|
||||||
polyline_points = [[(v * self.unit_scale) for v in p] for p in polyline_points]
|
polyline_points = [[(v * self.unit_scale) for v in p] for p in polyline_points]
|
||||||
polyline_points = [slab_obj.matrix_world @ Vector((p[0], p[1], elevation)) for p in polyline_points]
|
polyline_points = [slab_obj.matrix_world @ Vector((p[0], p[1], elevation)) for p in polyline_points]
|
||||||
|
if not tool.Cad.is_counter_clockwise_order(polyline_points[0], polyline_points[1], polyline_points[2]):
|
||||||
|
polyline_points = polyline_points[::-1]
|
||||||
is_polyline_closed = True
|
is_polyline_closed = True
|
||||||
walls = []
|
walls = []
|
||||||
for i in range(len(polyline_points) - 1):
|
for i in range(len(polyline_points) - 1):
|
||||||
|
|||||||
Reference in New Issue
Block a user