mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 12:47:49 -06:00
Better result (but slower) for arranger. CURA-3239
This commit is contained in:
parent
87577f3e23
commit
4c9ec3c22d
1 changed files with 0 additions and 3 deletions
|
@ -1041,12 +1041,9 @@ class CuraApplication(QtApplication):
|
||||||
# Place nodes one at a time
|
# Place nodes one at a time
|
||||||
start_prio = 0
|
start_prio = 0
|
||||||
for size, node, offset_shape_arr, hull_shape_arr in nodes_arr:
|
for size, node, offset_shape_arr, hull_shape_arr in nodes_arr:
|
||||||
# For performance reasons, we assume that when a location does not fit,
|
|
||||||
# it will also not fit for the next object (while what can be untrue).
|
|
||||||
# We also skip possibilities by slicing through the possibilities (step = 10)
|
# We also skip possibilities by slicing through the possibilities (step = 10)
|
||||||
best_spot = arranger.bestSpot(offset_shape_arr, start_prio = start_prio, step = 10)
|
best_spot = arranger.bestSpot(offset_shape_arr, start_prio = start_prio, step = 10)
|
||||||
x, y = best_spot.x, best_spot.y
|
x, y = best_spot.x, best_spot.y
|
||||||
start_prio = best_spot.priority
|
|
||||||
if x is not None: # We could find a place
|
if x is not None: # We could find a place
|
||||||
arranger.place(x, y, hull_shape_arr) # take place before the next one
|
arranger.place(x, y, hull_shape_arr) # take place before the next one
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue