diff --git a/cura/Arranging/GridArrange.py b/cura/Arranging/GridArrange.py
index 13778e9de9..659f3b36e1 100644
--- a/cura/Arranging/GridArrange.py
+++ b/cura/Arranging/GridArrange.py
@@ -80,6 +80,116 @@ class GridArrange(Arranger):
self._allowed_grid_idx = self._build_plate_grid_ids.difference(self._fixed_nodes_grid_ids)
+ self._drawDebugSvg()
+
+ def _drawDebugSvg(self):
+ with open("Builvolume_test.svg", "w") as f:
+ build_volume_bounding_box = self._build_volume.getBoundingBox()
+
+ f.write(
+ f"""")
+
+ @staticmethod
+ def _polygonToSvgPath(polygon: Polygon, stroke: str = "none", fill_color: str = "none",
+ stroke_width: float = 1.0) -> str:
+ return f"""
+
+ """
+
+ def _gridIdToPolygon(self, grid_x: int, grid_y: int) -> Polygon:
+ min_x, min_y = self._gridSpaceToCoordSpace(grid_x, grid_y)
+ max_x, max_y = self._gridSpaceToCoordSpace(grid_x + 1, grid_y + 1)
+ return Polygon([(min_x, min_y), (max_x, min_y), (max_x, max_y), (min_x, max_y)])
+
def createGroupOperationForArrange(self, add_new_nodes_in_scene: bool = False) -> Tuple[GroupedOperation, int]:
# Find the sequence in which items are placed
coord_build_plate_center_x = self._build_volume_bounding_box.width * 0.5 + self._build_volume_bounding_box.left