Skip to content

Commit

Permalink
Merge projects now merges all entities, not just rooted ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
Moult committed Sep 19, 2022
1 parent d751ee9 commit 3f2d862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ifcpatch/ifcpatch/recipes/MergeProject.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def patch(self):
source = ifcopenshell.open(self.args[0])
original_project = self.file.by_type("IfcProject")[0]
merged_project = self.file.add(source.by_type("IfcProject")[0])
for element in source.by_type("IfcRoot"):
for element in source:
self.file.add(element)
for inverse in self.file.get_inverse(merged_project):
ifcopenshell.util.element.replace_attribute(inverse, merged_project, original_project)
Expand Down

0 comments on commit 3f2d862

Please sign in to comment.