Skip to content

Commit

Permalink
Fix certain 3mf models not restoring properly
Browse files Browse the repository at this point in the history
  • Loading branch information
nallath committed Oct 16, 2023
1 parent 7ad35fa commit 67c11bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/3MFReader/ThreeMFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 67c11bf

Please sign in to comment.