Implement recursive contract / expand of the spatial tree

This commit is contained in:
Dion Moult
2025-05-23 17:35:10 +10:00
parent e3ddccdb11
commit 09e07c80c5
3 changed files with 42 additions and 14 deletions
+4 -4
View File
@@ -125,13 +125,13 @@ def set_orientation_slot(spatial: tool.Spatial, container: ifcopenshell.entity_i
spatial.create_orientation_slot(container)
def contract_container(spatial: tool.Spatial, container: ifcopenshell.entity_instance) -> None:
spatial.contract_container(container)
def contract_container(spatial: tool.Spatial, container: ifcopenshell.entity_instance, is_recursive: bool) -> None:
spatial.contract_container(container, is_recursive=is_recursive)
spatial.import_spatial_decomposition()
def expand_container(spatial: tool.Spatial, container: ifcopenshell.entity_instance) -> None:
spatial.expand_container(container)
def expand_container(spatial: tool.Spatial, container: ifcopenshell.entity_instance, is_recursive: bool) -> None:
spatial.expand_container(container, is_recursive=is_recursive)
spatial.import_spatial_decomposition()