mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 00:45:55 +08:00
Original center is now used for merging
This commit is contained in:
parent
54aeca603e
commit
4318b7e5ab
@ -437,13 +437,12 @@ class CuraApplication(QtApplication):
|
|||||||
group_node.addDecorator(multi_material_decorator)
|
group_node.addDecorator(multi_material_decorator)
|
||||||
# Reset the position of each node
|
# Reset the position of each node
|
||||||
for node in group_node.getChildren():
|
for node in group_node.getChildren():
|
||||||
new_position = node.getPosition()
|
new_position = node.getMeshData().getCenterPosition()
|
||||||
new_position.setX(0)
|
new_position.setY(0)
|
||||||
new_position.setZ(0)
|
|
||||||
node.setPosition(new_position)
|
node.setPosition(new_position)
|
||||||
|
|
||||||
# Use the previously found center of the group bounding box as the new location of the group
|
# Use the previously found center of the group bounding box as the new location of the group
|
||||||
group_node.setPosition((group_node.getBoundingBox().maximum + group_node.getBoundingBox().minimum) / 2)
|
group_node.setPosition(group_node.getBoundingBox().center)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def groupSelected(self):
|
def groupSelected(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user