mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fix bug in tessellate elements
This commit is contained in:
@@ -92,7 +92,7 @@ class Patcher:
|
||||
) -> None:
|
||||
geometry = getattr(shape, "geometry", shape)
|
||||
v = [[x.tolist() for x in ifcopenshell.util.shape.get_vertices(geometry)]]
|
||||
f = [ifcopenshell.util.shape.get_faces(geometry)]
|
||||
f = [ifcopenshell.util.shape.get_faces(geometry).tolist()]
|
||||
replacements[element] = (v, f)
|
||||
|
||||
iterator = ifcopenshell.geom.iterator(settings, self.file, multiprocessing.cpu_count(), include=products)
|
||||
@@ -112,6 +112,8 @@ class Patcher:
|
||||
# Do the replacements outside the iterator to prevent messing up iterator state.
|
||||
for element, geometry in replacements.items():
|
||||
v, f = geometry
|
||||
if not v or not f:
|
||||
continue
|
||||
mesh = ifcopenshell.api.run(
|
||||
"geometry.add_mesh_representation",
|
||||
self.file,
|
||||
|
||||
Reference in New Issue
Block a user