aggregate.unassign_object - support batching #4474

This commit is contained in:
Andrej730
2024-04-08 17:38:41 +05:00
parent cd11d2de27
commit f14bf8557a
10 changed files with 51 additions and 38 deletions
@@ -141,10 +141,7 @@ class Usecase:
return structure_rel
# can be either only aggregated or only contained at the same time
for product in products_without_containers:
aggregate = ifcopenshell.util.element.get_aggregate(product)
if aggregate:
ifcopenshell.api.run("aggregate.unassign_object", self.file, product=product)
ifcopenshell.api.run("aggregate.unassign_object", self.file, products=products_without_containers)
# unassign elements from previous containers
for rel in previous_containers_rels: