mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
See #1227. Reimplement extending walls to another wall
This commit is contained in:
@@ -453,14 +453,14 @@ Scenario: Override duplicate move - copying walls with mitre joint
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the cursor is at "0.5,0,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall.001" is selected
|
||||
And additionally the object "IfcWall/Wall" is selected
|
||||
When I press "bim.hotkey(hotkey='S_Y')"
|
||||
Then the object "IfcWall/Wall" dimensions are "0.5,0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
|
||||
When I press "bim.hotkey(hotkey='S_T')"
|
||||
Then the object "IfcWall/Wall" dimensions are "0.6,0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
|
||||
And the object "IfcWall/Wall.001" dimensions are "1.1,0.1,3"
|
||||
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0.1,0"
|
||||
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
|
||||
@@ -549,10 +549,11 @@ Scenario: Refresh linked aggregate
|
||||
When I deselect all objects
|
||||
And the object "IfcWall/Wall_01.001" is selected
|
||||
When the object layer length is set to "3"
|
||||
Then the object "IfcWall/Wall_01.001" dimensions are "3,0.1,3"
|
||||
# Extra 0.1 due to mitre
|
||||
Then the object "IfcWall/Wall_01.001" dimensions are "3.1,0.1,3"
|
||||
When I refresh linked aggregate the selected object
|
||||
Then the object "IfcWall/Wall_01" exists
|
||||
And the object "IfcWall/Wall_01" dimensions are "3,0.1,3"
|
||||
And the object "IfcWall/Wall_01" dimensions are "3.1,0.1,3"
|
||||
|
||||
Scenario: Refresh linked aggregate - after deleting an object
|
||||
Given I load the IFC test file "/test/files/linked-aggregates.ifc"
|
||||
|
||||
@@ -83,7 +83,7 @@ Scenario: Extend a wall to the cursor
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
And the cursor is at "2,0,0"
|
||||
When I press "bim.hotkey(hotkey='S_E')"
|
||||
@@ -96,9 +96,9 @@ Scenario: Add a wall perpendicular to an existing wall
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the cursor is at "0.5,0,0"
|
||||
When I press "bim.hotkey(hotkey='S_A')"
|
||||
When I press "bim.add_occurrence"
|
||||
Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
|
||||
And the object "IfcWall/Wall.001" dimensions are "1,0.1,3"
|
||||
@@ -111,9 +111,9 @@ Scenario: Extend one wall to another
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the cursor is at "0.5,0,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall.001" is moved to "0.5,-1,0"
|
||||
And the object "IfcWall/Wall.001" is selected
|
||||
And additionally the object "IfcWall/Wall" is selected
|
||||
@@ -124,59 +124,23 @@ Scenario: Extend one wall to another
|
||||
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
|
||||
And the object "IfcWall/Wall.001" top right corner is at "0.6,-2,3"
|
||||
|
||||
Scenario: Join two walls with a butt joint - first wall has priority
|
||||
Given an empty IFC project
|
||||
And I load the demo construction library
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And the cursor is at "0.5,0,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And the object "IfcWall/Wall.001" is selected
|
||||
And additionally the object "IfcWall/Wall" is selected
|
||||
When I press "bim.hotkey(hotkey='S_T')"
|
||||
Then the object "IfcWall/Wall" dimensions are "0.4,0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "0.6,0,0"
|
||||
And the object "IfcWall/Wall.001" dimensions are "1.1,0.1,3"
|
||||
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0.1,0"
|
||||
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
|
||||
|
||||
Scenario: Join two walls with a butt joint - second wall has priority
|
||||
Given an empty IFC project
|
||||
And I load the demo construction library
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And the cursor is at "0.5,0,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
And additionally the object "IfcWall/Wall.001" is selected
|
||||
When I press "bim.hotkey(hotkey='S_T')"
|
||||
Then the object "IfcWall/Wall" dimensions are "0.5,0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
|
||||
And the object "IfcWall/Wall.001" dimensions are "1,0.1,3"
|
||||
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
|
||||
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
|
||||
|
||||
Scenario: Join two walls with a mitre joint
|
||||
Given an empty IFC project
|
||||
And I load the demo construction library
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And the cursor is at "0.5,0,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the cursor is at "0.7,0,0"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall.001" is selected
|
||||
And additionally the object "IfcWall/Wall" is selected
|
||||
When I press "bim.hotkey(hotkey='S_Y')"
|
||||
Then the object "IfcWall/Wall" dimensions are "0.5,0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
|
||||
When I press "bim.hotkey(hotkey='S_T')"
|
||||
Then the object "IfcWall/Wall" dimensions are "0.8,0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "0.0,0,0"
|
||||
And the object "IfcWall/Wall.001" dimensions are "1.1,0.1,3"
|
||||
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0.1,0"
|
||||
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
|
||||
And the object "IfcWall/Wall.001" bottom left corner is at "0.7,0.1,0"
|
||||
And the object "IfcWall/Wall.001" top right corner is at "0.8,-1,3"
|
||||
|
||||
Scenario: Change the height of a wall
|
||||
Given an empty IFC project
|
||||
@@ -184,7 +148,7 @@ Scenario: Change the height of a wall
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
And I set "scene.BIMModelProperties.extrusion_depth" to "2.0"
|
||||
When I press "bim.change_extrusion_depth(depth=2.0)"
|
||||
@@ -196,7 +160,7 @@ Scenario: Change the length of a wall
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
And I set "scene.BIMModelProperties.length" to "2.0"
|
||||
When I press "bim.change_layer_length(length=2.0)"
|
||||
@@ -208,12 +172,12 @@ Scenario: Flip a wall
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
When I press "bim.hotkey(hotkey='S_F')"
|
||||
Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "1,0,0"
|
||||
And the object "IfcWall/Wall" top right corner is at "0,-0.1,3"
|
||||
And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
|
||||
And the object "IfcWall/Wall" top right corner is at "1,0.1,3"
|
||||
|
||||
Scenario: Split a wall
|
||||
Given an empty IFC project
|
||||
@@ -221,7 +185,7 @@ Scenario: Split a wall
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
And the cursor is at "0.5,0,0"
|
||||
When I press "bim.hotkey(hotkey='S_K')"
|
||||
@@ -240,7 +204,7 @@ Scenario: Rotate a wall by 90 degrees
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
When I press "bim.hotkey(hotkey='S_R')"
|
||||
Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
|
||||
@@ -253,7 +217,7 @@ Scenario: Regenerate a wall - after doing nothing interesting
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
When I press "bim.hotkey(hotkey='S_G')"
|
||||
Then the object "IfcWall/Wall" is an "IfcWall"
|
||||
@@ -266,11 +230,11 @@ Scenario: Add a slab
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcSlabType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcSlabType') if e.Name == 'FLR200'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
When I press "bim.hotkey(hotkey='S_A')"
|
||||
When I press "bim.add_occurrence"
|
||||
Then the object "IfcSlab/Slab" is an "IfcSlab"
|
||||
And the object "IfcSlab/Slab" dimensions are "1,1,0.2"
|
||||
And the object "IfcSlab/Slab" bottom left corner is at "0,0,-0.2"
|
||||
And the object "IfcSlab/Slab" top right corner is at "1,1,0"
|
||||
And the object "IfcSlab/Slab" bottom left corner is at "0,0,0"
|
||||
And the object "IfcSlab/Slab" top right corner is at "1,1,0.2"
|
||||
|
||||
Scenario: Enable editing a slab profile
|
||||
Given an empty IFC project
|
||||
@@ -278,12 +242,12 @@ Scenario: Enable editing a slab profile
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcSlabType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcSlabType') if e.Name == 'FLR200'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcSlab/Slab" is selected
|
||||
When I press "bim.hotkey(hotkey='S_E')"
|
||||
Then the object "IfcSlab/Slab" dimensions are "1,1,0"
|
||||
And the object "IfcSlab/Slab" bottom left corner is at "0,0,-0.2"
|
||||
And the object "IfcSlab/Slab" top right corner is at "1,1,-0.2"
|
||||
And the object "IfcSlab/Slab" bottom left corner is at "0,0,0"
|
||||
And the object "IfcSlab/Slab" top right corner is at "1,1,0"
|
||||
|
||||
Scenario: Disable editing a slab profile
|
||||
Given an empty IFC project
|
||||
@@ -291,13 +255,13 @@ Scenario: Disable editing a slab profile
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcSlabType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcSlabType') if e.Name == 'FLR200'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcSlab/Slab" is selected
|
||||
And I press "bim.hotkey(hotkey='S_E')"
|
||||
When I press "bim.disable_editing_extrusion_profile"
|
||||
Then the object "IfcSlab/Slab" dimensions are "1,1,0.2"
|
||||
And the object "IfcSlab/Slab" bottom left corner is at "0,0,-0.2"
|
||||
And the object "IfcSlab/Slab" top right corner is at "1,1,0"
|
||||
And the object "IfcSlab/Slab" bottom left corner is at "0,0,0"
|
||||
And the object "IfcSlab/Slab" top right corner is at "1,1,0.2"
|
||||
|
||||
Scenario: Edit a slab profile
|
||||
Given an empty IFC project
|
||||
@@ -305,13 +269,13 @@ Scenario: Edit a slab profile
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcSlabType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcSlabType') if e.Name == 'FLR200'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcSlab/Slab" is selected
|
||||
And I press "bim.hotkey(hotkey='S_E')"
|
||||
When I press "bim.edit_extrusion_profile"
|
||||
Then the object "IfcSlab/Slab" dimensions are "1,1,0.2"
|
||||
And the object "IfcSlab/Slab" bottom left corner is at "0,0,-0.2"
|
||||
And the object "IfcSlab/Slab" top right corner is at "1,1,0"
|
||||
And the object "IfcSlab/Slab" bottom left corner is at "0,0,0"
|
||||
And the object "IfcSlab/Slab" top right corner is at "1,1,0.2"
|
||||
|
||||
Scenario: Add a beam
|
||||
Given an empty IFC project
|
||||
@@ -319,7 +283,7 @@ Scenario: Add a beam
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
When I press "bim.hotkey(hotkey='S_A')"
|
||||
When I press "bim.add_occurrence"
|
||||
Then the object "IfcBeam/Beam" is an "IfcBeam"
|
||||
And the object "IfcBeam/Beam" dimensions are "0.1,0.2,3"
|
||||
And the object "IfcBeam/Beam" bottom left corner is at "0,-0.05,-0.1"
|
||||
@@ -331,7 +295,7 @@ Scenario: Extend a beam to the cursor
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcBeam/Beam" is selected
|
||||
And the cursor is at "2,0,0"
|
||||
When I press "bim.hotkey(hotkey='S_E')"
|
||||
@@ -344,9 +308,9 @@ Scenario: Extend one beam to another
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the cursor is at "1,1,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcBeam/Beam.001" is selected
|
||||
And I press "bim.hotkey(hotkey='S_R')"
|
||||
And the object "IfcBeam/Beam.001" is selected
|
||||
@@ -365,9 +329,9 @@ Scenario: Join two beams with a butt joint - first beam has priority
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the cursor is at "1,1,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcBeam/Beam.001" is selected
|
||||
And I press "bim.hotkey(hotkey='S_R')"
|
||||
And the object "IfcBeam/Beam.001" is selected
|
||||
@@ -386,9 +350,9 @@ Scenario: Join two beams with a butt joint - second beam has priority
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the cursor is at "1,1,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcBeam/Beam.001" is selected
|
||||
And I press "bim.hotkey(hotkey='S_R')"
|
||||
And the object "IfcBeam/Beam" is selected
|
||||
@@ -407,9 +371,9 @@ Scenario: Join two beams with a mitre joint
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the cursor is at "1,1,0"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcBeam/Beam.001" is selected
|
||||
And I press "bim.hotkey(hotkey='S_R')"
|
||||
And the object "IfcBeam/Beam" is selected
|
||||
@@ -428,7 +392,7 @@ Scenario: Change the length of a beam
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcBeam/Beam" is selected
|
||||
And I set "scene.BIMModelProperties.extrusion_depth" to "2.0"
|
||||
When I press "bim.change_profile_depth(depth=2.0)"
|
||||
@@ -440,7 +404,7 @@ Scenario: Rotate a beam by 90 degrees
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcBeam/Beam" is selected
|
||||
When I press "bim.hotkey(hotkey='S_R')"
|
||||
Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,3"
|
||||
@@ -453,7 +417,7 @@ Scenario: Regenerate a beam - after doing nothing interesting
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcBeamType"
|
||||
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcBeamType') if e.Name == 'B1'][0].id()"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcBeam/Beam" is selected
|
||||
When I press "bim.hotkey(hotkey='S_G')"
|
||||
Then the object "IfcBeam/Beam" dimensions are "0.1,0.2,3"
|
||||
@@ -464,13 +428,13 @@ Scenario: Undo test - create a wall and couple windows and undo the last window
|
||||
Given an empty IFC project
|
||||
And I load the demo construction library
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWindowType"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And I prepare to undo
|
||||
And the object "IfcWall/Wall" is selected
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWindowType"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And I undo
|
||||
Then nothing happens
|
||||
|
||||
@@ -478,9 +442,9 @@ Scenario: Undo test - create a wall with window opening, flip it and undo
|
||||
Given an empty IFC project
|
||||
And I load the demo construction library
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWindowType"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I press "bim.add_occurrence"
|
||||
And the object "IfcWall/Wall" is selected
|
||||
And I prepare to undo
|
||||
And I press "bim.hotkey(hotkey='S_F')"
|
||||
@@ -489,22 +453,24 @@ Scenario: Undo test - create a wall with window opening, flip it and undo
|
||||
|
||||
Scenario: Create window type based on window modifier, add an occurrence of it and edit it
|
||||
Given an empty IFC project
|
||||
And I set "scene.BIMModelProperties.type_class" to "IfcWindowType"
|
||||
And I set "scene.BIMModelProperties.type_predefined_type" to "WINDOW"
|
||||
And I set "scene.BIMModelProperties.type_template" to "WINDOW"
|
||||
And I press "bim.add_type()"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I trigger "Add Element"
|
||||
And I set the "Class" property to "IfcWindowType"
|
||||
And I set the "Predefined Type" property to "WINDOW"
|
||||
And I set the "Representation" property to "Window"
|
||||
When I click "OK"
|
||||
And I press "bim.add_occurrence"
|
||||
And I press "bim.enable_editing_window()"
|
||||
And I press "bim.finish_editing_window()"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Create door type based on door modifier, add an occurrence of it and edit it
|
||||
Given an empty IFC project
|
||||
And I set "scene.BIMModelProperties.type_class" to "IfcDoorType"
|
||||
And I set "scene.BIMModelProperties.type_predefined_type" to "DOOR"
|
||||
And I set "scene.BIMModelProperties.type_template" to "DOOR"
|
||||
And I press "bim.add_type()"
|
||||
And I press "bim.hotkey(hotkey='S_A')"
|
||||
And I trigger "Add Element"
|
||||
And I set the "Class" property to "IfcDoorType"
|
||||
And I set the "Predefined Type" property to "DOOR"
|
||||
And I set the "Representation" property to "Door"
|
||||
When I click "OK"
|
||||
And I press "bim.add_occurrence"
|
||||
And I press "bim.enable_editing_door()"
|
||||
And I press "bim.finish_editing_door()"
|
||||
Then nothing happens
|
||||
|
||||
@@ -1228,7 +1228,7 @@ def the_object_name_dimensions_are_dimensions(name, dimensions):
|
||||
actual_dimensions = list(the_object_name_exists(name).dimensions)
|
||||
expected_dimensions = [float(co) for co in dimensions.split(",")]
|
||||
for i, number in enumerate(actual_dimensions):
|
||||
assert is_x(number, expected_dimensions[i]), f"Expected {expected_dimensions[i]} but got {number}"
|
||||
assert is_x(number, expected_dimensions[i]), f"Expected {expected_dimensions} but got {actual_dimensions}"
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name}" top right corner is at "{location}"'))
|
||||
@@ -1237,7 +1237,7 @@ def the_object_name_top_right_corner_is_at_location(name, location):
|
||||
obj_corner = obj.matrix_world @ Vector(obj.bound_box[6])
|
||||
assert (
|
||||
obj_corner - Vector([float(co) for co in location.split(",")])
|
||||
).length < 0.1, f"Object has top right corner {obj_corner}"
|
||||
).length < 0.1, f"Object has top right corner {obj_corner} instead of {location}"
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name}" bottom left corner is at "{location}"'))
|
||||
@@ -1246,7 +1246,7 @@ def the_object_name_bottom_left_corner_is_at_location(name, location):
|
||||
obj_corner = obj.matrix_world @ Vector(obj.bound_box[0])
|
||||
assert (
|
||||
obj_corner - Vector([float(co) for co in location.split(",")])
|
||||
).length < 0.1, f"Object has bottom left corner {obj_corner}"
|
||||
).length < 0.1, f"Object has bottom left corner {obj_corner} instead of {location}"
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name}" is contained in "{container_name}"'))
|
||||
@@ -1305,7 +1305,7 @@ def the_object_name_has_no_modifiers(name):
|
||||
@given(parsers.parse('I load the IFC test file "{filepath}"'))
|
||||
def i_load_the_ifc_test_file(filepath):
|
||||
filepath = f"{variables['cwd']}{filepath}"
|
||||
bpy.ops.bim.load_project(filepath=filepath, use_relative_path=True)
|
||||
bpy.ops.bim.load_project(filepath=filepath)
|
||||
|
||||
|
||||
@given("I load the demo construction library")
|
||||
@@ -1370,10 +1370,11 @@ def prepare_undo():
|
||||
@when(parsers.parse("I undo"))
|
||||
@then(parsers.parse("I undo"))
|
||||
def hit_undo():
|
||||
# bpy.ops.ed.undo_push(message="UNDO STEP")
|
||||
override = tool.Blender.get_viewport_context()
|
||||
with bpy.context.temp_override(**override):
|
||||
bpy.ops.ed.undo()
|
||||
bpy.ops.ed.undo_push(message="UNDO STEP")
|
||||
bpy.ops.ed.undo()
|
||||
# override = tool.Blender.get_viewport_context()
|
||||
# with bpy.context.temp_override(**override):
|
||||
# bpy.ops.ed.undo()
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{obj_name1}" has a connection with "{obj_name2}"'))
|
||||
@@ -1431,9 +1432,6 @@ def the_obj_layer_lenght_is_set_to(value):
|
||||
eval("bpy.context.scene.BIMModelProperties.length")
|
||||
except:
|
||||
assert False, f"Property BIMModelProperties.length does not exist when trying to set to value {value}"
|
||||
|
||||
print(50 * "@", bpy.context.selected_objects)
|
||||
|
||||
props = tool.Model.get_model_props()
|
||||
props.length = value
|
||||
bpy.ops.bim.change_layer_length(length=value)
|
||||
|
||||
Reference in New Issue
Block a user