mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Improved documentation
This commit is contained in:
parent
ecf905f580
commit
4626bc37a9
1 changed files with 4 additions and 5 deletions
|
@ -79,18 +79,17 @@ class Arrange:
|
||||||
nodes.append(new_node)
|
nodes.append(new_node)
|
||||||
return nodes
|
return nodes
|
||||||
|
|
||||||
## Fill priority, center is best. lower value is better
|
## Fill priority, center is best. Lower value is better
|
||||||
|
# This is a strategy for the arranger.
|
||||||
def centerFirst(self):
|
def centerFirst(self):
|
||||||
# Distance x + distance y: creates diamond shape
|
|
||||||
#self._priority = numpy.fromfunction(
|
|
||||||
# lambda i, j: abs(self._offset_x-i)+abs(self._offset_y-j), self.shape, dtype=numpy.int32)
|
|
||||||
# Square distance: creates a more round shape
|
# Square distance: creates a more round shape
|
||||||
self._priority = numpy.fromfunction(
|
self._priority = numpy.fromfunction(
|
||||||
lambda i, j: (self._offset_x - i) ** 2 + (self._offset_y - j) ** 2, self.shape, dtype=numpy.int32)
|
lambda i, j: (self._offset_x - i) ** 2 + (self._offset_y - j) ** 2, self.shape, dtype=numpy.int32)
|
||||||
self._priority_unique_values = numpy.unique(self._priority)
|
self._priority_unique_values = numpy.unique(self._priority)
|
||||||
self._priority_unique_values.sort()
|
self._priority_unique_values.sort()
|
||||||
|
|
||||||
## Fill priority, back is best. lower value is better
|
## Fill priority, back is best. Lower value is better
|
||||||
|
# This is a strategy for the arranger.
|
||||||
def backFirst(self):
|
def backFirst(self):
|
||||||
self._priority = numpy.fromfunction(
|
self._priority = numpy.fromfunction(
|
||||||
lambda i, j: 10 * j + abs(self._offset_x - i), self.shape, dtype=numpy.int32)
|
lambda i, j: 10 * j + abs(self._offset_x - i), self.shape, dtype=numpy.int32)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue