mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
test creating mep transition
This commit is contained in:
@@ -525,3 +525,28 @@ Scenario: Create a door, undo and create a new door
|
||||
And I press "mesh.add_door()"
|
||||
Then nothing happens
|
||||
And the object "IfcDoor/IfcDoor" exists
|
||||
|
||||
Scenario: Create a MEP transition
|
||||
Given an empty IFC project
|
||||
And I create default MEP types
|
||||
And the variable "element_types" is "[str(e.id()) for e in {ifc}.by_type('IfcDuctSegmentType')]"
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_types}[0]"
|
||||
And I press "bim.add_constr_type_instance"
|
||||
And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/RectSegment"
|
||||
|
||||
And I set "scene.BIMModelProperties.relating_type_id" to "{element_types}[1]"
|
||||
And I press "bim.add_constr_type_instance"
|
||||
And I rename the object "IfcDuctSegment/DuctSegment" to "IfcDuctSegment/CircleSegment"
|
||||
|
||||
And the object "IfcDuctSegment/RectSegment" is moved to "0,0,0"
|
||||
And the object "IfcDuctSegment/CircleSegment" is moved to "2.5,0,0"
|
||||
And the object "IfcDuctSegment/CircleSegment" is selected
|
||||
And additionally the object "IfcDuctSegment/RectSegment" is selected
|
||||
And I press "bim.mep_add_transition()"
|
||||
|
||||
Then the object "IfcDuctSegment/RectSegment" is at "0,0,0"
|
||||
And the object "IfcDuctSegment/RectSegment" dimensions are "0.4,0.2,2.370096"
|
||||
And the object "IfcDuctSegment/CircleSegment" is at "3.1299,0,0"
|
||||
And the object "IfcDuctSegment/CircleSegment" dimensions are "0.1000, 0.09927, 2.370096"
|
||||
And the object "IfcDuctFitting/DuctFitting" is at "2.370096, 0.0000, 0.0000"
|
||||
And the object "IfcDuctFitting/DuctFitting" dimensions are "0.4000, 0.2000, 0.759807"
|
||||
|
||||
@@ -108,6 +108,20 @@ def i_load_a_new_pset_template_file():
|
||||
IfcStore.pset_template_file = ifcopenshell.open(IfcStore.pset_template_path)
|
||||
|
||||
|
||||
@given("I create default MEP types")
|
||||
def i_create_default_mep_types():
|
||||
model_props = bpy.context.scene.BIMModelProperties
|
||||
|
||||
model_props.type_class = "IfcDuctSegmentType"
|
||||
model_props.type_name = "RECT1"
|
||||
model_props.type_template = "FLOW_SEGMENT_RECTANGULAR"
|
||||
bpy.ops.bim.add_type()
|
||||
|
||||
model_props.type_template = "FLOW_SEGMENT_CIRCULAR"
|
||||
model_props.type_name = "RECT2"
|
||||
bpy.ops.bim.add_type()
|
||||
|
||||
|
||||
@given("I add a cube")
|
||||
@when("I add a cube")
|
||||
def i_add_a_cube():
|
||||
|
||||
Reference in New Issue
Block a user