mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:29:00 +08:00
Fix certain 3mf models not restoring properly
CURA-11164
This commit is contained in:
parent
673303a238
commit
7e38927a8c
@ -233,7 +233,8 @@ class ThreeMFReader(MeshReader):
|
|||||||
if mesh_data is not None:
|
if mesh_data is not None:
|
||||||
extents = mesh_data.getExtents()
|
extents = mesh_data.getExtents()
|
||||||
if extents is not None:
|
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.setByTranslation(center_vector)
|
||||||
transform_matrix.multiply(um_node.getLocalTransformation())
|
transform_matrix.multiply(um_node.getLocalTransformation())
|
||||||
um_node.setTransformation(transform_matrix)
|
um_node.setTransformation(transform_matrix)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user