Debian Codegraph @

src/bonsai/test/bim/feature/void.feature

raw
1 @void
2 Feature: Void
3 Covers voids and fillings.
4
5 Scenario: Add an opening
6 Given an empty IFC project
7 And I add a cube
8 And the object "Cube" is selected
9 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
10 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
11 And I press "bim.assign_class"
12 And I add a cube
13 And the object "IfcWall/Cube" is selected
14 And additionally the object "Cube" is selected
15 When I press "bim.add_opening"
16 Then the object "Cube" does not exist
17 And the object "IfcWall/Cube" is voided by "Cube"
18
19 Scenario: Add an opening using the BIM tool
20 Given an empty IFC project
21 And I add a cube
22 And the object "Cube" is selected
23 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
24 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
25 And I press "bim.assign_class"
26 And I press "bim.add_potential_opening"
27 And the object "Opening" is selected
28 And additionally the object "IfcWall/Cube" is selected
29 When I press "bim.add_opening"
30 Then the object "Opening" does not exist
31 And the object "IfcWall/Cube" is voided by "Opening"
32
33 Scenario: Show openings
34 Given an empty IFC project
35 And I add a cube
36 And the object "Cube" is selected
37 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
38 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
39 And I press "bim.assign_class"
40 And I press "bim.add_potential_opening"
41 And the object "Opening" is selected
42 And additionally the object "IfcWall/Cube" is selected
43 And I press "bim.add_opening"
44 And the object "IfcWall/Cube" is selected
45 When I press "bim.show_openings"
46 Then the object "IfcOpeningElement/Opening" is an "IfcOpeningElement"
47 And the object "IfcWall/Cube" is voided by "Opening"
48
49 Scenario: Hide openings
50 Given an empty IFC project
51 And I add a cube
52 And the object "Cube" is selected
53 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
54 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
55 And I press "bim.assign_class"
56 And I press "bim.add_potential_opening"
57 And the object "Opening" is selected
58 And additionally the object "IfcWall/Cube" is selected
59 And I press "bim.add_opening"
60 And the object "IfcWall/Cube" is selected
61 And I press "bim.show_openings"
62 When I press "bim.hide_openings"
63 Then the object "IfcOpeningElement/Opening" does not exist
64
65 Scenario: Edit openings
66 Given an empty IFC project
67 And I add a cube
68 And the object "Cube" is selected
69 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
70 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
71 And I press "bim.assign_class"
72 And I press "bim.add_potential_opening"
73 And the object "Opening" is selected
74 And additionally the object "IfcWall/Cube" is selected
75 And I press "bim.add_opening"
76 And the object "IfcWall/Cube" is selected
77 And I press "bim.show_openings"
78 When the object "IfcOpeningElement/Opening" is moved to "1,0,0"
79 And I press "bim.edit_openings"
80 Then the object "IfcOpeningElement/Opening" does not exist
81 And the object "IfcWall/Cube" is voided by "Opening"
82
83 Scenario: Add an opening to Element B with a void that already voids Element A
84 Given an empty IFC project
85 And I add a cube
86 And the object "Cube" is selected
87 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
88 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
89 And I press "bim.assign_class"
90
91 And I add a cube
92 And the object "Cube" is selected
93 And I press "bim.assign_class"
94
95 And I press "bim.add_potential_opening"
96 And the object "Opening" is selected
97 And additionally the object "IfcWall/Cube" is selected
98 And I press "bim.add_opening"
99
100 And the object "IfcWall/Cube" is selected
101 And I press "bim.show_openings"
102
103 When the object "IfcOpeningElement/Opening" is selected
104 And additionally the object "IfcWall/Cube.001" is selected
105 And I press "bim.add_opening"
106
107 Then the object "IfcWall/Cube" is not voided by "Opening"
108 And the object "IfcWall/Cube.001" is voided by "Opening"
109
110 Scenario: Remove opening
111 Given an empty IFC project
112 And I add a cube
113 And the object "Cube" is selected
114 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
115 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
116 And I press "bim.assign_class"
117 And I press "bim.add_potential_opening"
118 And the object "Opening" is selected
119 And additionally the object "IfcWall/Cube" is selected
120 And I press "bim.add_opening"
121 And the object "IfcWall/Cube" is selected
122 And I press "bim.show_openings"
123 When the object "IfcOpeningElement/Opening" is selected
124 And the variable "opening_id" is "IfcStore.get_file().by_type('IfcOpeningElement')[0].id()"
125 And I press "bim.remove_opening(opening_id={opening_id})"
126 Then the object "Opening" is not an IFC element
127 And the object "IfcWall/Cube" is not voided by "Opening"
128
129 Scenario: Remove opening - using deletion
130 Given an empty IFC project
131 And I add a cube
132 And the object "Cube" is selected
133 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
134 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
135 And I press "bim.assign_class"
136 And I press "bim.add_potential_opening"
137 And the object "Opening" is selected
138 And additionally the object "IfcWall/Cube" is selected
139 And I press "bim.add_opening"
140 And the object "IfcWall/Cube" is selected
141 And I press "bim.show_openings"
142 When the object "IfcOpeningElement/Opening" is selected
143 And I delete the selected objects
144 Then the object "Opening" does not exist
145 And the object "IfcWall/Cube" is not voided by "Opening"
146
147 Scenario: Remove opening - indirectly by deleting its building element
148 Given an empty IFC project
149 And I add a cube
150 And the object "Cube" is selected
151 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
152 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
153 And I press "bim.assign_class"
154 And I press "bim.add_potential_opening"
155 And the object "Opening" is selected
156 And additionally the object "IfcWall/Cube" is selected
157 And I press "bim.add_opening"
158 And the object "IfcWall/Cube" is selected
159 And I press "bim.show_openings"
160 When the object "IfcWall/Cube" is selected
161 And I delete the selected objects
162 Then the object "Opening" is not an IFC element