diff options
author | Jaime van Kessel <nallath@gmail.com> | 2020-10-05 15:31:42 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2020-10-05 15:31:42 +0300 |
commit | 59b9639d878d2e2acf45b61dffc1aa0f56b34e79 (patch) | |
tree | eea4f03838e06b9936952c8e3ff50ba96f83fd09 /cura/MultiplyObjectsJob.py | |
parent | a14135be5e9bddea66864f3de87c5ef36e738d50 (diff) |
Don't let arranger place all objects on the same spot if they don't fit
CURA-7440
Diffstat (limited to 'cura/MultiplyObjectsJob.py')
-rw-r--r-- | cura/MultiplyObjectsJob.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cura/MultiplyObjectsJob.py b/cura/MultiplyObjectsJob.py index f35d95c2cb..e560411852 100644 --- a/cura/MultiplyObjectsJob.py +++ b/cura/MultiplyObjectsJob.py @@ -36,14 +36,9 @@ class MultiplyObjectsJob(Job): status_message.show() scene = Application.getInstance().getController().getScene() - total_progress = len(self._objects) * self._count - current_progress = 0 - global_container_stack = Application.getInstance().getGlobalContainerStack() if global_container_stack is None: return # We can't do anything in this case. - machine_width = global_container_stack.getProperty("machine_width", "value") - machine_depth = global_container_stack.getProperty("machine_depth", "value") root = scene.getRoot() @@ -80,7 +75,7 @@ class MultiplyObjectsJob(Job): nodes.append(new_node) factor = 10000 found_solution_for_all, node_items = findNodePlacement(nodes, Application.getInstance().getBuildVolume(), fixed_nodes, factor = 10000) - + not_fit_count = 0 if nodes: operation = GroupedOperation() for new_node, node_item in zip(nodes, node_items): @@ -98,6 +93,7 @@ class MultiplyObjectsJob(Job): # We didn't find a spot operation.addOperation( TranslateOperation(new_node, Vector(200, 0, -not_fit_count * 20), set_position=True)) + not_fit_count += 1 operation.push() status_message.hide() |