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 a82b0f30b0
commit a2ff63f9ec
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