aggregate.assign_object - support batching #4474

This commit is contained in:
Andrej730
2024-04-08 16:23:48 +05:00
parent d764c0af23
commit cd11d2de27
34 changed files with 187 additions and 143 deletions
@@ -45,12 +45,12 @@ class Usecase:
storey3 = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcBuildingStorey")
# The project contains a site (note that project aggregation is a special case in IFC)
ifcopenshell.api.run("aggregate.assign_object", model, product=site, relating_object=project)
ifcopenshell.api.run("aggregate.assign_object", model, products=[site], relating_object=project)
# The site has a building, the building has a storey, and the storey has a space
ifcopenshell.api.run("aggregate.assign_object", model, product=building, relating_object=site)
ifcopenshell.api.run("aggregate.assign_object", model, product=storey, relating_object=building)
ifcopenshell.api.run("aggregate.assign_object", model, product=space, relating_object=storey)
ifcopenshell.api.run("aggregate.assign_object", model, products=[building], relating_object=site)
ifcopenshell.api.run("aggregate.assign_object", model, products=[storey], relating_object=building)
ifcopenshell.api.run("aggregate.assign_object", model, products=[space], relating_object=storey)
# Create a column, this column spans 3 storeys
column = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")