mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 20:22:09 +00:00
spatial.dereference_structure - support batching #4474
This commit is contained in:
@@ -42,7 +42,7 @@ def dereference_structure(
|
||||
element: Optional[ifcopenshell.entity_instance] = None,
|
||||
) -> None:
|
||||
if spatial.can_reference(structure, element):
|
||||
return ifc.run("spatial.dereference_structure", product=element, relating_structure=structure)
|
||||
return ifc.run("spatial.dereference_structure", products=[element], relating_structure=structure)
|
||||
|
||||
|
||||
def assign_container(
|
||||
|
||||
@@ -30,7 +30,7 @@ class TestReferenceStructure:
|
||||
class TestDereferenceStructure:
|
||||
def test_run(self, ifc, spatial):
|
||||
spatial.can_reference("structure", "element").should_be_called().will_return(True)
|
||||
ifc.run("spatial.dereference_structure", product="element", relating_structure="structure").should_be_called()
|
||||
ifc.run("spatial.dereference_structure", products=["element"], relating_structure="structure").should_be_called()
|
||||
subject.dereference_structure(ifc, spatial, structure="structure", element="element")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user