mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user