Fix bug where assigning a spatial container didn't update the object placement tree

This commit is contained in:
Dion Moult
2021-04-04 09:02:14 +10:00
parent 7b5aae9487
commit ec62d8fbb9
@@ -1,5 +1,6 @@
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.placement
class Usecase:
@@ -43,3 +44,11 @@ class Usecase:
"RelatingStructure": self.settings["relating_structure"],
}
)
if getattr(self.settings["product"], "ObjectPlacement", None):
ifcopenshell.api.run(
"geometry.edit_object_placement",
self.file,
product=self.settings["product"],
matrix=ifcopenshell.util.placement.get_local_placement(self.settings["product"].ObjectPlacement),
)