mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
model and geometry module tests fixed
This commit is contained in:
committed by
Dion Moult
parent
c349523ea9
commit
1f637660d1
@@ -53,11 +53,9 @@ Scenario: Preview one type on the Construction Type Browser
|
||||
And I load the demo construction library
|
||||
When I display the construction type browser
|
||||
And I preview only one asset on the construction type browser
|
||||
And I set "scene.BIMModelProperties.ifc_class_browser" to "IfcColumnType"
|
||||
And I set "scene.BIMModelProperties.relating_type_browser" to "DEMO2"
|
||||
And I select the browser construction type
|
||||
Then "scene.BIMModelProperties.ifc_class" is "IfcColumnType"
|
||||
And construction type is DEMO2
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcColumnType"
|
||||
And I set "scene.BIMModelProperties.relating_type" to "DEMO2"
|
||||
Then construction type is DEMO2
|
||||
And objects starting with "IfcColumn/" do not exist
|
||||
And the construction type "IfcColumnType"/"DEMO2" has a preview
|
||||
|
||||
@@ -66,8 +64,8 @@ Scenario: Preview one class on the construction type browser
|
||||
And I load the demo construction library
|
||||
When I display the construction type browser
|
||||
And I preview all available assets on the construction type browser
|
||||
And I set "scene.BIMModelProperties.ifc_class_browser" to "IfcWallType"
|
||||
Then "scene.BIMModelProperties.ifc_class_browser" is "IfcWallType"
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
|
||||
Then "scene.BIMModelProperties.ifc_class" is "IfcWallType"
|
||||
And objects starting with "IfcWall/" do not exist
|
||||
And all construction types for "IfcWallType" have a preview
|
||||
|
||||
@@ -76,9 +74,9 @@ Scenario: Add one type from the Construction Type Browser
|
||||
And I load the demo construction library
|
||||
When I display the construction type browser
|
||||
And I preview only one asset on the construction type browser
|
||||
And I set "scene.BIMModelProperties.ifc_class_browser" to "IfcColumnType"
|
||||
And I set "scene.BIMModelProperties.relating_type_browser" to "DEMO2"
|
||||
And I add the browser construction type
|
||||
And I set "scene.BIMModelProperties.ifc_class" to "IfcColumnType"
|
||||
And I set "scene.BIMModelProperties.relating_type" to "DEMO2"
|
||||
And I add the construction type
|
||||
Then the object "IfcColumn/Column" exists
|
||||
|
||||
Scenario: Add grid
|
||||
|
||||
@@ -626,7 +626,7 @@ def i_add_a_construction_library():
|
||||
@given("I display the construction type browser")
|
||||
@when("I display the construction type browser")
|
||||
def i_display_the_construction_type_browser():
|
||||
bpy.ops.bim.display_relating_types("INVOKE_DEFAULT")
|
||||
bpy.ops.bim.display_constr_types("INVOKE_DEFAULT")
|
||||
|
||||
|
||||
@given("I preview only one asset on the construction type browser")
|
||||
@@ -641,32 +641,12 @@ def i_preview_all_construction_types():
|
||||
bpy.context.scene.BIMModelProperties.unfold_relating_types = True
|
||||
|
||||
|
||||
@given("I select the browser construction type")
|
||||
@when("I select the browser construction type")
|
||||
def i_select_the_active_construction_type():
|
||||
props = bpy.context.scene.BIMModelProperties
|
||||
bpy.ops.bim.select_construction_type(
|
||||
ifc_class=props.ifc_class_browser, relating_type_id=props.relating_type_id_browser
|
||||
)
|
||||
|
||||
|
||||
@given("I add the browser construction type")
|
||||
@when("I add the browser construction type")
|
||||
@given("I add the construction type")
|
||||
@when("I add the construction type")
|
||||
def i_add_the_active_construction_type():
|
||||
props = bpy.context.scene.BIMModelProperties
|
||||
bpy.ops.bim.add_constr_type_instance(
|
||||
ifc_class=props.ifc_class_browser, relating_type_id=int(props.relating_type_id_browser)
|
||||
)
|
||||
|
||||
|
||||
@then(parsers.parse("browser construction type is {relating_type_name}"))
|
||||
def browser_construction_type(relating_type_name):
|
||||
props = bpy.context.scene.BIMModelProperties
|
||||
relating_type_browser = AuthoringData.relating_type_name_by_id(
|
||||
props.ifc_class_browser, props.relating_type_id_browser
|
||||
)
|
||||
assert relating_type_browser == relating_type_name, (
|
||||
f"Construction Type is a {relating_type_browser}, not " + f"a {relating_type_name}"
|
||||
ifc_class=props.ifc_class, relating_type_id=int(props.relating_type_id)
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user