| 1 |
@system |
| 2 |
Feature: System |
| 3 |
|
| 4 |
Scenario: Load systems |
| 5 |
Given an empty IFC project |
| 6 |
When I press "bim.load_systems" |
| 7 |
Then nothing happens |
| 8 |
|
| 9 |
Scenario: Disable system editing UI |
| 10 |
Given an empty IFC project |
| 11 |
When I press "bim.load_systems" |
| 12 |
And I press "bim.disable_system_editing_ui" |
| 13 |
Then nothing happens |
| 14 |
|
| 15 |
Scenario: Add system |
| 16 |
Given an empty IFC project |
| 17 |
And I press "bim.load_systems" |
| 18 |
When I press "bim.add_system" |
| 19 |
Then nothing happens |
| 20 |
|
| 21 |
Scenario: Edit system |
| 22 |
Given an empty IFC project |
| 23 |
And I press "bim.load_systems" |
| 24 |
And I press "bim.add_system" |
| 25 |
And the variable "system" is "{ifc}.by_type('IfcSystem')[0].id()" |
| 26 |
And I press "bim.enable_editing_system(system={system})" |
| 27 |
When I press "bim.edit_system" |
| 28 |
Then nothing happens |
| 29 |
|
| 30 |
Scenario: Edit system |
| 31 |
Given an empty IFC project |
| 32 |
And I press "bim.load_systems" |
| 33 |
And I press "bim.add_system" |
| 34 |
And the variable "system" is "{ifc}.by_type('IfcSystem')[0].id()" |
| 35 |
When I press "bim.remove_system(system={system})" |
| 36 |
Then nothing happens |
| 37 |
|
| 38 |
Scenario: Enable editing system |
| 39 |
Given an empty IFC project |
| 40 |
And I press "bim.load_systems" |
| 41 |
And I press "bim.add_system" |
| 42 |
And the variable "system" is "{ifc}.by_type('IfcSystem')[0].id()" |
| 43 |
When I press "bim.enable_editing_system(system={system})" |
| 44 |
Then nothing happens |
| 45 |
|
| 46 |
Scenario: Disable editing system |
| 47 |
Given an empty IFC project |
| 48 |
And I press "bim.load_systems" |
| 49 |
And I press "bim.add_system" |
| 50 |
And the variable "system" is "{ifc}.by_type('IfcSystem')[0].id()" |
| 51 |
And I press "bim.enable_editing_system(system={system})" |
| 52 |
When I press "bim.disable_editing_system" |
| 53 |
Then nothing happens |
| 54 |
|
| 55 |
Scenario: Assign system |
| 56 |
Given an empty IFC project |
| 57 |
And I press "bim.load_systems" |
| 58 |
And I set "scene.BIMSystemProperties.system_class" to "IfcDistributionSystem" |
| 59 |
And I press "bim.add_system" |
| 60 |
And the variable "system" is "{ifc}.by_type('IfcSystem')[0].id()" |
| 61 |
And I press "bim.enable_editing_system(system={system})" |
| 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 "IfcPump" |
| 66 |
And I press "bim.assign_class" |
| 67 |
And the object "IfcPump/Cube" is selected |
| 68 |
When I press "bim.assign_system(system={system})" |
| 69 |
Then nothing happens |
| 70 |
|
| 71 |
Scenario: Unassign system |
| 72 |
Given an empty IFC project |
| 73 |
And I press "bim.load_systems" |
| 74 |
And I set "scene.BIMSystemProperties.system_class" to "IfcDistributionSystem" |
| 75 |
And I press "bim.add_system" |
| 76 |
And the variable "system" is "{ifc}.by_type('IfcSystem')[0].id()" |
| 77 |
And I press "bim.enable_editing_system(system={system})" |
| 78 |
And I add a cube |
| 79 |
And the object "Cube" is selected |
| 80 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 81 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcPump" |
| 82 |
And I press "bim.assign_class" |
| 83 |
And the object "IfcPump/Cube" is selected |
| 84 |
And I press "bim.assign_system(system={system})" |
| 85 |
When I press "bim.unassign_system(system={system})" |
| 86 |
Then nothing happens |
| 87 |
|
| 88 |
Scenario: Select system products |
| 89 |
Given an empty IFC project |
| 90 |
And I press "bim.load_systems" |
| 91 |
And I set "scene.BIMSystemProperties.system_class" to "IfcDistributionSystem" |
| 92 |
And I press "bim.add_system" |
| 93 |
And the variable "system" is "{ifc}.by_type('IfcSystem')[0].id()" |
| 94 |
And I press "bim.enable_editing_system(system={system})" |
| 95 |
And I add a cube |
| 96 |
And the object "Cube" is selected |
| 97 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 98 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcPump" |
| 99 |
And I press "bim.assign_class" |
| 100 |
And the object "IfcPump/Cube" is selected |
| 101 |
And I press "bim.assign_system(system={system})" |
| 102 |
When I press "bim.select_system_products(system={system})" |
| 103 |
Then nothing happens |
| 104 |
|
| 105 |
Scenario: Assign flow controls to flow element_type |
| 106 |
Given an empty IFC project |
| 107 |
And I add an empty |
| 108 |
And the object "Empty" is selected |
| 109 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 110 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcActuator" |
| 111 |
And I press "bim.assign_class" |
| 112 |
|
| 113 |
And I add an empty |
| 114 |
And the object "Empty" is selected |
| 115 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 116 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcActuator" |
| 117 |
And I press "bim.assign_class" |
| 118 |
|
| 119 |
And I add an empty |
| 120 |
And the object "Empty" is selected |
| 121 |
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" |
| 122 |
And I set "scene.BIMRootProperties.ifc_class" to "IfcFlowSegment" |
| 123 |
And I press "bim.assign_class" |
| 124 |
|
| 125 |
And the object "IfcActuator/Empty" is selected |
| 126 |
And additionally the object "IfcActuator/Empty.001" is selected |
| 127 |
And additionally the object "IfcFlowSegment/Empty" is selected |
| 128 |
When I press "bim.assign_unassign_flow_control(assign=True)" |
| 129 |
And the variable "assigned_controls" is "set(tool.System.get_flow_element_controls({ifc}.by_type('IfcFlowSegment')[0]))" |
| 130 |
Then the variable "assigned_controls" is "set({ifc}.by_type('IfcActuator'))" |
| 131 |
|
| 132 |
Scenario: Connect MEP elements |
| 133 |
Given an empty IFC project |
| 134 |
And I create default MEP types |
| 135 |
And the variable "segment_types" is "[str(e.id()) for e in {ifc}.by_type('IfcDuctSegmentType')]" |
| 136 |
And the variable "actuator_type_id" is "{ifc}.by_type('IfcActuatorType')[0].id()" |
| 137 |
|
| 138 |
# segment 1 |
| 139 |
And I set "scene.BIMModelProperties.ifc_class" to "IfcDuctSegmentType" |
| 140 |
And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]" |
| 141 |
And I set "scene.BIMModelProperties.extrusion_depth" to "5.0" |
| 142 |
And I press "bim.add_occurrence" |
| 143 |
And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg1" |
| 144 |
|
| 145 |
# actuator |
| 146 |
And I set "scene.BIMModelProperties.ifc_class" to "IfcActuatorType" |
| 147 |
And I set "scene.BIMModelProperties.relating_type_id" to "{actuator_type_id}" |
| 148 |
And I press "bim.add_occurrence" |
| 149 |
And the object "IfcActuator/Actuator" is moved to "10,0,0" |
| 150 |
|
| 151 |
# connect actuator |
| 152 |
And the object "IfcActuator/Actuator" is selected |
| 153 |
And additionally the object "IfcDuctSegment/Seg1" is selected |
| 154 |
And I press "bim.mep_connect_elements" |
| 155 |
|
| 156 |
# final check |
| 157 |
Then the object "IfcDuctSegment/Seg1" is at "0,0,1" |
| 158 |
And the object "IfcDuctSegment/Seg1" dimensions are "0.4,0.2,5.0" |
| 159 |
And the object "IfcActuator/Actuator" is at "5.5,0.0,1.0" |
| 160 |
And the variable "connected_elements" is "set(tool.System.get_connected_elements({ifc}.by_type('IfcActuator')[0]))" |
| 161 |
|
| 162 |
Scenario: Add bend - and regenerate with no changes |
| 163 |
Given an empty IFC project |
| 164 |
And I create default MEP types |
| 165 |
And the variable "segment_types" is "[str(e.id()) for e in {ifc}.by_type('IfcDuctSegmentType')]" |
| 166 |
And the variable "actuator_type_id" is "{ifc}.by_type('IfcActuatorType')[0].id()" |
| 167 |
|
| 168 |
# segment1 |
| 169 |
And I set "scene.BIMModelProperties.ifc_class" to "IfcDuctSegmentType" |
| 170 |
And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]" |
| 171 |
And I set "scene.BIMModelProperties.extrusion_depth" to "5.0" |
| 172 |
And I press "bim.add_occurrence" |
| 173 |
And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg1" |
| 174 |
|
| 175 |
# segment2 |
| 176 |
And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]" |
| 177 |
And I press "bim.add_occurrence" |
| 178 |
And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg2" |
| 179 |
And the object "IfcDuctSegment/Seg2" is rotated by "0,0,90" deg |
| 180 |
|
| 181 |
# bend between segments 1 and 2 |
| 182 |
When the object "IfcDuctSegment/Seg1" is selected |
| 183 |
And additionally the object "IfcDuctSegment/Seg2" is selected |
| 184 |
And I press "bim.mep_add_bend" |
| 185 |
|
| 186 |
Then the object "IfcDuctSegment/Seg1" is at "0.5,0,1" |
| 187 |
And the object "IfcDuctSegment/Seg2" is at "0,0.5,1" |
| 188 |
And the object "IfcDuctFitting/DuctFitting" is at "0,0.5,1" |
| 189 |
And the object "IfcDuctFitting/DuctFitting" dimensions are "0.7,0.2,0.7" |
| 190 |
And the object "IfcDuctSegment/Seg1" dimensions are "0.4,0.2,4.5" |
| 191 |
And the object "IfcDuctSegment/Seg2" dimensions are "0.4,0.2,4.5" |
| 192 |
|
| 193 |
When I press "bim.regenerate_distribution_element" |
| 194 |
Then the object "IfcDuctSegment/Seg1" is at "0.5,0,1" |
| 195 |
And the object "IfcDuctSegment/Seg2" is at "0,0.5,1" |
| 196 |
And the object "IfcDuctFitting/DuctFitting" is at "0,0.5,1" |
| 197 |
And the object "IfcDuctFitting/DuctFitting" dimensions are "0.7,0.2,0.7" |
| 198 |
And the object "IfcDuctSegment/Seg1" dimensions are "0.4,0.2,4.5" |
| 199 |
And the object "IfcDuctSegment/Seg2" dimensions are "0.4,0.2,4.5" |
| 200 |
|
| 201 |
Scenario: Connect MEP elements and regenerate |
| 202 |
Given an empty IFC project |
| 203 |
And I create default MEP types |
| 204 |
And the variable "segment_types" is "[str(e.id()) for e in {ifc}.by_type('IfcDuctSegmentType')]" |
| 205 |
And the variable "actuator_type_id" is "{ifc}.by_type('IfcActuatorType')[0].id()" |
| 206 |
|
| 207 |
# segment1 |
| 208 |
And I set "scene.BIMModelProperties.ifc_class" to "IfcDuctSegmentType" |
| 209 |
And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]" |
| 210 |
And I set "scene.BIMModelProperties.extrusion_depth" to "5.0" |
| 211 |
And I press "bim.add_occurrence" |
| 212 |
And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg1" |
| 213 |
|
| 214 |
# segment2 |
| 215 |
And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]" |
| 216 |
And I press "bim.add_occurrence" |
| 217 |
And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg2" |
| 218 |
And the object "IfcDuctSegment/Seg2" is rotated by "0,0,90" deg |
| 219 |
|
| 220 |
# bend between segments 1 and 2 |
| 221 |
And the object "IfcDuctSegment/Seg1" is selected |
| 222 |
And additionally the object "IfcDuctSegment/Seg2" is selected |
| 223 |
And I press "bim.mep_add_bend" |
| 224 |
|
| 225 |
# actuator |
| 226 |
And I set "scene.BIMModelProperties.ifc_class" to "IfcActuatorType" |
| 227 |
And I set "scene.BIMModelProperties.relating_type_id" to "{actuator_type_id}" |
| 228 |
And I press "bim.add_occurrence" |
| 229 |
And the object "IfcActuator/Actuator" is moved to "10,0,0" |
| 230 |
|
| 231 |
# connect actuator |
| 232 |
And the object "IfcActuator/Actuator" is selected |
| 233 |
And additionally the object "IfcDuctSegment/Seg1" is selected |
| 234 |
And I press "bim.mep_connect_elements" |
| 235 |
|
| 236 |
# move and regenerate |
| 237 |
And the object "IfcActuator/Actuator" is moved to "0.0,5.0,10" |
| 238 |
And the object "IfcActuator/Actuator" is selected |
| 239 |
And I press "bim.regenerate_distribution_element" |
| 240 |
|
| 241 |
# final check |
| 242 |
Then the object "IfcActuator/Actuator" is at "0.0,5.0,10" |
| 243 |
And the object "IfcDuctSegment/Seg1" is at "-6.0,5.0,10.0" |
| 244 |
And the object "IfcDuctSegment/Seg1" dimensions are "0.4,0.2,5.5" |
| 245 |
And the object "IfcDuctFitting/DuctFitting" is at "-6.5,5.5,10.0" |
| 246 |
And the object "IfcDuctSegment/Seg2" is at "-6.5,5.5,10.0" |
| 247 |
And the object "IfcDuctSegment/Seg2" dimensions are "0.4,0.2,5.0" |