From bcb67cd77b89a03fe1848f740e0bdf0c80ccc01f Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 3 Mar 2025 13:38:43 +0500 Subject: [PATCH] TessellateElements - small optimization tolist() supports conversion of multidimensional arrays too --- src/ifcpatch/ifcpatch/recipes/TessellateElements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcpatch/ifcpatch/recipes/TessellateElements.py b/src/ifcpatch/ifcpatch/recipes/TessellateElements.py index 5becec4264..8a264967d7 100644 --- a/src/ifcpatch/ifcpatch/recipes/TessellateElements.py +++ b/src/ifcpatch/ifcpatch/recipes/TessellateElements.py @@ -89,7 +89,7 @@ class Patcher: shape: Union[ifcopenshell.geom.ShapeType, ifcopenshell.geom.ShapeElementType], ) -> None: 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()] replacements[element] = (v, f)