mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-17 16:46:40 +08:00
Merge pull request #17527 from Ultimaker/CURA-11279_fix_arrange_grid
[CURA-11279] Fix arrange in grid
This commit is contained in:
commit
c4a88a33a7
@ -241,14 +241,8 @@ class GridArrange(Arranger):
|
|||||||
center_grid_x = coord_grid_x + (0.5 * self._grid_width)
|
center_grid_x = coord_grid_x + (0.5 * self._grid_width)
|
||||||
center_grid_y = coord_grid_y + (0.5 * self._grid_height)
|
center_grid_y = coord_grid_y + (0.5 * self._grid_height)
|
||||||
|
|
||||||
bounding_box = node.getBoundingBox()
|
return TranslateOperation(node, Vector(center_grid_x, node.getWorldPosition().y, center_grid_y),
|
||||||
center_node_x = (bounding_box.left + bounding_box.right) * 0.5
|
set_position=True)
|
||||||
center_node_y = (bounding_box.back + bounding_box.front) * 0.5
|
|
||||||
|
|
||||||
delta_x = center_grid_x - center_node_x
|
|
||||||
delta_y = center_grid_y - center_node_y
|
|
||||||
|
|
||||||
return TranslateOperation(node, Vector(delta_x, 0, delta_y))
|
|
||||||
|
|
||||||
def _getGridCornerPoints(
|
def _getGridCornerPoints(
|
||||||
self,
|
self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user