chiark / gitweb /
Add option to have the center of the printer at 0,0 for RoStock printers. #310 #266
[cura.git] / Cura / gui / projectPlanner.py
index 96427066d6f74cb36aa7260d839cbbd16c88c3d6..4ce44aa4df25672c65b1e0ee07dd279b53afbb29 100644 (file)
@@ -594,7 +594,11 @@ class projectPlanner(wx.Frame):
                        positionList = []
                        for item in self.list:
                                fileList.append(item.filename)
-                               positionList.append([item.centerX, item.centerY] + (item.mesh.matrix * item.scale).reshape((9,)).tolist())
+                               if profile.getPreference('machine_center_is_zero') == 'True':
+                                       pos = [item.centerX - self.machineSize[0] / 2, item.centerY - self.machineSize[1] / 2]
+                               else:
+                                       pos = [item.centerX, item.centerY]
+                               positionList.append(pos + (item.mesh.matrix * item.scale).reshape((9,)).tolist())
                        sliceCommand = sliceRun.getSliceCommand(resultFilename, fileList, positionList)
                else:
                        self._saveCombinedSTL(resultFilename + "_temp_.stl")