Fix #2140. Voids and fills can now be added, removed, and edited for non-geometric aggregates.

This commit is contained in:
Dion Moult
2023-03-12 12:52:18 +11:00
parent b6fdbd979e
commit 30c850e37d
3 changed files with 151 additions and 72 deletions
@@ -39,6 +39,25 @@ Scenario: Unassign object
And the object "IfcBuildingStorey/My Storey" is in the collection "IfcBuildingStorey/My Storey"
And the collection "IfcBuildingStorey/My Storey" is in the collection "IfcProject/My Project"
Scenario: Unassign object - multiple objects are contained again to their indirect container
Given an empty IFC project
And I add a cube
And the object "Cube" is selected
And I set "scene.BIMRootProperties.ifc_class" to "IfcMember"
And I press "bim.assign_class"
And I add a cube
And the object "Cube" is selected
And I set "scene.BIMRootProperties.ifc_class" to "IfcCovering"
And I press "bim.assign_class"
And the object "IfcMember/Cube" is selected
And additionally the object "IfcCovering/Cube" is selected
And I press "bim.add_aggregate(ifc_class='IfcWall')"
And the object "IfcMember/Cube" is selected
And additionally the object "IfcCovering/Cube" is selected
When I press "bim.unassign_object"
Then the object "IfcMember/Cube" is in the collection "IfcBuildingStorey/My Storey"
And the object "IfcCovering/Cube" is in the collection "IfcBuildingStorey/My Storey"
Scenario: Add aggregate
Given an empty IFC project
And I add a cube
@@ -79,3 +98,21 @@ Scenario: Add aggregate - add a nested aggregate
And the object "IfcElementAssembly/Assembly.001" is in the collection "IfcElementAssembly/Assembly.001"
And the collection "IfcElementAssembly/Assembly.001" is in the collection "IfcElementAssembly/Assembly"
And the collection "IfcElementAssembly/Assembly" is in the collection "IfcBuildingStorey/My Storey"
Scenario: Add aggregate - add multiple elements to a custom aggregate class
Given an empty IFC project
And I add a cube
And the object "Cube" is selected
And I set "scene.BIMRootProperties.ifc_class" to "IfcMember"
And I press "bim.assign_class"
And I add a cube
And the object "Cube" is selected
And I set "scene.BIMRootProperties.ifc_class" to "IfcCovering"
And I press "bim.assign_class"
And the object "IfcMember/Cube" is selected
And additionally the object "IfcCovering/Cube" is selected
When I press "bim.add_aggregate(ifc_class='IfcWall')"
Then the object "IfcMember/Cube" is in the collection "IfcWall/Assembly"
And the object "IfcCovering/Cube" is in the collection "IfcWall/Assembly"
And the object "IfcWall/Assembly" is in the collection "IfcWall/Assembly"
And the collection "IfcWall/Assembly" is in the collection "IfcBuildingStorey/My Storey"