Use absolute transform coordinates instead of relative

CURA-11279
This commit is contained in:
Erwan MATHIEU 2023-12-05 13:53:30 +01:00
parent 58c174ff68
commit 68818a525d

View file

@ -242,13 +242,9 @@ class GridArrange(Arranger):
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() bounding_box = node.getBoundingBox()
center_node_x = (bounding_box.left + bounding_box.right) * 0.5 center_node_z = bounding_box.height / 2
center_node_y = (bounding_box.back + bounding_box.front) * 0.5
delta_x = center_grid_x - center_node_x return TranslateOperation(node, Vector(center_grid_x, center_node_z, center_grid_y), True)
delta_y = center_grid_y - center_node_y
return TranslateOperation(node, Vector(delta_x, 0, delta_y))
def _getGridCornerPoints( def _getGridCornerPoints(
self, self,