See #2999. Reimplement basic creation of structural items.

This commit is contained in:
Dion Moult
2025-05-19 17:36:12 +10:00
parent 439f9c14ce
commit 67016d6f90
7 changed files with 194 additions and 23 deletions
@@ -1,6 +1,45 @@
@structural
Feature: Structural
Scenario: Add element - a structural point connection
Given an empty IFC project
And I trigger "Add Element"
And I set the "Name" property to "Foo"
And I set the "Definition" property to "IfcStructuralItem"
And I set the "Class" property to "IfcStructuralPointConnection"
And I set the "Representation" property to "Vertex"
When I click "OK"
And I make the collection "IfcStructuralItem" visible
And I select the object "IfcStructuralPointConnection/Foo"
And I toggle edit mode
Then the object "Item/IfcVertexPoint/69" exists
Scenario: Add element - a structural curve member
Given an empty IFC project
And I trigger "Add Element"
And I set the "Name" property to "Foo"
And I set the "Definition" property to "IfcStructuralItem"
And I set the "Class" property to "IfcStructuralCurveMember"
And I set the "Representation" property to "Edge"
When I click "OK"
And I make the collection "IfcStructuralItem" visible
And I select the object "IfcStructuralCurveMember/Foo"
And I toggle edit mode
Then the object "Item/IfcEdge/72" exists
Scenario: Add element - a structural surface member
Given an empty IFC project
And I trigger "Add Element"
And I set the "Name" property to "Foo"
And I set the "Definition" property to "IfcStructuralItem"
And I set the "Class" property to "IfcStructuralSurfaceMember"
And I set the "Representation" property to "Face"
When I click "OK"
And I make the collection "IfcStructuralItem" visible
And I select the object "IfcStructuralSurfaceMember/Foo"
And I toggle edit mode
Then the object "Item/IfcFace/74" exists
Scenario: Load structural analysis models
Given an empty IFC project
When I press "bim.load_structural_analysis_models"
+6
View File
@@ -658,6 +658,12 @@ def i_add_a_new_collection_item(collection):
assert False, "Collection does not exist"
@given(parsers.parse('I make the collection "{name}" visible'))
@when(parsers.parse('I make the collection "{name}" visible'))
def i_make_the_collection_name_visible(name):
tool.Blender.get_layer_collection(bpy.data.collections.get(name)).hide_viewport = False
@given(parsers.parse('the material "{name}" colour is set to "{colour}"'))
@when(parsers.parse('the material "{name}" colour is set to "{colour}"'))
def the_material_name_colour_is_set_to_colour(name, colour):