Debian Codegraph @

src/bonsai/test/bim/feature/model.feature

raw
1 @model
2 Feature: Model
3
4 Scenario: Add type instance - add from a mesh
5 Given an empty IFC project
6 And I add a cube
7 And the object "Cube" is selected
8 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
9 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
10 And I press "bim.assign_class"
11 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
12 And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
13 And I set "scene.BIMModelProperties.relating_type_id" to "{cube}"
14 When I press "bim.add_occurrence"
15 Then the object "IfcWall/Wall" exists
16
17 Scenario: Add type instance - add from an empty
18 Given an empty IFC project
19 And I add an empty
20 And the object "Empty" is selected
21 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
22 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
23 And I press "bim.assign_class"
24 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
25 And the variable "empty" is "{ifc}.by_type('IfcWallType')[0].id()"
26 And I set "scene.BIMModelProperties.relating_type_id" to "{empty}"
27 When I press "bim.add_occurrence"
28 Then the object "IfcWall/Wall" exists
29
30 Scenario: Add type instance - add a mesh where existing instances have changed context
31 Given an empty IFC project
32 And I add a cube
33 And the object "Cube" is selected
34 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
35 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
36 And I press "bim.assign_class"
37 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
38 And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
39 And I set "scene.BIMModelProperties.relating_type_id" to "{cube}"
40 And I press "bim.add_occurrence"
41 And the object "IfcWall/Wall" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW"
42 And the object "IfcWall/Wall" is selected
43 And the variable "context" is "[c for c in {ifc}.by_type('IfcGeometricRepresentationSubContext') if c.ContextType == 'Plan' and c.ContextIdentifier == 'Body' and c.TargetView == 'PLAN_VIEW'][0].id()"
44 And I set "active_object.BIMGeometryProperties.contexts" to "{context}"
45 And I press "bim.add_representation"
46 And the object "IfcWall/Wall" data is a "Annotation2D" representation of "Plan/Body/PLAN_VIEW"
47 When I press "bim.add_occurrence"
48 Then the object "IfcWall/Wall" data is a "Annotation2D" representation of "Plan/Body/PLAN_VIEW"
49 And the object "IfcWall/Wall.001" data is a "Annotation2D" representation of "Plan/Body/PLAN_VIEW"
50
51 Scenario: Add one type from the Construction Type Browser
52 Given an empty IFC project
53 And I load the demo construction library
54 When I set "scene.BIMModelProperties.ifc_class" to "IfcColumnType"
55 And I add the construction type
56 Then the object "IfcColumn/Column" exists
57
58 Scenario: Add grid
59 Given an empty IFC project
60 When I press "mesh.add_grid"
61 Then the object "IfcGrid/Grid" is an "IfcGrid"
62 And the object "IfcGridAxis/A" is an "IfcGridAxis"
63 And the object "IfcGridAxis/B" is an "IfcGridAxis"
64 And the object "IfcGridAxis/C" is an "IfcGridAxis"
65 And the object "IfcGridAxis/01" is an "IfcGridAxis"
66 And the object "IfcGridAxis/02" is an "IfcGridAxis"
67 And the object "IfcGridAxis/03" is an "IfcGridAxis"
68
69 Scenario: Add a wall
70 Given an empty IFC project
71 And I load the demo construction library
72 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
73 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
74 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
75 When I press "bim.add_occurrence"
76 Then the object "IfcWall/Wall" is an "IfcWall"
77 And the object "IfcWall/Wall" dimensions are "1,0.1,3"
78 And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
79
80 Scenario: Extend a wall to the cursor
81 Given an empty IFC project
82 And I load the demo construction library
83 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
84 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
85 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
86 And I press "bim.add_occurrence"
87 And the object "IfcWall/Wall" is selected
88 And the cursor is at "2,0,0"
89 When I press "bim.hotkey(hotkey='S_E')"
90 Then the object "IfcWall/Wall" dimensions are "2,0.1,3"
91 And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
92
93 Scenario: Add a wall perpendicular to an existing wall
94 Given an empty IFC project
95 And I load the demo construction library
96 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
97 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
98 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
99 And I press "bim.add_occurrence"
100 And the cursor is at "0.5,0,0"
101 When I press "bim.add_occurrence"
102 Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
103 And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
104 And the object "IfcWall/Wall.001" dimensions are "1,0.1,3"
105 And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
106 And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
107
108 Scenario: Extend one wall to another
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 cursor is at "0.5,0,0"
116 And I press "bim.add_occurrence"
117 And the object "IfcWall/Wall.001" is moved to "0.5,-1,0"
118 And the object "IfcWall/Wall.001" is selected
119 And additionally the object "IfcWall/Wall" is selected
120 When I press "bim.hotkey(hotkey='S_E')"
121 Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
122 And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
123 And the object "IfcWall/Wall.001" dimensions are "2,0.1,3"
124 And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
125 And the object "IfcWall/Wall.001" top right corner is at "0.6,-2,3"
126
127 Scenario: Join two walls with a mitre joint
128 Given an empty IFC project
129 And I load the demo construction library
130 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
131 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
132 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
133 And I press "bim.add_occurrence"
134 And the cursor is at "0.7,0,0"
135 And I press "bim.add_occurrence"
136 And the object "IfcWall/Wall.001" is selected
137 And additionally the object "IfcWall/Wall" is selected
138 When I press "bim.hotkey(hotkey='S_T')"
139 Then the object "IfcWall/Wall" dimensions are "0.8,0.1,3"
140 And the object "IfcWall/Wall" bottom left corner is at "0.0,0,0"
141 And the object "IfcWall/Wall.001" dimensions are "1.1,0.1,3"
142 And the object "IfcWall/Wall.001" bottom left corner is at "0.7,0.1,0"
143 And the object "IfcWall/Wall.001" top right corner is at "0.8,-1,3"
144
145 Scenario: Change the height of a wall
146 Given an empty IFC project
147 And I load the demo construction library
148 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
149 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
150 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
151 And I press "bim.add_occurrence"
152 And the object "IfcWall/Wall" is selected
153 And I set "scene.BIMModelProperties.extrusion_depth" to "2.0"
154 When I press "bim.change_extrusion_depth(depth=2.0)"
155 Then the object "IfcWall/Wall" dimensions are "1,0.1,2"
156
157 Scenario: Change the length of a wall
158 Given an empty IFC project
159 And I load the demo construction library
160 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
161 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
162 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
163 And I press "bim.add_occurrence"
164 And the object "IfcWall/Wall" is selected
165 And I set "scene.BIMModelProperties.length" to "2.0"
166 When I press "bim.change_layer_length(length=2.0)"
167 Then the object "IfcWall/Wall" dimensions are "2,0.1,3"
168
169 Scenario: Flip a wall
170 Given an empty IFC project
171 And I load the demo construction library
172 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
173 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
174 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
175 And I press "bim.add_occurrence"
176 And the object "IfcWall/Wall" is selected
177 When I press "bim.hotkey(hotkey='S_F')"
178 Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
179 And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
180 And the object "IfcWall/Wall" top right corner is at "1,0.1,3"
181
182 Scenario: Split a wall
183 Given an empty IFC project
184 And I load the demo construction library
185 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
186 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
187 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
188 And I press "bim.add_occurrence"
189 And the object "IfcWall/Wall" is selected
190 And the cursor is at "0.5,0,0"
191 When I press "bim.hotkey(hotkey='S_K')"
192 Then the object "IfcWall/Wall" is an "IfcWall"
193 And the object "IfcWall/Wall.001" is an "IfcWall"
194 And the object "IfcWall/Wall" dimensions are "0.5,0.1,3"
195 And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
196 And the object "IfcWall/Wall" top right corner is at "0.5,0.1,3"
197 And the object "IfcWall/Wall.001" dimensions are "0.5,0.1,3"
198 And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
199 And the object "IfcWall/Wall.001" top right corner is at "1,0.1,3"
200
201 Scenario: Rotate a wall by 90 degrees
202 Given an empty IFC project
203 And I load the demo construction library
204 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
205 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
206 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
207 And I press "bim.add_occurrence"
208 And the object "IfcWall/Wall" is selected
209 When I press "bim.hotkey(hotkey='S_R')"
210 Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
211 And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
212 And the object "IfcWall/Wall" top right corner is at "-0.1,1,3"
213
214 Scenario: Regenerate a wall - after doing nothing interesting
215 Given an empty IFC project
216 And I load the demo construction library
217 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
218 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
219 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
220 And I press "bim.add_occurrence"
221 And the object "IfcWall/Wall" is selected
222 When I press "bim.hotkey(hotkey='S_G')"
223 Then the object "IfcWall/Wall" is an "IfcWall"
224 And the object "IfcWall/Wall" dimensions are "1,0.1,3"
225 And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
226
227 Scenario: Add a slab
228 Given an empty IFC project
229 And I load the demo construction library
230 And I set "scene.BIMModelProperties.ifc_class" to "IfcSlabType"
231 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcSlabType') if e.Name == 'FLR200'][0].id()"
232 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
233 When I press "bim.add_occurrence"
234 Then the object "IfcSlab/Slab" is an "IfcSlab"
235 And the object "IfcSlab/Slab" dimensions are "1,1,0.2"
236 And the object "IfcSlab/Slab" bottom left corner is at "0,0,0"
237 And the object "IfcSlab/Slab" top right corner is at "1,1,0.2"
238
239 Scenario: Enable editing a slab profile
240 Given an empty IFC project
241 And I load the demo construction library
242 And I set "scene.BIMModelProperties.ifc_class" to "IfcSlabType"
243 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcSlabType') if e.Name == 'FLR200'][0].id()"
244 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
245 And I press "bim.add_occurrence"
246 And the object "IfcSlab/Slab" is selected
247 When I press "bim.hotkey(hotkey='S_E')"
248 Then the object "IfcSlab/Slab" dimensions are "1,1,0"
249 And the object "IfcSlab/Slab" bottom left corner is at "0,0,0"
250 And the object "IfcSlab/Slab" top right corner is at "1,1,0"
251
252 Scenario: Disable editing a slab profile
253 Given an empty IFC project
254 And I load the demo construction library
255 And I set "scene.BIMModelProperties.ifc_class" to "IfcSlabType"
256 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcSlabType') if e.Name == 'FLR200'][0].id()"
257 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
258 And I press "bim.add_occurrence"
259 And the object "IfcSlab/Slab" is selected
260 And I press "bim.hotkey(hotkey='S_E')"
261 When I press "bim.disable_editing_extrusion_profile"
262 Then the object "IfcSlab/Slab" dimensions are "1,1,0.2"
263 And the object "IfcSlab/Slab" bottom left corner is at "0,0,0"
264 And the object "IfcSlab/Slab" top right corner is at "1,1,0.2"
265
266 Scenario: Edit a slab profile
267 Given an empty IFC project
268 And I load the demo construction library
269 And I set "scene.BIMModelProperties.ifc_class" to "IfcSlabType"
270 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcSlabType') if e.Name == 'FLR200'][0].id()"
271 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
272 And I press "bim.add_occurrence"
273 And the object "IfcSlab/Slab" is selected
274 And I press "bim.hotkey(hotkey='S_E')"
275 When I press "bim.edit_extrusion_profile"
276 Then the object "IfcSlab/Slab" dimensions are "1,1,0.2"
277 And the object "IfcSlab/Slab" bottom left corner is at "0,0,0"
278 And the object "IfcSlab/Slab" top right corner is at "1,1,0.2"
279
280 Scenario: Add a beam
281 Given an empty IFC project
282 And I load the demo construction library
283 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
284 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
285 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
286 When I press "bim.add_occurrence"
287 Then the object "IfcBeam/Beam" is an "IfcBeam"
288 And the object "IfcBeam/Beam" dimensions are "0.1,0.2,3"
289 And the object "IfcBeam/Beam" bottom left corner is at "0,-0.05,-0.1"
290 And the object "IfcBeam/Beam" top right corner is at "3,0.05,0.1"
291
292 Scenario: Extend a beam to the cursor
293 Given an empty IFC project
294 And I load the demo construction library
295 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
296 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
297 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
298 And I press "bim.add_occurrence"
299 And the object "IfcBeam/Beam" is selected
300 And the cursor is at "2,0,0"
301 When I press "bim.hotkey(hotkey='S_E')"
302 Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,2"
303 And the object "IfcBeam/Beam" bottom left corner is at "0,-0.05,-0.1"
304
305 Scenario: Extend one beam to another
306 Given an empty IFC project
307 And I load the demo construction library
308 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
309 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
310 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
311 And I press "bim.add_occurrence"
312 And the cursor is at "1,1,0"
313 And I press "bim.add_occurrence"
314 And the object "IfcBeam/Beam.001" is selected
315 And I press "bim.hotkey(hotkey='S_R')"
316 And the object "IfcBeam/Beam.001" is selected
317 And additionally the object "IfcBeam/Beam" is selected
318 When I press "bim.hotkey(hotkey='S_E')"
319 Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,3"
320 And the object "IfcBeam/Beam" bottom left corner is at "0,-0.05,-0.1"
321 And the object "IfcBeam/Beam" top right corner is at "3,0.05,0.1"
322 And the object "IfcBeam/Beam.001" dimensions are "0.1,0.2,3.95"
323 And the object "IfcBeam/Beam.001" bottom left corner is at "1.05,0.05,-0.1"
324 And the object "IfcBeam/Beam.001" top right corner is at "0.95,4,0.1"
325
326 Scenario: Join two beams with a butt joint - first beam has priority
327 Given an empty IFC project
328 And I load the demo construction library
329 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
330 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
331 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
332 And I press "bim.add_occurrence"
333 And the cursor is at "1,1,0"
334 And I press "bim.add_occurrence"
335 And the object "IfcBeam/Beam.001" is selected
336 And I press "bim.hotkey(hotkey='S_R')"
337 And the object "IfcBeam/Beam.001" is selected
338 And additionally the object "IfcBeam/Beam" is selected
339 When I press "bim.hotkey(hotkey='S_T')"
340 Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,1.95"
341 And the object "IfcBeam/Beam" bottom left corner is at "1.05,-0.05,-0.1"
342 And the object "IfcBeam/Beam" top right corner is at "3,0.05,0.1"
343 And the object "IfcBeam/Beam.001" dimensions are "0.1,0.2,4.05"
344 And the object "IfcBeam/Beam.001" bottom left corner is at "1.05,-0.05,-0.1"
345 And the object "IfcBeam/Beam.001" top right corner is at "0.95,4,0.1"
346
347 Scenario: Join two beams with a butt joint - second beam has priority
348 Given an empty IFC project
349 And I load the demo construction library
350 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
351 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
352 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
353 And I press "bim.add_occurrence"
354 And the cursor is at "1,1,0"
355 And I press "bim.add_occurrence"
356 And the object "IfcBeam/Beam.001" is selected
357 And I press "bim.hotkey(hotkey='S_R')"
358 And the object "IfcBeam/Beam" is selected
359 And additionally the object "IfcBeam/Beam.001" is selected
360 When I press "bim.hotkey(hotkey='S_T')"
361 Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,2.05"
362 And the object "IfcBeam/Beam" bottom left corner is at "0.95,-0.05,-0.1"
363 And the object "IfcBeam/Beam" top right corner is at "3,0.05,0.1"
364 And the object "IfcBeam/Beam.001" dimensions are "0.1,0.2,3.95"
365 And the object "IfcBeam/Beam.001" bottom left corner is at "1.05,0.05,-0.1"
366 And the object "IfcBeam/Beam.001" top right corner is at "0.95,4,0.1"
367
368 Scenario: Join two beams with a mitre joint
369 Given an empty IFC project
370 And I load the demo construction library
371 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
372 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
373 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
374 And I press "bim.add_occurrence"
375 And the cursor is at "1,1,0"
376 And I press "bim.add_occurrence"
377 And the object "IfcBeam/Beam.001" is selected
378 And I press "bim.hotkey(hotkey='S_R')"
379 And the object "IfcBeam/Beam" is selected
380 And additionally the object "IfcBeam/Beam.001" is selected
381 When I press "bim.hotkey(hotkey='S_Y')"
382 Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,2.05"
383 And the object "IfcBeam/Beam" bottom left corner is at "0.95,-0.05,-0.1"
384 And the object "IfcBeam/Beam" top right corner is at "3,0.05,0.1"
385 And the object "IfcBeam/Beam.001" dimensions are "0.1,0.2,4.05"
386 And the object "IfcBeam/Beam.001" bottom left corner is at "1.05,-0.05,-0.1"
387 And the object "IfcBeam/Beam.001" top right corner is at "0.95,4,0.1"
388
389 Scenario: Change the length of a beam
390 Given an empty IFC project
391 And I load the demo construction library
392 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
393 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
394 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
395 And I press "bim.add_occurrence"
396 And the object "IfcBeam/Beam" is selected
397 And I set "scene.BIMModelProperties.extrusion_depth" to "2.0"
398 When I press "bim.change_profile_depth(depth=2.0)"
399 Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,2"
400
401 Scenario: Rotate a beam by 90 degrees
402 Given an empty IFC project
403 And I load the demo construction library
404 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
405 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
406 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
407 And I press "bim.add_occurrence"
408 And the object "IfcBeam/Beam" is selected
409 When I press "bim.hotkey(hotkey='S_R')"
410 Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,3"
411 And the object "IfcBeam/Beam" bottom left corner is at "0.05,0,-0.1"
412 And the object "IfcBeam/Beam" top right corner is at "-0.05,3,0.1"
413
414 Scenario: Regenerate a beam - after doing nothing interesting
415 Given an empty IFC project
416 And I load the demo construction library
417 And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
418 And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
419 And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
420 And I press "bim.add_occurrence"
421 And the object "IfcBeam/Beam" is selected
422 When I press "bim.hotkey(hotkey='S_G')"
423 Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,3"
424 And the object "IfcBeam/Beam" bottom left corner is at "0,-0.05,-0.1"
425 And the object "IfcBeam/Beam" top right corner is at "3,0.05,0.1"
426
427 Scenario: Undo test - create a wall and couple windows and undo the last window
428 Given an empty IFC project
429 And I load the demo construction library
430 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
431 And I press "bim.add_occurrence"
432 And I set "scene.BIMModelProperties.ifc_class" to "IfcWindowType"
433 And I press "bim.add_occurrence"
434 And I prepare to undo
435 And the object "IfcWall/Wall" is selected
436 And I set "scene.BIMModelProperties.ifc_class" to "IfcWindowType"
437 And I press "bim.add_occurrence"
438 And I undo
439 Then nothing happens
440
441 Scenario: Undo test - create a wall with window opening, flip it and undo
442 Given an empty IFC project
443 And I load the demo construction library
444 And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
445 And I press "bim.add_occurrence"
446 And I set "scene.BIMModelProperties.ifc_class" to "IfcWindowType"
447 And I press "bim.add_occurrence"
448 And the object "IfcWall/Wall" is selected
449 And I prepare to undo
450 And I press "bim.hotkey(hotkey='S_F')"
451 And I undo
452 Then nothing happens
453
454 Scenario: Create window type based on window modifier, add an occurrence of it and edit it
455 Given an empty IFC project
456 And I trigger "Add Element"
457 And I set the "Class" property to "IfcWindowType"
458 And I set the "Predefined Type" property to "WINDOW"
459 And I set the "Representation" property to "Window"
460 When I click "OK"
461 And I press "bim.add_occurrence"
462 And I press "bim.enable_editing_window()"
463 And I press "bim.finish_editing_window()"
464 Then nothing happens
465
466 Scenario: Create door type based on door modifier, add an occurrence of it and edit it
467 Given an empty IFC project
468 And I trigger "Add Element"
469 And I set the "Class" property to "IfcDoorType"
470 And I set the "Predefined Type" property to "DOOR"
471 And I set the "Representation" property to "Door"
472 When I click "OK"
473 And I press "bim.add_occurrence"
474 And I press "bim.enable_editing_door()"
475 And I press "bim.finish_editing_door()"
476 Then nothing happens
477
478 Scenario: Create a door, undo and create a new door
479 Given an empty IFC project
480 And I prepare to undo
481 And I press "mesh.add_door()"
482 And I undo
483 And I press "mesh.add_door()"
484 Then nothing happens
485 And the object "IfcDoor/IfcDoor" exists
486
487 Scenario: Create a MEP transition
488 Given an empty IFC project
489 And I create default MEP types
490 And the variable "segment_types" is "[str(e.id()) for e in {ifc}.by_type('IfcDuctSegmentType')]"
491
492 And I set "scene.BIMModelProperties.ifc_class" to "IfcDuctSegmentType"
493 And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]"
494 And I press "bim.add_occurrence"
495 And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/RectSegment"
496
497 And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[1]"
498 And I press "bim.add_occurrence"
499 And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/CircleSegment"
500
501 And the object "IfcDuctSegment/RectSegment" is moved to "0,0,0"
502 And the object "IfcDuctSegment/CircleSegment" is moved to "2.5,0,0"
503 And the object "IfcDuctSegment/CircleSegment" is selected
504 And additionally the object "IfcDuctSegment/RectSegment" is selected
505 And I press "bim.mep_add_transition"
506
507 Then the object "IfcDuctFitting/DuctFitting" exists
508 And the object "IfcDuctFittingType/Transition" exists
509 And the object "IfcDuctSegment/RectSegment" is at "0,0,0"
510 And the object "IfcDuctSegment/RectSegment" dimensions are "0.4,0.2,2.370096"
511 And the object "IfcDuctSegment/CircleSegment" is at "3.1299,0,0"
512 And the object "IfcDuctSegment/CircleSegment" dimensions are "0.1000, 0.09927, 2.370096"
513 And the object "IfcDuctFitting/DuctFitting" is at "2.370096, 0.0000, 0.0000"
514 And the object "IfcDuctFitting/DuctFitting" dimensions are "0.4000, 0.2000, 0.759807"
515
516 Scenario: Create a MEP bend between intersecting with different locations
517 Given an empty IFC project
518 And I create default MEP types
519 And the variable "segment_types" is "[str(e.id()) for e in {ifc}.by_type('IfcDuctSegmentType')]"
520
521 And I set "scene.BIMModelProperties.ifc_class" to "IfcDuctSegmentType"
522 And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]"
523 And I set "scene.BIMModelProperties.extrusion_depth" to "5.0"
524 And I press "bim.add_occurrence"
525 And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg1"
526
527 And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]"
528 And I press "bim.add_occurrence"
529 And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg2"
530 And the object "IfcDuctSegment/Seg2" is rotated by "0,0,90" deg
531
532 And the object "IfcDuctSegment/Seg2" is moved to "6,1,1"
533 And the object "IfcDuctSegment/Seg1" is selected
534 And additionally the object "IfcDuctSegment/Seg2" is selected
535 And I press "bim.mep_add_bend"
536
537 Then the object "IfcDuctFitting/DuctFitting" exists
538 And the object "IfcDuctFittingType/Bend" exists
539 And the object "IfcDuctSegment/Seg1" is at "0,0,1.0"
540 And the object "IfcDuctSegment/Seg1" dimensions are "0.4,0.2,5.5"
541 And the object "IfcDuctSegment/Seg2" is at "6.0,0.5,1.0"
542 And the object "IfcDuctSegment/Seg2" dimensions are "0.4,0.2,5.5"
543 And the object "IfcDuctFitting/DuctFitting" is at "6.0, 0.5, 1.0"
544 And the object "IfcDuctFitting/DuctFitting" dimensions are "0.7, 0.2, 0.7"
545
546 Scenario: Create a MEP bend between intersecting segments at the same location
547 Given an empty IFC project
548 And I create default MEP types
549 And the variable "segment_types" is "[str(e.id()) for e in {ifc}.by_type('IfcDuctSegmentType')]"
550
551 And I set "scene.BIMModelProperties.ifc_class" to "IfcDuctSegmentType"
552 And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]"
553 And I set "scene.BIMModelProperties.extrusion_depth" to "5.0"
554 And I press "bim.add_occurrence"
555 And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg1"
556
557 And I set "scene.BIMModelProperties.relating_type_id" to "{segment_types}[0]"
558 And I press "bim.add_occurrence"
559 And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/Seg2"
560 And the object "IfcDuctSegment/Seg2" is rotated by "0,0,90" deg
561
562 And the object "IfcDuctSegment/Seg1" is selected
563 And additionally the object "IfcDuctSegment/Seg2" is selected
564 And I press "bim.mep_add_bend"
565
566 Then the object "IfcDuctFitting/DuctFitting" exists
567 And the object "IfcDuctFittingType/Bend" exists
568 And the object "IfcDuctSegment/Seg1" is at "0.5,0,1.0"
569 And the object "IfcDuctSegment/Seg1" dimensions are "0.4,0.2,4.5"
570 And the object "IfcDuctSegment/Seg2" is at "0.0,0.5,1.0"
571 And the object "IfcDuctSegment/Seg2" dimensions are "0.4,0.2,4.5"
572 And the object "IfcDuctFitting/DuctFitting" is at "0.0, 0.5, 1.0"
573 And the object "IfcDuctFitting/DuctFitting" dimensions are "0.7, 0.2, 0.7"