mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Minor refactor; renamed start_priority to last_priority
This commit is contained in:
parent
e26ade0e6f
commit
670de52ec9
1 changed files with 6 additions and 3 deletions
|
|
@ -29,7 +29,7 @@ class Arrange:
|
||||||
self._scale = scale # convert input coordinates to arrange coordinates
|
self._scale = scale # convert input coordinates to arrange coordinates
|
||||||
self._offset_x = offset_x
|
self._offset_x = offset_x
|
||||||
self._offset_y = offset_y
|
self._offset_y = offset_y
|
||||||
self._start_priority = 0
|
self._last_priority = 0
|
||||||
|
|
||||||
## Helper to create an Arranger instance
|
## Helper to create an Arranger instance
|
||||||
#
|
#
|
||||||
|
|
@ -72,9 +72,12 @@ class Arrange:
|
||||||
def findNodePlacement(self, node, offset_shape_arr, hull_shape_arr, step = 1):
|
def findNodePlacement(self, node, offset_shape_arr, hull_shape_arr, step = 1):
|
||||||
new_node = copy.deepcopy(node)
|
new_node = copy.deepcopy(node)
|
||||||
best_spot = self.bestSpot(
|
best_spot = self.bestSpot(
|
||||||
offset_shape_arr, start_prio = self._start_priority, step = step)
|
offset_shape_arr, start_prio = self._last_priority, step = step)
|
||||||
x, y = best_spot.x, best_spot.y
|
x, y = best_spot.x, best_spot.y
|
||||||
self._start_priority = best_spot.priority
|
|
||||||
|
# Save the last priority.
|
||||||
|
self._last_priority = best_spot.priority
|
||||||
|
|
||||||
# Ensure that the object is above the build platform
|
# Ensure that the object is above the build platform
|
||||||
new_node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
|
new_node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
|
||||||
if new_node.getBoundingBox():
|
if new_node.getBoundingBox():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue