ShapeBuilder.polyline - skip creating segments if they are not needed

This commit is contained in:
Andrej730
2023-07-05 13:02:05 +05:00
parent 1533283822
commit 9fbcb3900f
3 changed files with 214 additions and 208 deletions
File diff suppressed because it is too large Load Diff
@@ -258,11 +258,7 @@ class FilledOpeningGenerator:
unioned_boundaries = shapely.union_all(shapely.GeometryCollection(boundary_lines))
closed_polygons = shapely.polygonize(boundary_lines)
polygon = max(closed_polygons.geoms, key=lambda polygon: polygon.area)
if tool.Ifc.get_schema() == "IFC2X3":
return shape_builder.polyline(list(polygon.exterior.coords))
points = tool.Ifc.get().createIfcCartesianPointList2D(list(polygon.exterior.coords))
return tool.Ifc.get().createIfcIndexedPolyCurve(points)
return shape_builder.polyline(list(polygon.exterior.coords))
extrusion = shape_builder.extrude(
get_curve_2d_from_3d(profile),