Add georeferencing integration tests

This commit is contained in:
Dion Moult
2024-06-30 17:01:39 +10:00
parent 2efeb6edb3
commit 4e9f2ea4b2
3 changed files with 367 additions and 10 deletions
@@ -52,12 +52,6 @@ Scenario: Get cursor location
When I press "bim.get_cursor_location"
Then nothing happens
Scenario: Set cursor location
Given an empty IFC project
When I set "scene.BIMGeoreferenceProperties.coordinate_output" to "0,0,0"
And I press "bim.set_cursor_location"
Then nothing happens
Scenario: Set IFC true north
Given an empty IFC project
When I press "bim.set_ifc_true_north"
@@ -71,12 +65,12 @@ Scenario: Set Blender true north
Scenario: Convert local to global
Given an empty IFC project
When I set "scene.BIMGeoreferenceProperties.coordinate_input" to "0,0,0"
When I set "scene.BIMGeoreferenceProperties.local_coordinates" to "0,0,0"
And I press "bim.convert_local_to_global"
Then "scene.BIMGeoreferenceProperties.coordinate_output" is "0.0,0.0,0.0"
Then "scene.BIMGeoreferenceProperties.map_coordinates" is "0.0,0.0,0.0"
Scenario: Convert global to local
Given an empty IFC project
When I set "scene.BIMGeoreferenceProperties.coordinate_input" to "0,0,0"
When I set "scene.BIMGeoreferenceProperties.map_coordinates" to "0,0,0"
And I press "bim.convert_global_to_local"
Then "scene.BIMGeoreferenceProperties.coordinate_output" is "0.0,0.0,0.0"
Then "scene.BIMGeoreferenceProperties.local_coordinates" is "0.0,0.0,0.0"
@@ -313,6 +313,358 @@ Scenario: Load project elements - auto offset of cartesian points
When I press "bim.load_project(filepath='{cwd}/test/files/manual-geolocation-coords.ifc')"
Then the object "IfcBuildingElementProxy/NAME" is at "0,0,0"
Scenario: Load project elements - all georeferencing coordinate situations - disabled false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "DISABLED"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "False"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "7,3,0"
And the object "IfcActuator/B" is at "6,1,0"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "13,4,-1"
And the object "IfcActuator/E" is at "6,3,0"
And the object "IfcActuator/F" is at "3,3,0"
And the object "IfcActuator/G" is at "15,6,-1"
And the object "IfcActuator/H" is at "9,2,0"
And the object "IfcActuator/I" is at "3,3,0"
And the object "IfcActuator/J" is at "11,3,-1"
And the object "IfcActuator/K" is at "10,0,0"
Scenario: Load project elements - all georeferencing coordinate situations - automatic false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "AUTOMATIC"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "True"
And "scene.BIMGeoreferenceProperties.blender_eastings" is "13000.0"
And "scene.BIMGeoreferenceProperties.blender_northings" is "4000.0"
And "scene.BIMGeoreferenceProperties.blender_orthogonal_height" is "-1000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_x" is "13000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_y" is "4000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_z" is "-1000.0"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "-6,-1,1"
And the object "IfcActuator/B" is at "-7,-3,1"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "0,0,0"
And the object "IfcActuator/E" is at "-7,-1,1"
And the object "IfcActuator/F" is at "-10,-1,1"
And the object "IfcActuator/G" is at "2,2,0"
And the object "IfcActuator/H" is at "-4,-2,1"
And the object "IfcActuator/I" is at "-10,-1,1"
And the object "IfcActuator/J" is at "-2,-1,0"
And the object "IfcActuator/K" is at "-3,-4,1"
Scenario: Load project elements - all georeferencing coordinate situations - manual false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "MANUAL"
When I set "scene.BIMProjectProperties.false_origin" to "10000,0,0"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "True"
And "scene.BIMGeoreferenceProperties.blender_eastings" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_northings" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_orthogonal_height" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_x" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_y" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_z" is "0.0"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "-3,3,0"
And the object "IfcActuator/B" is at "-4,1,0"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "3,4,-1"
And the object "IfcActuator/E" is at "-4,3,0"
And the object "IfcActuator/F" is at "-7,3,0"
And the object "IfcActuator/G" is at "5,6,-1"
And the object "IfcActuator/H" is at "-1,2,0"
And the object "IfcActuator/I" is at "-7,3,0"
And the object "IfcActuator/J" is at "1,3,-1"
And the object "IfcActuator/K" is at "0,0,0"
And the object "IfcActuator/D" has a cartesian point offset of "31,4,-1"
And the object "IfcActuator/G" has a cartesian point offset of "-25,6,-1"
And the object "IfcActuator/J" has a cartesian point offset of "11,3,-1"
And the object "IfcActuator/D" has a vertex at "3,2,-1"
And the object "IfcActuator/D" has a vertex at "5,2,-1"
And the object "IfcActuator/G" has a vertex at "5,4,-1"
And the object "IfcActuator/G" has a vertex at "7,4,-1"
And the object "IfcActuator/J" has a vertex at "1,1,-1"
And the object "IfcActuator/J" has a vertex at "3,1,-1"
Scenario: Load project elements - all georeferencing coordinate situations with an offset site - disabled false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-offsetsite.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "DISABLED"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "False"
And the object "IfcSite/My Site" is at "0,10,0"
And the object "IfcBuilding/My Building" is at "0,10,0"
And the object "IfcBuildingStorey/My Storey" is at "0,10,0"
And the object "IfcActuator/A" is at "5.985,14.71,0"
And the object "IfcActuator/B" is at "5.5367,12.519,0"
And the object "IfcActuator/C" is at "0,10,0"
And the object "IfcActuator/D" is at "11.522,17.228,-1"
And the object "IfcActuator/E" is at "5.0191,14.451,0"
And the object "IfcActuator/F" is at "2.1213,13.674,0"
And the object "IfcActuator/G" is at "12.936,19.678,-1"
And the object "IfcActuator/H" is at "8.1757,14.261,0"
And the object "IfcActuator/I" is at "2.1213,13.674,0"
And the object "IfcActuator/J" is at "9.8487,15.745,-1"
And the object "IfcActuator/K" is at "9.6593,12.588,0"
Scenario: Load project elements - all georeferencing coordinate situations with an offset site - automatic false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-offsetsite.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "AUTOMATIC"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "True"
And "scene.BIMGeoreferenceProperties.blender_eastings" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_northings" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_orthogonal_height" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_x" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_y" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_z" is "0.0"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "7,3,0"
And the object "IfcActuator/B" is at "6,1,0"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "13,4,-1"
And the object "IfcActuator/E" is at "6,3,0"
And the object "IfcActuator/F" is at "3,3,0"
And the object "IfcActuator/G" is at "15,6,-1"
And the object "IfcActuator/H" is at "9,2,0"
And the object "IfcActuator/I" is at "3,3,0"
And the object "IfcActuator/J" is at "11,3,-1"
And the object "IfcActuator/K" is at "10,0,0"
Scenario: Load project elements - all georeferencing coordinate situations with an offset site - manual false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-offsetsite.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "MANUAL"
When I set "scene.BIMProjectProperties.false_origin" to "0,10000,0"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "True"
And "scene.BIMGeoreferenceProperties.blender_eastings" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_northings" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_orthogonal_height" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_x" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_y" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_z" is "0.0"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "5.985,4.71,0"
And the object "IfcActuator/B" is at "5.5367,2.519,0"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "11.522,7.228,-1"
And the object "IfcActuator/E" is at "5.0191,4.451,0"
And the object "IfcActuator/F" is at "2.1213,3.674,0"
And the object "IfcActuator/G" is at "12.936,9.678,-1"
And the object "IfcActuator/H" is at "8.1757,4.261,0"
And the object "IfcActuator/I" is at "2.1213,3.674,0"
And the object "IfcActuator/J" is at "9.8487,5.745,-1"
And the object "IfcActuator/K" is at "9.6593,2.588,0"
And the object "IfcActuator/D" has a cartesian point offset of "31,4,-1"
And the object "IfcActuator/G" has a cartesian point offset of "-25,6,-1"
And the object "IfcActuator/J" has a cartesian point offset of "11,3,-1"
And the object "IfcActuator/D" has a vertex at "12.039,5.296,-1"
And the object "IfcActuator/D" has a vertex at "13.971,5.814,-1"
And the object "IfcActuator/G" has a vertex at "13.454,7.746,-1"
And the object "IfcActuator/G" has a vertex at "15.385,8.264,-1"
And the object "IfcActuator/J" has a vertex at "10.366,3.813,-1"
And the object "IfcActuator/J" has a vertex at "12.298,4.331,-1"
Scenario: Load project elements - all georeferencing coordinate situations with a map conversion - disabled false origin mode (this should be identical to the situation with no map conversion)
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-mapconversion.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "DISABLED"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "False"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "7,3,0"
And the object "IfcActuator/B" is at "6,1,0"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "13,4,-1"
And the object "IfcActuator/E" is at "6,3,0"
And the object "IfcActuator/F" is at "3,3,0"
And the object "IfcActuator/G" is at "15,6,-1"
And the object "IfcActuator/H" is at "9,2,0"
And the object "IfcActuator/I" is at "3,3,0"
And the object "IfcActuator/J" is at "11,3,-1"
And the object "IfcActuator/K" is at "10,0,0"
Scenario: Load project elements - all georeferencing coordinate situations with a map conversion - automatic false origin mode (this should affect the Blender eastings and northings, which is now different to the Blender offset XYZ, but is otherwise identical to the non-map conversion variant)
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-mapconversion.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "AUTOMATIC"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "True"
And "scene.BIMGeoreferenceProperties.blender_eastings" is "28000.0"
And "scene.BIMGeoreferenceProperties.blender_northings" is "4000.0"
And "scene.BIMGeoreferenceProperties.blender_orthogonal_height" is "-1000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_x" is "13000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_y" is "4000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_z" is "-1000.0"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "-6,-1,1"
And the object "IfcActuator/B" is at "-7,-3,1"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "0,0,0"
And the object "IfcActuator/E" is at "-7,-1,1"
And the object "IfcActuator/F" is at "-10,-1,1"
And the object "IfcActuator/G" is at "2,2,0"
And the object "IfcActuator/H" is at "-4,-2,1"
And the object "IfcActuator/I" is at "-10,-1,1"
And the object "IfcActuator/J" is at "-2,-1,0"
And the object "IfcActuator/K" is at "-3,-4,1"
Scenario: Load project elements - all georeferencing coordinate situations with a map conversion - manual false origin mode (this should affect the Blender eastings and northings, which is now different to the Blender offset XYZ, but is otherwise identical to the non-map conversion variant)
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-mapconversion.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "MANUAL"
When I set "scene.BIMProjectProperties.false_origin" to "25000,0,0"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "True"
And "scene.BIMGeoreferenceProperties.blender_eastings" is "25000.0"
And "scene.BIMGeoreferenceProperties.blender_northings" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_orthogonal_height" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_x" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_y" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_z" is "0.0"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "-3,3,0"
And the object "IfcActuator/B" is at "-4,1,0"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "3,4,-1"
And the object "IfcActuator/E" is at "-4,3,0"
And the object "IfcActuator/F" is at "-7,3,0"
And the object "IfcActuator/G" is at "5,6,-1"
And the object "IfcActuator/H" is at "-1,2,0"
And the object "IfcActuator/I" is at "-7,3,0"
And the object "IfcActuator/J" is at "1,3,-1"
And the object "IfcActuator/K" is at "0,0,0"
And the object "IfcActuator/D" has a cartesian point offset of "31,4,-1"
And the object "IfcActuator/G" has a cartesian point offset of "-25,6,-1"
And the object "IfcActuator/J" has a cartesian point offset of "11,3,-1"
And the object "IfcActuator/D" has a vertex at "3,2,-1"
And the object "IfcActuator/D" has a vertex at "5,2,-1"
And the object "IfcActuator/G" has a vertex at "5,4,-1"
And the object "IfcActuator/G" has a vertex at "7,4,-1"
And the object "IfcActuator/J" has a vertex at "1,1,-1"
And the object "IfcActuator/J" has a vertex at "3,1,-1"
Scenario: Load project elements - all georeferencing coordinate situations with map conversion and an offset site - disabled false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-mapconversion-offsetsite.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "DISABLED"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "False"
And the object "IfcSite/My Site" is at "0,10,0"
And the object "IfcBuilding/My Building" is at "0,10,0"
And the object "IfcBuildingStorey/My Storey" is at "0,10,0"
And the object "IfcActuator/A" is at "5.985,14.71,0"
And the object "IfcActuator/B" is at "5.5367,12.519,0"
And the object "IfcActuator/C" is at "0,10,0"
And the object "IfcActuator/D" is at "11.522,17.228,-1"
And the object "IfcActuator/E" is at "5.0191,14.451,0"
And the object "IfcActuator/F" is at "2.1213,13.674,0"
And the object "IfcActuator/G" is at "12.936,19.678,-1"
And the object "IfcActuator/H" is at "8.1757,14.261,0"
And the object "IfcActuator/I" is at "2.1213,13.674,0"
And the object "IfcActuator/J" is at "9.8487,15.745,-1"
And the object "IfcActuator/K" is at "9.6593,12.588,0"
Scenario: Load project elements - all georeferencing coordinate situations with map conversion and an offset site - automatic false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-mapconversion-offsetsite.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "AUTOMATIC"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "True"
And "scene.BIMGeoreferenceProperties.blender_eastings" is "15000.0"
And "scene.BIMGeoreferenceProperties.blender_northings" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_orthogonal_height" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_x" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_y" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_z" is "0.0"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "7,3,0"
And the object "IfcActuator/B" is at "6,1,0"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "13,4,-1"
And the object "IfcActuator/E" is at "6,3,0"
And the object "IfcActuator/F" is at "3,3,0"
And the object "IfcActuator/G" is at "15,6,-1"
And the object "IfcActuator/H" is at "9,2,0"
And the object "IfcActuator/I" is at "3,3,0"
And the object "IfcActuator/J" is at "11,3,-1"
And the object "IfcActuator/K" is at "10,0,0"
Scenario: Load project elements - all georeferencing coordinate situations with map conversion and an offset site - manual false origin mode
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/geolocation-mapconversion-offsetsite.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.false_origin_mode" to "MANUAL"
When I set "scene.BIMProjectProperties.false_origin" to "15000,10000,0"
When I set "scene.BIMProjectProperties.distance_limit" to "5"
And I press "bim.load_project_elements"
Then "scene.BIMGeoreferenceProperties.has_blender_offset" is "True"
And "scene.BIMGeoreferenceProperties.blender_eastings" is "15000.0"
And "scene.BIMGeoreferenceProperties.blender_northings" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_orthogonal_height" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_x" is "0.0"
And "scene.BIMGeoreferenceProperties.blender_offset_y" is "10000.0"
And "scene.BIMGeoreferenceProperties.blender_offset_z" is "0.0"
And the object "IfcSite/My Site" is at "0,0,0"
And the object "IfcBuilding/My Building" is at "0,0,0"
And the object "IfcBuildingStorey/My Storey" is at "0,0,0"
And the object "IfcActuator/A" is at "5.985,4.71,0"
And the object "IfcActuator/B" is at "5.5367,2.519,0"
And the object "IfcActuator/C" is at "0,0,0"
And the object "IfcActuator/D" is at "11.522,7.228,-1"
And the object "IfcActuator/E" is at "5.0191,4.451,0"
And the object "IfcActuator/F" is at "2.1213,3.674,0"
And the object "IfcActuator/G" is at "12.936,9.678,-1"
And the object "IfcActuator/H" is at "8.1757,4.261,0"
And the object "IfcActuator/I" is at "2.1213,3.674,0"
And the object "IfcActuator/J" is at "9.8487,5.745,-1"
And the object "IfcActuator/K" is at "9.6593,2.588,0"
And the object "IfcActuator/D" has a cartesian point offset of "31,4,-1"
And the object "IfcActuator/G" has a cartesian point offset of "-25,6,-1"
And the object "IfcActuator/J" has a cartesian point offset of "11,3,-1"
And the object "IfcActuator/D" has a vertex at "12.039,5.296,-1"
And the object "IfcActuator/D" has a vertex at "13.971,5.814,-1"
And the object "IfcActuator/G" has a vertex at "13.454,7.746,-1"
And the object "IfcActuator/G" has a vertex at "15.385,8.264,-1"
And the object "IfcActuator/J" has a vertex at "10.366,3.813,-1"
And the object "IfcActuator/J" has a vertex at "12.298,4.331,-1"
Scenario: Link IFC
Given an empty IFC project
When I press "bim.link_ifc(filepath='{cwd}/test/files/basic.ifc')"
+11
View File
@@ -20,6 +20,7 @@ import os
import bpy
import traceback
import webbrowser
import numpy as np
import ifcopenshell
import blenderbim.tool as tool
import blenderbim.bim
@@ -671,6 +672,16 @@ def prop_is_roughly_value(prop, value):
assert False, f"Value is {actual_value}"
@then(parsers.parse('the object "{name}" has a cartesian point offset of "{offset}"'))
def the_object_name_has_a_cartesian_point_offset_of_offset(name, offset):
offset = replace_variables(offset)
obj = the_object_name_exists(name)
assert obj.BIMObjectProperties.blender_offset_type == "CARTESIAN_POINT"
obj_offset = np.array(tuple(map(float, obj.BIMObjectProperties.cartesian_point_offset.split(","))))
offset = np.array(tuple(map(float, offset.split(","))))
assert np.allclose(obj_offset, offset)
@then(parsers.parse('the object "{name}" has the material "{material}"'))
def the_object_name_has_the_material_material(name, material):
assert material in [ms.material.name for ms in the_object_name_exists(name).material_slots]