mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
review comments fixed
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com> CURA-7951
This commit is contained in:
parent
4096fc864b
commit
118f49a052
7 changed files with 76 additions and 90 deletions
|
@ -14,14 +14,13 @@ from UM.Operations.TranslateOperation import TranslateOperation
|
|||
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
||||
from UM.Scene.SceneNode import SceneNode
|
||||
from UM.i18n import i18nCatalog
|
||||
from cura.Arranging.GridArrange import GridArrange
|
||||
from cura.Arranging.Nest2DArrange import arrange, createGroupOperationForArrange
|
||||
from cura.Arranging.Nest2DArrange import createGroupOperationForArrange
|
||||
|
||||
i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
|
||||
class MultiplyObjectsJob(Job):
|
||||
def __init__(self, objects, count: int, min_offset: int = 8, grid_arrange: bool = False):
|
||||
def __init__(self, objects, count: int, min_offset: int = 8 ,* , grid_arrange: bool = False):
|
||||
super().__init__()
|
||||
self._objects = objects
|
||||
self._count: int = count
|
||||
|
@ -78,16 +77,12 @@ class MultiplyObjectsJob(Job):
|
|||
found_solution_for_all = True
|
||||
group_operation = GroupedOperation()
|
||||
if nodes:
|
||||
if(self._grid_arrange):
|
||||
grid_arrange = GridArrange(nodes,Application.getInstance().getBuildVolume(),fixed_nodes)
|
||||
group_operation, not_fit_count = grid_arrange.createGroupOperationForArrange()
|
||||
|
||||
else:
|
||||
group_operation, not_fit_count = createGroupOperationForArrange(nodes,
|
||||
Application.getInstance().getBuildVolume(),
|
||||
fixed_nodes,
|
||||
factor=10000,
|
||||
add_new_nodes_in_scene=True)
|
||||
group_operation, not_fit_count = createGroupOperationForArrange(nodes,
|
||||
Application.getInstance().getBuildVolume(),
|
||||
fixed_nodes,
|
||||
factor=10000,
|
||||
add_new_nodes_in_scene=True,
|
||||
grid_arrange=self._grid_arrange)
|
||||
|
||||
if nodes_to_add_without_arrange:
|
||||
for nested_node in nodes_to_add_without_arrange:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue