2021-10-06 12:50:46 +11:00
|
|
|
@aggregate
|
|
|
|
|
Feature: Aggregate
|
|
|
|
|
Covers element and spatial aggregation
|
|
|
|
|
|
|
|
|
|
Scenario: Enable editing aggregate
|
|
|
|
|
Given an empty IFC project
|
|
|
|
|
And the object "IfcSite/My Site" is selected
|
|
|
|
|
When I press "bim.enable_editing_aggregate"
|
|
|
|
|
Then nothing happens
|
|
|
|
|
|
|
|
|
|
Scenario: Disable editing aggregate
|
|
|
|
|
Given an empty IFC project
|
|
|
|
|
And the object "IfcSite/My Site" is selected
|
|
|
|
|
And I press "bim.enable_editing_aggregate"
|
|
|
|
|
When I press "bim.disable_editing_aggregate"
|
|
|
|
|
Then nothing happens
|
|
|
|
|
|
|
|
|
|
Scenario: Assign object
|
|
|
|
|
Given an empty IFC project
|
|
|
|
|
And the object "IfcSite/My Site" is selected
|
2023-06-01 16:59:45 +10:00
|
|
|
And the object "IfcBuildingStorey/My Storey" is selected
|
2021-10-06 12:50:46 +11:00
|
|
|
And I press "bim.enable_editing_aggregate"
|
|
|
|
|
And the variable "relating_object" is "tool.Ifc.get().by_type('IfcSite')[0].id()"
|
2023-06-01 16:59:45 +10:00
|
|
|
When I press "bim.assign_object(relating_object={relating_object})"
|
2021-10-06 12:50:46 +11:00
|
|
|
Then the object "IfcSite/My Site" is in the collection "IfcSite/My Site"
|
2021-10-06 14:11:54 +11:00
|
|
|
And the object "IfcBuildingStorey/My Storey" is in the collection "IfcBuildingStorey/My Storey"
|
|
|
|
|
And the collection "IfcBuildingStorey/My Storey" is in the collection "IfcSite/My Site"
|
2021-10-06 12:50:46 +11:00
|
|
|
|
2021-10-06 14:11:54 +11:00
|
|
|
Scenario: Unassign object
|
|
|
|
|
Given an empty IFC project
|
|
|
|
|
And the object "IfcBuildingStorey/My Storey" is selected
|
|
|
|
|
And I press "bim.enable_editing_aggregate"
|
|
|
|
|
And the variable "relating_object" is "tool.Ifc.get().by_type('IfcSite')[0].id()"
|
2023-06-01 16:59:45 +10:00
|
|
|
And I press "bim.assign_object(relating_object={relating_object})"
|
2021-10-06 14:11:54 +11:00
|
|
|
And the object "IfcBuildingStorey/My Storey" is selected
|
2023-12-20 13:47:50 +05:00
|
|
|
When I press "bim.aggregate_unassign_object"
|
2021-10-06 14:11:54 +11:00
|
|
|
Then the object "IfcSite/My Site" is in the collection "IfcSite/My Site"
|
|
|
|
|
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"
|
2021-11-09 20:50:31 +11:00
|
|
|
|
2023-03-12 12:52:18 +11:00
|
|
|
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
|
2023-10-19 16:42:20 +05:00
|
|
|
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
2023-03-12 12:52:18 +11:00
|
|
|
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
|
2023-12-20 13:47:50 +05:00
|
|
|
When I press "bim.aggregate_unassign_object"
|
2023-03-12 12:52:18 +11:00
|
|
|
Then the object "IfcMember/Cube" is in the collection "IfcBuildingStorey/My Storey"
|
|
|
|
|
And the object "IfcCovering/Cube" is in the collection "IfcBuildingStorey/My Storey"
|
|
|
|
|
|
2021-11-09 20:50:31 +11:00
|
|
|
Scenario: Add aggregate
|
|
|
|
|
Given an empty IFC project
|
|
|
|
|
And I add a cube
|
|
|
|
|
And the object "Cube" is selected
|
2023-09-24 18:44:56 +01:00
|
|
|
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
2021-11-09 20:50:31 +11:00
|
|
|
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
|
|
|
|
And I press "bim.assign_class"
|
|
|
|
|
And the object "IfcWall/Cube" is selected
|
|
|
|
|
When I press "bim.add_aggregate"
|
|
|
|
|
Then the object "IfcWall/Cube" is in the collection "IfcElementAssembly/Assembly"
|
|
|
|
|
And the object "IfcElementAssembly/Assembly" is in the collection "IfcElementAssembly/Assembly"
|
2022-03-15 16:53:31 +11:00
|
|
|
And the collection "IfcElementAssembly/Assembly" is in the collection "IfcBuildingStorey/My Storey"
|
2021-11-09 20:50:31 +11:00
|
|
|
|
|
|
|
|
Scenario: Add aggregate - with the aggregate inheriting the existing spatial collection
|
|
|
|
|
Given an empty IFC project
|
|
|
|
|
And I add a cube
|
|
|
|
|
And the object "Cube" is selected
|
2023-09-24 18:44:56 +01:00
|
|
|
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
2021-11-09 20:50:31 +11:00
|
|
|
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
|
|
|
|
And I press "bim.assign_class"
|
|
|
|
|
And the object "IfcWall/Cube" is placed in the collection "IfcBuildingStorey/My Storey"
|
|
|
|
|
And the object "IfcWall/Cube" is selected
|
|
|
|
|
When I press "bim.add_aggregate"
|
|
|
|
|
Then the object "IfcWall/Cube" is in the collection "IfcElementAssembly/Assembly"
|
|
|
|
|
And the object "IfcElementAssembly/Assembly" is in the collection "IfcElementAssembly/Assembly"
|
|
|
|
|
And the collection "IfcElementAssembly/Assembly" is in the collection "IfcBuildingStorey/My Storey"
|
|
|
|
|
|
|
|
|
|
Scenario: Add aggregate - add a nested aggregate
|
|
|
|
|
Given an empty IFC project
|
|
|
|
|
And I add a cube
|
|
|
|
|
And the object "Cube" is selected
|
2023-09-24 18:44:56 +01:00
|
|
|
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
2021-11-09 20:50:31 +11:00
|
|
|
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
|
|
|
|
And I press "bim.assign_class"
|
|
|
|
|
And the object "IfcWall/Cube" is placed in the collection "IfcBuildingStorey/My Storey"
|
|
|
|
|
And the object "IfcWall/Cube" is selected
|
|
|
|
|
When I press "bim.add_aggregate"
|
|
|
|
|
And the object "IfcWall/Cube" is selected
|
|
|
|
|
And I press "bim.add_aggregate"
|
|
|
|
|
Then the object "IfcWall/Cube" is in the collection "IfcElementAssembly/Assembly.001"
|
|
|
|
|
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"
|
2023-03-12 12:52:18 +11:00
|
|
|
|
|
|
|
|
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
|
2023-10-19 16:42:20 +05:00
|
|
|
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
2023-03-12 12:52:18 +11:00
|
|
|
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"
|