From 7449e2137c979b49ccf9a4f423344ed887070bb9 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 22 Aug 2023 11:26:43 +0200 Subject: [PATCH] objects placed with an offset to the grid Co-authored-by: Casper Lamboo CURA-7951 --- cura/Arranging/GridArrange.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Arranging/GridArrange.py b/cura/Arranging/GridArrange.py index 212f7b8e51..fbfaa7f40e 100644 --- a/cura/Arranging/GridArrange.py +++ b/cura/Arranging/GridArrange.py @@ -97,8 +97,8 @@ class GridArrange: def moveNodeOnGrid(self, node: "SceneNode", grid_x: int, grid_y: int) -> "Operation.Operation": coord_grid_x, coord_grid_y = self.gridSpaceToCoordSpace(grid_x, grid_y) - center_grid_x = coord_grid_x + (0.5 * self._grid_width) - center_grid_y = coord_grid_y + (0.5 * self._grid_height) + center_grid_x = coord_grid_x + (0.5 * (self._grid_width + self.offset_x)) + center_grid_y = coord_grid_y + (0.5 * (self._grid_height + self.offset_y)) bounding_box = node.getBoundingBox() center_node_x = (bounding_box.left + bounding_box.right) * 0.5