Skip failed to load IfcSweptDiskSolid shapes

Noticed in the file attached in #5474 (note that it's not the issue that's causing the segfault), it was failing due IFCSWEPTDISKSOLID's IFCINDEXEDPOLYCURVE having just 1 point, resulting in something like '[Error] [ 14:07:00]  No segment successfully converted: 80=IfcIndexedPolyCurve(79,$)'.

Not sure if this kind of polyline is considered valid in IFC but it doesn't trigger any validation errors, so I guess it shouldn't stop IFC project from loading in BBIM.
This commit is contained in:
Andrej730
2024-09-27 14:09:45 +05:00
parent cfa2dc5d97
commit 14cea7453b
+2
View File
@@ -1112,6 +1112,8 @@ class IfcImporter:
matrix[2][3] *= self.unit_scale
# TODO: support inner radius, start param, and end param
geometry = tool.Loader.create_generic_shape(item.Directrix)
if not geometry:
continue
e = geometry.edges
v = geometry.verts
vertices = [list(matrix @ [v[i], v[i + 1], v[i + 2], 1]) for i in range(0, len(v), 3)]