From 5fab630a8bdf9b0f04c416d7431d50d8c79f54ca Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 24 Jul 2024 17:30:23 +0500 Subject: [PATCH] Fix #5052 #4832 --- src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py b/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py index 93ea874b34..b8664de93e 100644 --- a/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py +++ b/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py @@ -222,7 +222,7 @@ class Patcher: e = np.array(shape.geometry.edges).tobytes() f = np.array(shape.geometry.faces).tobytes() mids = np.array(shape.geometry.material_ids).tobytes() - m = json.dumps([int(m.name.split("-")[2]) for m in shape.geometry.materials]) + m = json.dumps([m.instance_id() for m in shape.geometry.materials]) self.geometry_rows[shape.geometry.id] = [shape.geometry.id, v, e, f, mids, m] m = ifcopenshell.util.shape.get_shape_matrix(shape) m[0][3] /= self.unit_scale