From f14a7e4d7097fa7fd96991ed8520890b00e579dd Mon Sep 17 00:00:00 2001 From: milovann Date: Sat, 3 Feb 2024 15:00:40 +0100 Subject: [PATCH] pyupdate --- python/extract.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/python/extract.py b/python/extract.py index bebc6e1..68558c9 100644 --- a/python/extract.py +++ b/python/extract.py @@ -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)