Debian Codegraph @

src/bonsai/test/bim/feature/root.feature

raw
1 @root
2 Feature: Root
3
4 Scenario: Add element - a type with no geometry
5 Given an empty IFC project
6 And I trigger "Add Element"
7 And I set the "Name" property to "Foo"
8 And I set the "Description" property to "Bar"
9 And I set the "Definition" property to "IfcElementType"
10 And I set the "Class" property to "IfcFurnitureType"
11 And I set the "Predefined Type" property to "SOFA"
12 And I set the "Representation" property to "No Geometry"
13 When I click "OK"
14 Then the object "IfcFurnitureType/Foo" exists
15 And the object "IfcFurnitureType/Foo" has no data
16
17 Scenario: Add element - an element with no geometry
18 Given an empty IFC project
19 And I trigger "Add Element"
20 And I set the "Definition" property to "IfcElement"
21 And I set the "Class" property to "IfcFurniture"
22 And I set the "Predefined Type" property to "SOFA"
23 And I set the "Representation" property to "Custom Extruded Solid"
24 When I click "OK"
25 And I select the object "IfcFurniture/Unnamed"
26 And I toggle edit mode
27 Then the object "Item/IfcExtrudedAreaSolid/77" exists
28
29 Scenario: Add element - an element with extrusion geometry
30 Given an empty IFC project
31 And I trigger "Add Element"
32 And I set the "Definition" property to "IfcElement"
33 And I set the "Class" property to "IfcFurniture"
34 And I set the "Predefined Type" property to "SOFA"
35 And I set the "Representation" property to "Custom Extruded Solid"
36 When I click "OK"
37 And I select the object "IfcFurniture/Unnamed"
38 And I toggle edit mode
39 Then the object "Item/IfcExtrudedAreaSolid/77" exists
40
41 Scenario: Add element - an element with custom tessellation geometry
42 Given an empty IFC project
43 And I trigger "Add Element"
44 And I set the "Definition" property to "IfcElement"
45 And I set the "Class" property to "IfcFurniture"
46 And I set the "Predefined Type" property to "SOFA"
47 And I set the "Representation" property to "Custom Tessellation"
48 When I click "OK"
49 And I select the object "IfcFurniture/Unnamed"
50 And I toggle edit mode
51 Then the object "Item/IfcPolygonalFaceSet/76" exists
52
53 Scenario: Add element - an element with tessellation geometry from an object
54 Given an empty IFC project
55 And I add a cube
56 And I trigger "Add Element"
57 And I set the "Definition" property to "IfcElement"
58 And I set the "Class" property to "IfcFurniture"
59 And I set the "Predefined Type" property to "SOFA"
60 And I set the "Representation" property to "Tessellation From Object"
61 And I set the "Object" property to "Cube"
62 When I click "OK"
63 And I select the object "IfcFurniture/Unnamed"
64 And I toggle edit mode
65 Then the object "Item/IfcPolygonalFaceSet/76" exists
66 And the object "Item/IfcPolygonalFaceSet/76" dimensions are "2,2,2"
67
68 Scenario: Reassign class
69 Given an empty IFC project
70 And I add a cube
71 And the object "Cube" is selected
72 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
73 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
74 And I press "bim.assign_class(ifc_class='IfcWall', predefined_type='SOLIDWALL')"
75 And I press "object.duplicate_move"
76 When the object "IfcWall/Cube.001" is selected
77 And I press "bim.enable_reassign_class"
78 And I set "scene.BIMRootProperties.ifc_class" to "IfcSlab"
79 And I set "scene.BIMRootProperties.ifc_predefined_type" to "BASESLAB"
80 And I press "bim.reassign_class"
81 Then the object "IfcSlab/Cube" is an "IfcSlab"
82
83 Scenario: Unlink object
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 And I press "bim.load_styles(style_type='IfcSurfaceStyle')"
91 And I press "bim.enable_adding_presentation_style"
92 And I set "scene.BIMStylesProperties.style_name" to "Style"
93 And I press "bim.add_presentation_style"
94 And the object "IfcWall/Cube" is selected
95 And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
96 And I press "bim.assign_style_to_selected(style_id={style})"
97 When I press "bim.unlink_object(obj='IfcWall/Cube')"
98 Then the object "Cube" is not an IFC element
99 And the material "Style" is an IFC style
100 And the material "Style.001" is not an IFC style
101
102 Scenario: Assign a class to a cube
103 Given an empty IFC project
104 And I add a cube
105 When the object "Cube" is selected
106 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
107 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
108 And I press "bim.assign_class"
109 Then the object "IfcWall/Cube" is an "IfcWall"
110 And the object "IfcWall/Cube" is in the collection "IfcBuildingStorey/My Storey"
111 And the object "IfcWall/Cube" has a "Tessellation" representation of "Model/Body/MODEL_VIEW"
112
113 Scenario: Assign a type class to a cube
114 Given an empty IFC project
115 And I add a cube
116 When the object "Cube" is selected
117 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
118 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
119 And I press "bim.assign_class"
120 Then the object "IfcWallType/Cube" is an "IfcWallType"
121 And the object "IfcWallType/Cube" is in the collection "IfcTypeProduct"
122 And the object "IfcWallType/Cube" has a "Tessellation" representation of "Model/Body/MODEL_VIEW"
123
124 Scenario: Assign a spatial class to a cube
125 Given an empty IFC project
126 And I add a cube
127 When the object "Cube" is selected
128 And I set "scene.BIMRootProperties.ifc_product" to "IfcSpatialElement"
129 And I set "scene.BIMRootProperties.ifc_class" to "IfcBuilding"
130 And I press "bim.assign_class"
131 Then the object "IfcBuilding/Cube" is an "IfcBuilding"
132 And the object "IfcBuilding/Cube" is in the collection "IfcBuilding/Cube"
133 And the object "IfcBuilding/Cube" has a "Tessellation" representation of "Model/Body/MODEL_VIEW"
134
135 Scenario: Assign a spatial class to a cube already in a collection
136 Given an empty IFC project
137 And I add a cube
138 And the object "Cube" is placed in the collection "IfcBuildingStorey/My Storey"
139 When the object "Cube" is selected
140 And I set "scene.BIMRootProperties.ifc_product" to "IfcSpatialElement"
141 And I set "scene.BIMRootProperties.ifc_class" to "IfcSpace"
142 And I press "bim.assign_class"
143 Then the object "IfcSpace/Cube" is an "IfcSpace"
144 And the object "IfcSpace/Cube" is in the collection "IfcSpace"
145 And the object "IfcSpace/Cube" has a "Tessellation" representation of "Model/Body/MODEL_VIEW"
146
147 Scenario: Assign a class to a cube in a collection
148 Given an empty IFC project
149 And I add a cube
150 When the object "Cube" is selected
151 And the object "Cube" is placed in the collection "IfcBuildingStorey/My Storey"
152 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
153 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
154 And I press "bim.assign_class"
155 Then the object "IfcWall/Cube" is contained in "My Storey"
156
157 Scenario: Copy a wall
158 Given an empty IFC project
159 And I add a cube
160 When the object "Cube" is selected
161 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
162 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
163 And I press "bim.assign_class"
164 And I duplicate the selected objects
165 Then the object "IfcWall/Cube" and "IfcWall/Cube.001" are different elements
166
167 Scenario: Copy a storey - when locked
168 Given an empty IFC project
169 And the object "IfcBuildingStorey/My Storey" is selected
170 Then I expect an error "Error: 'IfcBuildingStorey/My Storey' is locked. Unlock it via the Spatial panel in the Project Overview tab." when "i_duplicate_the_selected_objects()"
171 Then the object "IfcBuildingStorey/My Storey.001" does not exist
172
173 Scenario: Copy a storey - when unlocked
174 Given an empty IFC project
175 And the object "IfcBuildingStorey/My Storey" is selected
176 And I set "scene.BIMSpatialDecompositionProperties.is_locked" to "False"
177 When I duplicate the selected objects
178 Then the object "IfcBuildingStorey/My Storey" and "IfcBuildingStorey/My Storey.001" are different elements
179 And the object "IfcBuildingStorey/My Storey" is in the collection "IfcBuildingStorey/My Storey"
180 And the object "IfcBuildingStorey/My Storey.001" is in the collection "IfcBuildingStorey/My Storey.001"