#2150 Fix bug where cartesian point offsets didn't consider object placement rotations

This commit is contained in:
Dion Moult
2022-04-21 09:09:34 +10:00
parent 3aa7f8e4c8
commit 87cb1c69f4
3 changed files with 187 additions and 31 deletions
@@ -270,15 +270,28 @@ Scenario: Load project elements - manual offset of object placements
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/manual-geolocation.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.should_offset_model" to "True"
And I set "scene.BIMProjectProperties.model_offset_coordinates" to "-268388.5, -5774506.0, -21.899999618530273"
And I set "scene.BIMProjectProperties.model_offset_coordinates" to "268388500, 5774506000, 21900"
And I press "bim.load_project_elements"
Then the object "IfcPlate/1780 x 270 PRECAST WALL" is at "0,0,0"
Scenario: Load project elements - manual offset of cartesian points
Given an empty Blender session
And I press "bim.load_project(filepath='{cwd}/test/files/manual-geolocation-coords.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.should_offset_model" to "True"
And I set "scene.BIMProjectProperties.model_offset_coordinates" to "1990711,5971553,22700"
And I press "bim.load_project_elements"
Then the object "IfcBuildingElementProxy/NAME" is at "0,0,0"
Scenario: Load project elements - auto offset of object placements
Given an empty Blender session
When I press "bim.load_project(filepath='{cwd}/test/files/auto-geolocation.ifc')"
Then the object "IfcPlate/1780 x 270 PRECAST WALL" is at "0,0,0"
Scenario: Load project elements - auto offset of cartesian points
Given an empty Blender session
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: Unload project
Given an empty Blender session
When I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"