New support for specifying collection modes. Spatial elements now support 2D representations as well.

This commit is contained in:
Dion Moult
2021-09-21 10:14:07 +10:00
parent 090aae5ff6
commit f83d13b97c
4 changed files with 323 additions and 180 deletions
@@ -216,6 +216,61 @@ class TestLoadProjectElements(test.bim.bootstrap.NewFile):
And the object "IfcWall/Wall" does not exist
"""
@test.bim.bootstrap.scenario
def test_loading_with_the_decomposition_collection_mode(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/decomposition.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.collection_mode" to "DECOMPOSITION"
And I set "scene.BIMProjectProperties.filter_mode" to "NONE"
And I press "bim.load_project_elements"
Then the object "IfcProject/My Project" is an "IfcProject"
And the object "IfcSite/My Site" is an "IfcSite"
And the object "IfcBuilding/My Building" is an "IfcBuilding"
And the object "IfcBuildingStorey/My Storey" is an "IfcBuildingStorey"
And the object "IfcSpace/Space" is an "IfcSpace"
And the object "IfcElementAssembly/Assembly" is an "IfcElementAssembly"
And the object "IfcBeam/Beam" is an "IfcBeam"
And the object "IfcSite/My Site" is in the collection "IfcSite/My Site"
And the object "IfcBuilding/My Building" is in the collection "IfcBuilding/My Building"
And the object "IfcBuildingStorey/My Storey" is in the collection "IfcBuildingStorey/My Storey"
And the object "IfcSpace/Space" is in the collection "IfcSpace/Space"
And the object "IfcElementAssembly/Assembly" is in the collection "IfcElementAssembly/Assembly"
And the object "IfcBeam/Beam" is in the collection "IfcElementAssembly/Assembly"
And the collection "IfcSite/My Site" is in the collection "IfcProject/My Project"
And the collection "IfcBuilding/My Building" is in the collection "IfcSite/My Site"
And the collection "IfcBuildingStorey/My Storey" is in the collection "IfcBuilding/My Building"
And the collection "IfcSpace/Space" is in the collection "IfcBuildingStorey/My Storey"
And the collection "IfcElementAssembly/Assembly" is in the collection "IfcSpace/Space"
And "scene.BIMProjectProperties.is_loading" is "False"
"""
@test.bim.bootstrap.scenario
def test_loading_with_the_spatial_decomposition_collection_mode(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/decomposition.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.collection_mode" to "SPATIAL_DECOMPOSITION"
And I set "scene.BIMProjectProperties.filter_mode" to "NONE"
And I press "bim.load_project_elements"
Then the object "IfcProject/My Project" is an "IfcProject"
And the object "IfcSite/My Site" is an "IfcSite"
And the object "IfcBuilding/My Building" is an "IfcBuilding"
And the object "IfcBuildingStorey/My Storey" is an "IfcBuildingStorey"
And the object "IfcSpace/Space" is an "IfcSpace"
And the object "IfcElementAssembly/Assembly" is an "IfcElementAssembly"
And the object "IfcBeam/Beam" is an "IfcBeam"
And the object "IfcSite/My Site" is in the collection "IfcSite/My Site"
And the object "IfcBuilding/My Building" is in the collection "IfcBuilding/My Building"
And the object "IfcBuildingStorey/My Storey" is in the collection "IfcBuildingStorey/My Storey"
And the object "IfcSpace/Space" is in the collection "IfcSpace/Space"
And the object "IfcElementAssembly/Assembly" is in the collection "IfcSpace/Space"
And the object "IfcBeam/Beam" is in the collection "IfcSpace/Space"
And the collection "IfcSite/My Site" is in the collection "IfcProject/My Project"
And the collection "IfcBuilding/My Building" is in the collection "IfcSite/My Site"
And the collection "IfcBuildingStorey/My Storey" is in the collection "IfcBuilding/My Building"
And the collection "IfcSpace/Space" is in the collection "IfcBuildingStorey/My Storey"
And "scene.BIMProjectProperties.is_loading" is "False"
"""
@test.bim.bootstrap.scenario
def test_manual_offset_of_object_placements(self):
return """