New interface to view linked IFCs

This commit is contained in:
Dion Moult
2021-09-13 10:00:54 +10:00
parent 8aa790c1c1
commit 5cee2fb08a
9 changed files with 87 additions and 37 deletions
+1
View File
@@ -261,6 +261,7 @@ definitions = {
'"(.*)" is "(.*)"': prop_is_value,
'I enable "(.*)"': i_enable_prop,
'I press "(.*)"': i_press_operator,
'the object "(.*)" exists': the_object_name_exists,
'the object "(.*)" does not exist': the_object_name_does_not_exist,
'the object "(.*)" is an "(.*)"': the_object_name_is_an_ifc_class,
'the object "(.*)" is not an IFC element': the_object_name_is_not_an_ifc_element,
@@ -137,6 +137,8 @@ class TestLoadProjectElements(test.bim.bootstrap.NewFile):
And I set "scene.BIMProjectProperties.filter_mode" to "IFC_CLASS"
Then "scene.BIMProjectProperties.filter_categories['IfcWall'].total_elements" is "1"
And "scene.BIMProjectProperties.filter_categories['IfcSlab'].total_elements" is "1"
And "scene.BIMProjectProperties.filter_categories['IfcElementAssembly'].total_elements" is "1"
And "scene.BIMProjectProperties.filter_categories['IfcBeam'].total_elements" is "1"
When I set "scene.BIMProjectProperties.filter_categories['IfcSlab'].is_selected" to "True"
And I press "bim.load_project_elements"
Then the object "IfcProject/My Project" is an "IfcProject"
@@ -234,3 +236,19 @@ class TestUnloadProject(test.bim.bootstrap.NewFile):
Then an IFC file does not exist
And "scene.BIMProjectProperties.is_loading" is "False"
"""
class TestLinkIFC(test.bim.bootstrap.NewFile):
@test.bim.bootstrap.scenario
def test_linking_an_ifc(self):
return """
Given I press "bim.create_project"
When I press "bim.link_ifc(filepath='{cwd}/test/files/basic.blend')"
Then "scene.BIMProjectProperties.links['{cwd}/test/files/basic.blend'].is_loaded" is "True"
And the object "IfcWall/Wall" exists
And the object "IfcSlab/Slab" exists
And the object "IfcElementAssembly/Empty" exists
And the object "IfcBeam/Beam" exists
And the object "IfcBuildingStorey/Ground Floor" exists
And the object "IfcBuildingStorey/Level 1" exists
"""