mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Fix bug where during import sometimes aggregation collections don't match object names
This commit is contained in:
@@ -1214,7 +1214,9 @@ class IfcImporter:
|
|||||||
return self.collections[element.GlobalId].objects.link(obj)
|
return self.collections[element.GlobalId].objects.link(obj)
|
||||||
elif getattr(element, "Decomposes", None):
|
elif getattr(element, "Decomposes", None):
|
||||||
aggregate = ifcopenshell.util.element.get_aggregate(element)
|
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:
|
else:
|
||||||
return self.place_object_in_spatial_decomposition_collection(element, obj)
|
return self.place_object_in_spatial_decomposition_collection(element, obj)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user