Fix issue with creating walls from slabs in IFC2X3 files. Related to #6963

This commit is contained in:
Bruno Perdigão
2025-08-19 23:08:43 -03:00
parent 915c38947d
commit cb551e1248
+2 -1
View File
@@ -891,7 +891,8 @@ class DumbWallGenerator:
elevation = self.container_obj.location.z
representation = ifcopenshell.util.representation.get_representation(slab, "Model", "Body", "MODEL_VIEW")
extrusion = tool.Model.get_extrusion(representation)
polyline_points = extrusion.SweptArea.OuterCurve.Points.CoordList
builder = ifcopenshell.util.shape_builder.ShapeBuilder(tool.Ifc.get())
polyline_points = builder.get_polyline_coords(extrusion.SweptArea.OuterCurve)
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]
if not tool.Cad.is_counter_clockwise_order(polyline_points[0], polyline_points[1], polyline_points[2]):