Files
IfcOpenShell/src/blenderbim/test/bim/feature/model.feature
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

84 lines
4.1 KiB
Gherkin
Raw Normal View History

@model
Feature: Model
Scenario: Add type instance - add from a mesh
Given an empty IFC project
And I add a cube
And the object "Cube" is selected
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
And I set "scene.BIMModelProperties.relating_type" to "{cube}"
When I press "bim.add_type_instance"
Then the object "IfcWall/Wall" exists
Scenario: Add type instance - add from an empty
Given an empty IFC project
And I add an empty
And the object "Empty" is selected
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "empty" is "{ifc}.by_type('IfcWallType')[0].id()"
And I set "scene.BIMModelProperties.relating_type" to "{empty}"
When I press "bim.add_type_instance"
Then the object "IfcWall/Wall" exists
Scenario: Add type instance - add a mesh where existing instances have changed context
Given an empty IFC project
And I add a cube
And the object "Cube" is selected
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
And I set "scene.BIMModelProperties.relating_type" to "{cube}"
And I press "bim.add_type_instance"
And the object "IfcWall/Wall" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW"
And the object "IfcWall/Wall" is selected
2022-03-15 16:53:31 +11:00
And the variable "context" is "[c for c in {ifc}.by_type('IfcGeometricRepresentationSubContext') if c.TargetView == 'PLAN_VIEW'][0].id()"
And I set "scene.BIMRootProperties.contexts" to "{context}"
And I press "bim.add_representation"
And the object "IfcWall/Wall" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW"
When I press "bim.add_type_instance"
Then the object "IfcWall/Wall" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW"
And the object "IfcWall/Wall.001" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW"
2022-07-15 01:09:08 +02:00
Scenario: Assetize one object
Given I load the demo construction library
And I set "scene.BIMModelProperties.constr_class" to "IfcBeamType"
And I set "scene.BIMModelProperties.constr_class" to "DEMO1"
When I make an asset from the selected construction type
Then the object "IfcBeam/Beam" does not exist
And the construction type "IfcBeamType"/"DEMO1" has a preview
Scenario: Assetize one class
Given I load the demo construction library
And I set "scene.BIMModelProperties.constr_class" to "IfcWallType"
When I make assets from the selected construction class
Then objects starting with "IfcWall/" do not exist
And all construction types for "IfcWallType" have a preview
Scenario: Add grid
Given an empty IFC project
When I press "mesh.add_grid"
Then the object "IfcGrid/Grid" is an "IfcGrid"
And the object "IfcGridAxis/A" is an "IfcGridAxis"
And the object "IfcGridAxis/B" is an "IfcGridAxis"
And the object "IfcGridAxis/C" is an "IfcGridAxis"
And the object "IfcGridAxis/01" is an "IfcGridAxis"
And the object "IfcGridAxis/02" is an "IfcGridAxis"
And the object "IfcGridAxis/03" is an "IfcGridAxis"
Scenario: Pie update container
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
Then the object "IfcSlab/Slab" is in the collection "IfcBuildingStorey/Ground Floor"
When the object "IfcSlab/Slab" is placed in the collection "IfcBuildingStorey/Level 1"
And I press "bim.pie_update_container"
Then nothing happens