From 071505038d0efec0cdc2153d7b39547f8dec770c Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 16 Mar 2021 21:48:17 +1100 Subject: [PATCH] Fix #1388. Extract elements IfcPatch recipe now retains aggregation relationships. --- src/ifcpatch/ifcpatch/recipes/ExtractElements.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ifcpatch/ifcpatch/recipes/ExtractElements.py b/src/ifcpatch/ifcpatch/recipes/ExtractElements.py index 39ae274fba..63208ec903 100644 --- a/src/ifcpatch/ifcpatch/recipes/ExtractElements.py +++ b/src/ifcpatch/ifcpatch/recipes/ExtractElements.py @@ -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)