mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 10:23:41 +00:00
TessellateElements - small optimization
tolist() supports conversion of multidimensional arrays too
This commit is contained in:
@@ -89,7 +89,7 @@ class Patcher:
|
|||||||
shape: Union[ifcopenshell.geom.ShapeType, ifcopenshell.geom.ShapeElementType],
|
shape: Union[ifcopenshell.geom.ShapeType, ifcopenshell.geom.ShapeElementType],
|
||||||
) -> None:
|
) -> None:
|
||||||
geometry = getattr(shape, "geometry", shape)
|
geometry = getattr(shape, "geometry", shape)
|
||||||
v = [[x.tolist() for x in ifcopenshell.util.shape.get_vertices(geometry)]]
|
v = [ifcopenshell.util.shape.get_vertices(geometry).tolist()]
|
||||||
f = [ifcopenshell.util.shape.get_faces(geometry).tolist()]
|
f = [ifcopenshell.util.shape.get_faces(geometry).tolist()]
|
||||||
replacements[element] = (v, f)
|
replacements[element] = (v, f)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user