Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Ha <j.ha@ultimaker.com>2017-03-29 11:00:21 +0300
committerJack Ha <j.ha@ultimaker.com>2017-03-29 11:00:21 +0300
commit099752125b5774054fdc7d1b91331fb676a811e4 (patch)
treed172c0e25ce0288f5356b6a2d4353a8fc24bda8a /cura/Arrange.py
parentf357dea086682e8b249d03105e386ab93c63e31c (diff)
Arrange all now places biggest objects first. CURA-3239
Diffstat (limited to 'cura/Arrange.py')
-rwxr-xr-xcura/Arrange.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/cura/Arrange.py b/cura/Arrange.py
index db6a7c781e..dde162962e 100755
--- a/cura/Arrange.py
+++ b/cura/Arrange.py
@@ -90,10 +90,16 @@ class Arrange:
## Fill priority, take offset as center. lower is better
def centerFirst(self):
+ # Distance x + distance y
#self._priority = np.fromfunction(
- # lambda i, j: abs(self._offset_x-i)+abs(self._offset_y-j), self.shape)
+ # lambda i, j: abs(self._offset_x-i)+abs(self._offset_y-j), self.shape, dtype=np.int32)
+ # Square distance
+ # self._priority = np.fromfunction(
+ # lambda i, j: abs(self._offset_x-i)**2+abs(self._offset_y-j)**2, self.shape, dtype=np.int32)
self._priority = np.fromfunction(
- lambda i, j: abs(self._offset_x-i)**2+abs(self._offset_y-j)**2, self.shape, dtype=np.int32)
+ lambda i, j: abs(self._offset_x-i)**3+abs(self._offset_y-j)**3, self.shape, dtype=np.int32)
+ # self._priority = np.fromfunction(
+ # lambda i, j: max(abs(self._offset_x-i), abs(self._offset_y-j)), self.shape, dtype=np.int32)
self._priority_unique_values = np.unique(self._priority)
self._priority_unique_values.sort()