mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
spatial.reference_structure - support batching #4474
This commit is contained in:
@@ -32,7 +32,7 @@ def reference_structure(
|
||||
element: Optional[ifcopenshell.entity_instance] = None,
|
||||
) -> Union[ifcopenshell.entity_instance, None]:
|
||||
if spatial.can_reference(structure, element):
|
||||
return ifc.run("spatial.reference_structure", product=element, relating_structure=structure)
|
||||
return ifc.run("spatial.reference_structure", products=[element], relating_structure=structure)
|
||||
|
||||
|
||||
def dereference_structure(
|
||||
|
||||
@@ -23,7 +23,7 @@ from test.core.bootstrap import ifc, collector, spatial
|
||||
class TestReferenceStructure:
|
||||
def test_run(self, ifc, spatial):
|
||||
spatial.can_reference("structure", "element").should_be_called().will_return(True)
|
||||
ifc.run("spatial.reference_structure", product="element", relating_structure="structure").should_be_called()
|
||||
ifc.run("spatial.reference_structure", products=["element"], relating_structure="structure").should_be_called()
|
||||
subject.reference_structure(ifc, spatial, structure="structure", element="element")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user