Accommodate invalid missing mapped representations and items coming from Tekla (2023)

This commit is contained in:
Dion Moult
2025-05-13 13:09:32 +10:00
parent f6fc0cfa0f
commit 7c38705958
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -428,7 +428,7 @@ class IfcImporter:
rep = representation
while True:
if len(rep.Items) == 1 and rep.Items[0].is_a("IfcMappedItem"):
if rep.Items and len(rep.Items) == 1 and rep.Items[0].is_a("IfcMappedItem"):
rep_matrix = ifcopenshell.util.placement.get_mappeditem_transformation(rep.Items[0])
if not np.allclose(rep_matrix, np.eye(4)):
matrix = rep_matrix @ matrix