This commit is contained in:
Milovann Yanatchkov 2024-02-03 15:00:40 +01:00
parent a53d466c9e
commit f14a7e4d70

View file

@ -58,16 +58,20 @@ def create(name,objects):
run("aggregate.assign_object", model, relating_object=site, product=building)
run("aggregate.assign_object", model, relating_object=building, product=storey)
if False:
if True:
l = random.random() * 5
h = random.random() * 3
t = random.random() * 0.2
wall = run("root.create_entity", model, ifc_class="IfcWall")
run("geometry.edit_object_placement", model, product=wall)
representation = run("geometry.add_wall_representation", model, context=body, length=5, height=3, thickness=0.2)
representation = run("geometry.add_wall_representation", model, context=body, length=l, height=h, thickness=t)
run("geometry.assign_representation", model, product=wall, representation=representation)
run("spatial.assign_container", model, relating_structure=storey, product=wall)
for item in objects:
print("adding",item)
run("spatial.assign_container", model, relating_structure=storey, product=item)
if False:
for item in objects:
print("adding",item)
run("spatial.assign_container", model, relating_structure=storey, product=item)
print("writing " + name)
model.write(name)