What is ifcopenshell.api.run ... "edit_object_placement" useful for?
a minimalisic spatial structure is added to a ifcfile as follows ... from https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/blenderbim/scripts/obj2ifc.py#L116-L127
site = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcSite", name="My Site")
building = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcBuilding", name="My Building")
self.storey = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcBuildingStorey", name="My Storey" )
ifcopenshell.api.run("aggregate.assign_object", self.file, product=site, relating_object=project)
ifcopenshell.api.run("aggregate.assign_object", self.file, product=building, relating_object=site)
ifcopenshell.api.run("aggregate.assign_object", self.file, product=self.storey, relating_object=building)
ifcopenshell.api.run("geometry.edit_object_placement", self.file, product=site)
ifcopenshell.api.run("geometry.edit_object_placement", self.file, product=building)
ifcopenshell.api.run("geometry.edit_object_placement", self.file, product=self.storey)
What does the lines ifcopenshell.api.run("geometry.edit_object_placement", self.file, product=site)
exactly do?
Comments
I think it allows for a transformation of an object?
In this code snippet it's used to make an array of beams
But why is it needed for Spatial structure objects without representation?
@bernd just because they do not have a representation doesn't mean that it shouldn't have a placement. For example, the placement of a building storey uses its Z ordinate to specify the elevation. Similarly, a placement at the building or site level makes it easy to shift the entire building / site relative to it.