copy_paste in a grid

arrange all objects in grid
place in grid

Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>

CURA-7951
This commit is contained in:
saumya.jain 2023-08-22 10:30:51 +02:00
parent b91ebcbb36
commit b62725b4f0
7 changed files with 47 additions and 36 deletions

View file

@ -26,7 +26,13 @@ class GridArrange:
self._build_volume_bounding_box = build_volume.getBoundingBox()
self._fixed_nodes = fixed_nodes
def arrange(self) -> Tuple[GroupedOperation, int]:
def arrange(self)-> bool:
grouped_operation, not_fit_count = self.createGroupOperationForArrange()
grouped_operation.push()
return not_fit_count == 0
def createGroupOperationForArrange(self) -> Tuple[GroupedOperation, int]:
self._grid_width = 0
self._grid_height = 0
for node in self._nodes_to_arrange: