spatial.reference_structure - support batching #4474

This commit is contained in:
Andrej730
2024-04-16 10:53:54 +05:00
parent 3b6f79cc75
commit 8ac0d22a95
9 changed files with 88 additions and 46 deletions
+1 -1
View File
@@ -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(
+1 -1
View File
@@ -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")