From 67c11bf7f84d848d6388c49dd04116e9f4db1556 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 16 Oct 2023 10:56:07 +0200 Subject: [PATCH] Fix certain 3mf models not restoring properly CURA-11164 --- plugins/3MFReader/ThreeMFReader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index e06e9dcf4e4..4c13bbb5fa9 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -226,7 +226,8 @@ def _read(self, file_name: str) -> Union[SceneNode, List[SceneNode]]: if mesh_data is not None: extents = mesh_data.getExtents() if extents is not None: - center_vector = Vector(extents.center.x, extents.center.y, extents.center.z) + # We use a different coordinate space, so flip Z and Y + center_vector = Vector(extents.center.x, extents.center.z, extents.center.y) transform_matrix.setByTranslation(center_vector) transform_matrix.multiply(um_node.getLocalTransformation()) um_node.setTransformation(transform_matrix)