mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Fix bug where assigning a spatial container didn't update the object placement tree
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
import ifcopenshell.api
|
import ifcopenshell.api
|
||||||
|
import ifcopenshell.util.placement
|
||||||
|
|
||||||
|
|
||||||
class Usecase:
|
class Usecase:
|
||||||
@@ -43,3 +44,11 @@ class Usecase:
|
|||||||
"RelatingStructure": self.settings["relating_structure"],
|
"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),
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user