mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Only reset transformation/ position if there is a bounding box.
If a node has no bounding box, it's because it has no data to change. CURA-2925
This commit is contained in:
parent
a71bb63318
commit
d2a50cada1
1 changed files with 5 additions and 5 deletions
|
@ -777,6 +777,7 @@ class CuraApplication(QtApplication):
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
# Ensure that the object is above the build platform
|
# Ensure that the object is above the build platform
|
||||||
node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
|
node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
|
||||||
|
if node.getBoundingBox():
|
||||||
op.addOperation(SetTransformOperation(node, Vector(0, node.getWorldPosition().y - node.getBoundingBox().bottom, 0)))
|
op.addOperation(SetTransformOperation(node, Vector(0, node.getWorldPosition().y - node.getBoundingBox().bottom, 0)))
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
|
@ -799,9 +800,8 @@ class CuraApplication(QtApplication):
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
# Ensure that the object is above the build platform
|
# Ensure that the object is above the build platform
|
||||||
node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
|
node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
|
||||||
|
if node.getBoundingBox():
|
||||||
center_y = node.getWorldPosition().y - node.getBoundingBox().bottom
|
center_y = node.getWorldPosition().y - node.getBoundingBox().bottom
|
||||||
|
|
||||||
op.addOperation(SetTransformOperation(node, Vector(0, center_y, 0), Quaternion(), Vector(1, 1, 1)))
|
op.addOperation(SetTransformOperation(node, Vector(0, center_y, 0), Quaternion(), Vector(1, 1, 1)))
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue