Fix issue editing object placement that shares it's axis placement with other placements

If multiple object placements were reusing the same IfcAxis2Placement then editing one of them would remove IfcAxis2Placement ignoring it's inverse references making all other object placements invalid.
This commit is contained in:
Andrej730
2024-02-16 17:44:22 +05:00
parent 16eba637f1
commit 3a9c023d33
2 changed files with 34 additions and 1 deletions
@@ -56,7 +56,7 @@ class Usecase:
if self.file.get_total_inverses(old_placement) == 1:
self.settings["product"].ObjectPlacement = None
old_placement.PlacementRelTo = None
ifcopenshell.util.element.remove_deep(self.file, old_placement)
ifcopenshell.util.element.remove_deep2(self.file, old_placement)
new_placement.PlacementRelTo = placement_rel_to
self.settings["product"].ObjectPlacement = new_placement