Skip to content

Commit

Permalink
Merge branch '5.5' of github.com:Ultimaker/Cura
Browse files Browse the repository at this point in the history
  • Loading branch information
nallath committed Oct 16, 2023
2 parents 67c11bf + dc66732 commit 9c38514
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/3MFReader/ThreeMFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ def _convertSavitarNodeToUMNode(savitar_node: Savitar.SceneNode, file_name: str
if len(um_node.getAllChildren()) == 1:
# We don't want groups of one, so move the node up one "level"
child_node = um_node.getChildren()[0]
# Move all the meshes of children so that toolhandles are shown in the correct place.
if child_node.getMeshData():
extents = child_node.getMeshData().getExtents()
move_matrix = Matrix()
move_matrix.translate(-extents.center)
child_node.setMeshData(child_node.getMeshData().getTransformed(move_matrix))
child_node.translate(extents.center)
parent_transformation = um_node.getLocalTransformation()
child_transformation = child_node.getLocalTransformation()
child_node.setTransformation(parent_transformation.multiply(child_transformation))
Expand Down

0 comments on commit 9c38514

Please sign in to comment.