| 1 |
@spatial |
| 2 |
Feature: Spatial |
| 3 |
Covers spatial containment management and spatial tool. |
| 4 |
|
| 5 |
Scenario: Enable editing container |
| 6 |
Given an empty IFC project |
| 7 |
And I add a cube |
| 8 |
And the object "Cube" is selected |
| 9 |
When I press "bim.enable_editing_container" |
| 10 |
Then nothing happens |
| 11 |
|
| 12 |
Scenario: Disable editing container |
| 13 |
Given an empty IFC project |
| 14 |
And I add a cube |
| 15 |
And the object "Cube" is selected |
| 16 |
And I press "bim.enable_editing_container" |
| 17 |
When I press "bim.disable_editing_container" |
| 18 |
Then nothing happens |
| 19 |
|
| 20 |
Scenario: Assign container |
| 21 |
Given an empty IFC project |
| 22 |
And I add a cube |
| 23 |
And the object "Cube" is selected |
| 24 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 25 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" |
| 26 |
And I press "bim.assign_class" |
| 27 |
And the object "IfcWall/Cube" is selected |
| 28 |
And the variable "site" is "tool.Ifc.get().by_type('IfcSite')[0].id()" |
| 29 |
And I press "bim.set_default_container(container={site})" |
| 30 |
And I press "bim.enable_editing_container" |
| 31 |
When I press "bim.assign_container()" |
| 32 |
Then the object "IfcWall/Cube" is in the collection "IfcSite/My Site" |
| 33 |
|
| 34 |
Scenario: Copy to container |
| 35 |
Given an empty IFC project |
| 36 |
And I add a cube |
| 37 |
And the object "Cube" is selected |
| 38 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 39 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" |
| 40 |
And I press "bim.assign_class" |
| 41 |
And the object "IfcSite/My Site" is selected |
| 42 |
And additionally the object "IfcWall/Cube" is selected |
| 43 |
And I press "bim.enable_editing_container" |
| 44 |
When I press "bim.copy_to_container" |
| 45 |
Then the object "IfcWall/Cube.001" is in the collection "IfcSite/My Site" |
| 46 |
|
| 47 |
Scenario: Reference structure |
| 48 |
Given an empty IFC project |
| 49 |
And I add a cube |
| 50 |
And the object "Cube" is selected |
| 51 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 52 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" |
| 53 |
And I press "bim.assign_class" |
| 54 |
And the object "IfcBuilding/My Building" is selected |
| 55 |
And additionally the object "IfcWall/Cube" is selected |
| 56 |
And I press "bim.enable_editing_container" |
| 57 |
When I press "bim.reference_structure" |
| 58 |
Then nothing happens |
| 59 |
|
| 60 |
Scenario: Dereference structure |
| 61 |
Given an empty IFC project |
| 62 |
And I add a cube |
| 63 |
And the object "Cube" is selected |
| 64 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 65 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" |
| 66 |
And I press "bim.assign_class" |
| 67 |
And the object "IfcBuilding/My Building" is selected |
| 68 |
And additionally the object "IfcWall/Cube" is selected |
| 69 |
And I press "bim.enable_editing_container" |
| 70 |
When I press "bim.reference_structure" |
| 71 |
And I press "bim.dereference_structure" |
| 72 |
Then nothing happens |
| 73 |
|
| 74 |
Scenario: Select container |
| 75 |
Given an empty IFC project |
| 76 |
And I add a cube |
| 77 |
And the object "Cube" is selected |
| 78 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 79 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" |
| 80 |
And I press "bim.assign_class" |
| 81 |
And the object "IfcWall/Cube" is selected |
| 82 |
And I press "bim.enable_editing_container" |
| 83 |
And the variable "site" is "tool.Ifc.get().by_type('IfcSite')[0].id()" |
| 84 |
And I press "bim.set_default_container(container={site})" |
| 85 |
And I press "bim.assign_container()" |
| 86 |
When I press "bim.select_container" |
| 87 |
Then nothing happens |
| 88 |
|
| 89 |
Scenario: Select similar container |
| 90 |
Given an empty IFC project |
| 91 |
And I add a cube |
| 92 |
And the object "Cube" is selected |
| 93 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 94 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" |
| 95 |
And I press "bim.assign_class" |
| 96 |
And the object "IfcWall/Cube" is selected |
| 97 |
And I press "bim.enable_editing_container" |
| 98 |
And the variable "site" is "tool.Ifc.get().by_type('IfcSite')[0].id()" |
| 99 |
And I press "bim.set_default_container(container={site})" |
| 100 |
And I press "bim.assign_container()" |
| 101 |
When I press "bim.select_similar_container" |
| 102 |
Then nothing happens |
| 103 |
|
| 104 |
Scenario: Execute generate space from cursor position |
| 105 |
Given an empty IFC project |
| 106 |
Then I press "bim.generate_space" and expect error "Error: Couldn't find any polygons to form the space shape. Perhaps, RL value need to be adjusted." |
| 107 |
|
| 108 |
Scenario: Execute generate spaces from walls |
| 109 |
Given an empty IFC project |
| 110 |
And I load the demo construction library |
| 111 |
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType" |
| 112 |
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()" |
| 113 |
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}" |
| 114 |
And I press "bim.add_occurrence" |
| 115 |
And the object "IfcWall/Wall" is selected |
| 116 |
When I press "bim.generate_spaces_from_walls" |
| 117 |
Then nothing happens |
| 118 |
|
| 119 |
Scenario: Execute toggle space visibility |
| 120 |
Given an empty IFC project |
| 121 |
And I add a cube |
| 122 |
And the object "Cube" is selected |
| 123 |
And I press "bim.assign_class(ifc_class='IfcSpace', predefined_type='SPACE')" |
| 124 |
When I press "bim.toggle_space_visibility" |
| 125 |
Then nothing happens |
| 126 |
|
| 127 |
Scenario: Spatial decomposition - see panel |
| 128 |
Given an empty IFC project |
| 129 |
When I look at the "Spatial Decomposition" panel |
| 130 |
Then the "BIM_UL_containers_manager" list has 4 items |
| 131 |
And I don't see the "BIM_UL_elements" list |
| 132 |
|
| 133 |
Scenario: Isolate spatial container |
| 134 |
Given an empty IFC project |
| 135 |
And I trigger "Add Element" |
| 136 |
And I set the "Definition" property to "IfcElement" |
| 137 |
And I set the "Class" property to "IfcFurniture" |
| 138 |
And I set the "Representation" property to "No Geometry" |
| 139 |
And I click "OK" |
| 140 |
And I look at the "Spatial Decomposition" panel |
| 141 |
When I select the "My Site" item in the "BIM_UL_containers_manager" list |
| 142 |
And I click "Isolate" |
| 143 |
Then nothing happens |
| 144 |
|
| 145 |
Scenario: Show spatial container |
| 146 |
Given an empty IFC project |
| 147 |
And I trigger "Add Element" |
| 148 |
And I set the "Definition" property to "IfcElement" |
| 149 |
And I set the "Class" property to "IfcFurniture" |
| 150 |
And I set the "Representation" property to "No Geometry" |
| 151 |
And I click "OK" |
| 152 |
And I look at the "Spatial Decomposition" panel |
| 153 |
When I select the "My Site" item in the "BIM_UL_containers_manager" list |
| 154 |
And I click "HIDE_OFF" |
| 155 |
Then nothing happens |
| 156 |
|
| 157 |
Scenario: Hide spatial container |
| 158 |
Given an empty IFC project |
| 159 |
And I trigger "Add Element" |
| 160 |
And I set the "Definition" property to "IfcElement" |
| 161 |
And I set the "Class" property to "IfcFurniture" |
| 162 |
And I set the "Representation" property to "No Geometry" |
| 163 |
And I click "OK" |
| 164 |
And I look at the "Spatial Decomposition" panel |
| 165 |
When I select the "My Site" item in the "BIM_UL_containers_manager" list |
| 166 |
And I click "HIDE_ON" |
| 167 |
Then nothing happens |
| 168 |
|
| 169 |
Scenario: Select spatial container |
| 170 |
Given an empty IFC project |
| 171 |
And I look at the "Spatial Decomposition" panel |
| 172 |
When I select the "My Site" item in the "BIM_UL_containers_manager" list |
| 173 |
And I click "OBJECT_DATA" |
| 174 |
Then the object "IfcSite/My Site" is selected |
| 175 |
|
| 176 |
Scenario: Delete spatial container |
| 177 |
Given an empty IFC project |
| 178 |
And I look at the "Spatial Decomposition" panel |
| 179 |
When I select the "My Building" item in the "BIM_UL_containers_manager" list |
| 180 |
And I click "X" |
| 181 |
Then the "BIM_UL_containers_manager" list has 2 items |
| 182 |
|
| 183 |
Scenario: Add spatial container |
| 184 |
Given an empty IFC project |
| 185 |
And I look at the "Spatial Decomposition" panel |
| 186 |
And I set the "subelement_class" property to "IfcExternalSpatialElement" |
| 187 |
When I click "ADD" |
| 188 |
Then the "BIM_UL_containers_manager" list has 5 items |