Fix #1388. Extract elements IfcPatch recipe now retains aggregation relationships.

This commit is contained in:
Dion Moult
2021-03-16 21:48:17 +11:00
parent 98938acb26
commit 071505038d
@@ -30,6 +30,9 @@ class Patcher:
new_spatial_element = self.new.add(spatial_element)
self.contained_ins.setdefault(spatial_element.GlobalId, set()).add(new_element)
self.add_spatial_tree(spatial_element, new_spatial_element)
for rel in element.Decomposes:
self.new.add(rel.RelatingObject)
self.aggregates.setdefault(rel.RelatingObject.GlobalId, set()).add(new_element)
for opening in element.HasOpenings:
self.new.add(opening)
self.new.add(opening.RelatedOpeningElement)