Fix bug where during import sometimes aggregation collections don't match object names

This commit is contained in:
Dion Moult
2021-10-29 17:39:59 +11:00
parent 0aa8a19b6d
commit 1141fd5784
+3 -1
View File
@@ -1214,7 +1214,9 @@ class IfcImporter:
return self.collections[element.GlobalId].objects.link(obj)
elif getattr(element, "Decomposes", None):
aggregate = ifcopenshell.util.element.get_aggregate(element)
return self.collections[aggregate.GlobalId].objects.link(obj)
collection = self.collections[aggregate.GlobalId]
collection.name = obj.name
return collection.objects.link(obj)
else:
return self.place_object_in_spatial_decomposition_collection(element, obj)