mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
3mf Meshes load in correct location
CURA-9755
This commit is contained in:
parent
6f82397476
commit
277d48bd51
1 changed files with 8 additions and 0 deletions
|
@ -186,6 +186,14 @@ class ThreeMFReader(MeshReader):
|
|||
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():
|
||||
print("child name: ", child_node.getId())
|
||||
extents = child_node.getMeshData().getExtents()
|
||||
m = Matrix()
|
||||
m.translate(-extents.center)
|
||||
child_node.setMeshData(child_node.getMeshData().getTransformed(m))
|
||||
child_node.translate(extents.center)
|
||||
parent_transformation = um_node.getLocalTransformation()
|
||||
child_transformation = child_node.getLocalTransformation()
|
||||
child_node.setTransformation(parent_transformation.multiply(child_transformation))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue