From 63eb1793ad17282986996ff351629202dc4dfa6f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 12 Apr 2016 15:15:02 +0200 Subject: [PATCH 001/424] Renaming USBPrinterConnection CURA-1339 --- plugins/USBPrinting/USBPrinterManager.py | 4 ++-- .../{PrinterConnection.py => USBPrinterOutputDevice.py} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename plugins/USBPrinting/{PrinterConnection.py => USBPrinterOutputDevice.py} (99%) diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index 6dc88f59d5..1188fce28f 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -2,7 +2,7 @@ # Cura is released under the terms of the AGPLv3 or higher. from UM.Signal import Signal, SignalEmitter -from . import PrinterConnection +from . import USBPrinterOutputDevice from UM.Application import Application from UM.Resources import Resources from UM.Logger import Logger @@ -190,7 +190,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): ## Because the model needs to be created in the same thread as the QMLEngine, we use a signal. def addConnection(self, serial_port): - connection = PrinterConnection.PrinterConnection(serial_port) + connection = USBPrinterOutputDevice.USBPrinterOutputDevice(serial_port) connection.connect() connection.connectionStateChanged.connect(self._onPrinterConnectionStateChanged) connection.progressChanged.connect(self.progressChanged) diff --git a/plugins/USBPrinting/PrinterConnection.py b/plugins/USBPrinting/USBPrinterOutputDevice.py similarity index 99% rename from plugins/USBPrinting/PrinterConnection.py rename to plugins/USBPrinting/USBPrinterOutputDevice.py index 7d55952984..a2dcaa5dca 100644 --- a/plugins/USBPrinting/PrinterConnection.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -24,7 +24,7 @@ from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") -class PrinterConnection(OutputDevice, QObject, SignalEmitter): +class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): def __init__(self, serial_port, parent = None): QObject.__init__(self, parent) OutputDevice.__init__(self, serial_port) From 6dd0a0d61abd428c37bb8c23b48cac2da23b2ff6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 12 Apr 2016 16:45:58 +0200 Subject: [PATCH 002/424] Added printer specific output device CURA-1339 --- cura/PrinterOutputDevice.py | 91 +++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 cura/PrinterOutputDevice.py diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py new file mode 100644 index 0000000000..68b9e05aa6 --- /dev/null +++ b/cura/PrinterOutputDevice.py @@ -0,0 +1,91 @@ +from UM.OutputDevice.OutputDevice import OutputDevice +from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot + + +## Printer output device adds extra interface options on top of output device. +# +# Note that a number of settings are marked as "final". This is because decorators +# are not inherited by children. To fix this we use the private counter part of those +# functions to actually have the implementation. +# +# For all other uses it should be used in the same way as a "regular" OutputDevice. +class PrinterOutputDevice(OutputDevice): + def __init__(self, device_id): + super().__init__(device_id) + self._target_bed_temperature = 0 + self._target_hotend_temperatures = {} + + def requestWrite(self, node, file_name = None, filter_by_machine = False): + raise NotImplementedError("requestWrite needs to be implemented") + + bedTemperatureChanged = pyqtSignal() + targetBedTemperatureChanged = pyqtSignal() + + progressChanged = pyqtSignal() + + hotendTemperaturesChanged = pyqtSignal() + targetHotendTemperaturesChanged = pyqtSignal() + + ## Get the bed temperature of the bed (if any) + # This function is "final" (do not re-implement) + # /sa _getBedTemperature + @pyqtProperty(float, notify = bedTemperatureChanged) + def bedTemperature(self): + return self._getBedTemperature() + + def _getBedTemperature(self): + raise NotImplementedError("_getBedTemperature needs to be implemented") + + ## Get the temperature of a hot end as defined by index. + # /parameter index Index of the hotend to get a temperature from. + def getHotendTemperature(self, index): + raise NotImplementedError("getHotendTemperature needs to be implemented") + + ## Set the (target) bed temperature + # This function is "final" (do not re-implement) + # /sa _setBedTemperature + @pyqtSlot(int) + def setBedTemperature(self, temperature): + self._setBedTemperature(temperature) + self._target_bed_temperature = temperature + self.targetBedTemperatureChanged.emit() + + ## Set the bed temperature of the connected printer. + def _setBedTemperature(self, temperature): + raise NotImplementedError("_setBedTemperature needs to be implemented") + + def setHotendTemperature(self, index, temperature): + self._setTargetHotendTemperature(index, temperature) + self._target_hotend_temperatures[index] = temperature + self.targetHotendTemperaturesChanged.emit() + + def _setTargetHotendTemperature(self, index, temperature): + raise NotImplementedError("_setTargetHotendTemperature needs to be implemented") + + @pyqtProperty("QVariantMap", notify = targetHotendTemperaturesChanged) + def hotendTemperatures(self): + return self._getHotendTemperatures() + + def _getHotendTemperatures(self): + raise NotImplementedError("_getHotendTemperatures needs to be implemented") + + ## Attempt to establish connection + def connect(self): + pass + + def close(self): + pass + + ## Get the progress of any currently active process. + # This function is "final" (do not re-implement) + # /sa _getProgress + # /returns float progess of the process. -1 indicates that there is no process. + @pyqtProperty(float, notify = progressChanged) + def progress(self): + try: + return float(self._getProgress()) + except ValueError: + return -1 + + def _getProgress(self): + raise NotImplementedError("_getProgress needs to be implemented") \ No newline at end of file From de9721e5deb6ee47da2ac364a3c89f9f4bcbbfcc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 09:56:13 +0200 Subject: [PATCH 003/424] Added temperature & position stubs CURA-1339 --- cura/PrinterOutputDevice.py | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 68b9e05aa6..b00107b293 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -4,6 +4,8 @@ from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot ## Printer output device adds extra interface options on top of output device. # +# The assumption is made the printer is a FDM printer. +# # Note that a number of settings are marked as "final". This is because decorators # are not inherited by children. To fix this we use the private counter part of those # functions to actually have the implementation. @@ -14,6 +16,9 @@ class PrinterOutputDevice(OutputDevice): super().__init__(device_id) self._target_bed_temperature = 0 self._target_hotend_temperatures = {} + self._head_x = 0 + self._head_y = 0 + self._head_z = 0 def requestWrite(self, node, file_name = None, filter_by_machine = False): raise NotImplementedError("requestWrite needs to be implemented") @@ -26,6 +31,8 @@ class PrinterOutputDevice(OutputDevice): hotendTemperaturesChanged = pyqtSignal() targetHotendTemperaturesChanged = pyqtSignal() + headPositionChanged = pyqtSignal() + ## Get the bed temperature of the bed (if any) # This function is "final" (do not re-implement) # /sa _getBedTemperature @@ -63,6 +70,13 @@ class PrinterOutputDevice(OutputDevice): raise NotImplementedError("_setTargetHotendTemperature needs to be implemented") @pyqtProperty("QVariantMap", notify = targetHotendTemperaturesChanged) + def targetHotendTemperatures(self): + return self._getTargetHotendTemperatures() + + def _getTargetHotendTemperatures(self): + raise NotImplementedError("_getTargetHotendTemperatures needs to be implemented") + + @pyqtProperty("QVariantMap", notify = hotendTemperaturesChanged) def hotendTemperatures(self): return self._getHotendTemperatures() @@ -76,6 +90,32 @@ class PrinterOutputDevice(OutputDevice): def close(self): pass + @pyqtProperty(float, notify = headPositionChanged) + def headX(self): + return self._head_x + + @pyqtProperty(float, notify = headPositionChanged) + def headY(self): + return self._head_y + + @pyqtProperty(float, notify = headPositionChanged) + def headZ(self): + return self._head_z + + @pyqtSlot("long", "long", "long") + @pyqtSlot("long", "long", "long", "long") + def setHeadPosition(self, x, y ,z, speed = 3000): + pass + + def _setHeadX(self, x, speed): + pass + + def _setHeadY(self, y, speed): + pass + + def _setHeadZ(self, z, speed): + pass + ## Get the progress of any currently active process. # This function is "final" (do not re-implement) # /sa _getProgress From a4314638ab9825823419f88ac1cfab515d4b5ac2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 09:57:36 +0200 Subject: [PATCH 004/424] Added delete to printerOutput device to ensure it is properly closed CURA-1339 --- cura/PrinterOutputDevice.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index b00107b293..cc4cbb7094 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -90,6 +90,10 @@ class PrinterOutputDevice(OutputDevice): def close(self): pass + ## Ensure that close gets called when object is destroyed + def __del__(self): + self.close() + @pyqtProperty(float, notify = headPositionChanged) def headX(self): return self._head_x From 8e853ffecbc80096e62b179ba7d633f0fab319b9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 13:19:57 +0200 Subject: [PATCH 005/424] Added documentation CURA-1339 --- cura/PrinterOutputDevice.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index cc4cbb7094..a00069286b 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -94,21 +94,34 @@ class PrinterOutputDevice(OutputDevice): def __del__(self): self.close() + ## Get the x position of the head. + # This function is "final" (do not re-implement) @pyqtProperty(float, notify = headPositionChanged) def headX(self): return self._head_x + ## Get the y position of the head. + # This function is "final" (do not re-implement) @pyqtProperty(float, notify = headPositionChanged) def headY(self): return self._head_y + ## Get the z position of the head. + # In some machines it's actually the bed that moves. For convenience sake we simply see it all as head movements. + # This function is "final" (do not re-implement) @pyqtProperty(float, notify = headPositionChanged) def headZ(self): return self._head_z + ## Set the position of the head. + # In some machines it's actually the bed that moves. For convenience sake we simply see it all as head movements. + # This function is "final" (do not re-implement) @pyqtSlot("long", "long", "long") @pyqtSlot("long", "long", "long", "long") - def setHeadPosition(self, x, y ,z, speed = 3000): + def setHeadPosition(self, x, y, z, speed = 3000): + self._setHeadPosition(x, y , z, speed) + + def _setHeadPosition(self, x, y, z, speed): pass def _setHeadX(self, x, speed): From 70eb0428957fea192d34b128f40b25059ac6a4df Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 13:31:18 +0200 Subject: [PATCH 006/424] More fleshing out of the printerOutputDevice CURA-1339 --- cura/PrinterOutputDevice.py | 50 ++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index a00069286b..4d8bcce680 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -19,10 +19,12 @@ class PrinterOutputDevice(OutputDevice): self._head_x = 0 self._head_y = 0 self._head_z = 0 + self._connected = False def requestWrite(self, node, file_name = None, filter_by_machine = False): raise NotImplementedError("requestWrite needs to be implemented") + # Signals: bedTemperatureChanged = pyqtSignal() targetBedTemperatureChanged = pyqtSignal() @@ -33,6 +35,8 @@ class PrinterOutputDevice(OutputDevice): headPositionChanged = pyqtSignal() + conectedChanged = pyqtSignal() + ## Get the bed temperature of the bed (if any) # This function is "final" (do not re-implement) # /sa _getBedTemperature @@ -41,7 +45,7 @@ class PrinterOutputDevice(OutputDevice): return self._getBedTemperature() def _getBedTemperature(self): - raise NotImplementedError("_getBedTemperature needs to be implemented") + return None ## Get the temperature of a hot end as defined by index. # /parameter index Index of the hotend to get a temperature from. @@ -57,10 +61,17 @@ class PrinterOutputDevice(OutputDevice): self._target_bed_temperature = temperature self.targetBedTemperatureChanged.emit() - ## Set the bed temperature of the connected printer. + ## Set the bed temperature of the connected printer (if any). + # /parameter temperature Temperature bed needs to go to (in deg celsius) def _setBedTemperature(self, temperature): - raise NotImplementedError("_setBedTemperature needs to be implemented") + pass + ## Set the (target) hotend temperature + # This function is "final" (do not re-implement) + # /param index the index of the hotend that needs to change temperature + # /param temperature The temperature it needs to change to (in deg celsius). + # /sa _setTargetHotendTemperature + @pyqtSlot(int, int) def setHotendTemperature(self, index, temperature): self._setTargetHotendTemperature(index, temperature) self._target_hotend_temperatures[index] = temperature @@ -90,6 +101,10 @@ class PrinterOutputDevice(OutputDevice): def close(self): pass + @pyqtProperty(bool, notify = conectedChanged) + def connected(self): + return self._connected + ## Ensure that close gets called when object is destroyed def __del__(self): self.close() @@ -116,11 +131,40 @@ class PrinterOutputDevice(OutputDevice): ## Set the position of the head. # In some machines it's actually the bed that moves. For convenience sake we simply see it all as head movements. # This function is "final" (do not re-implement) + # /param speed Speed by which it needs to move (in mm/minute) @pyqtSlot("long", "long", "long") @pyqtSlot("long", "long", "long", "long") def setHeadPosition(self, x, y, z, speed = 3000): self._setHeadPosition(x, y , z, speed) + ## Set the X position of the head. + # This function is "final" (do not re-implement) + # /param x x position head needs to move to. + # /param speed Speed by which it needs to move (in mm/minute) + @pyqtSlot("long") + @pyqtSlot("long", "long") + def setHeadX(self, x, speed = 3000): + self._setHeadX(x, speed) + + ## Set the Y position of the head. + # This function is "final" (do not re-implement) + # /param y y position head needs to move to. + # /param speed Speed by which it needs to move (in mm/minute) + @pyqtSlot("long") + @pyqtSlot("long", "long") + def setHeadY(self, y, speed = 3000): + self._setHeadY(y, speed) + + ## Set the Z position of the head. + # In some machines it's actually the bed that moves. For convenience sake we simply see it all as head movements. + # This function is "final" (do not re-implement) + # /param z z position head needs to move to. + # /param speed Speed by which it needs to move (in mm/minute) + @pyqtSlot("long") + @pyqtSlot("long", "long") + def setHeadZ(self, z, speed = 3000): + self._setHeadY(z, speed) + def _setHeadPosition(self, x, y, z, speed): pass From e5adea4ab2eb0c844d3df4c1eb409ff4b4c62580 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 13:36:22 +0200 Subject: [PATCH 007/424] PrinterOutputdevice is now also a QObject CURA-1339 --- cura/PrinterOutputDevice.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 4d8bcce680..ce236ed620 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -1,5 +1,5 @@ from UM.OutputDevice.OutputDevice import OutputDevice -from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot +from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject ## Printer output device adds extra interface options on top of output device. @@ -11,9 +11,11 @@ from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot # functions to actually have the implementation. # # For all other uses it should be used in the same way as a "regular" OutputDevice. -class PrinterOutputDevice(OutputDevice): - def __init__(self, device_id): - super().__init__(device_id) +class PrinterOutputDevice(OutputDevice, QObject): + def __init__(self, device_id, parent = None): + QObject.__init__(self, parent) + OutputDevice.__init__(self, device_id) + self._target_bed_temperature = 0 self._target_hotend_temperatures = {} self._head_x = 0 From 623596ca59de0a117842d50d2b8649003251b0f2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 13:45:07 +0200 Subject: [PATCH 008/424] Added isConnecting CURA-1339 --- cura/PrinterOutputDevice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index ce236ed620..d9f119bf83 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -22,6 +22,7 @@ class PrinterOutputDevice(OutputDevice, QObject): self._head_y = 0 self._head_z = 0 self._connected = False + self._connecting = False def requestWrite(self, node, file_name = None, filter_by_machine = False): raise NotImplementedError("requestWrite needs to be implemented") @@ -38,6 +39,7 @@ class PrinterOutputDevice(OutputDevice, QObject): headPositionChanged = pyqtSignal() conectedChanged = pyqtSignal() + connectingChanged = pyqtSignal() ## Get the bed temperature of the bed (if any) # This function is "final" (do not re-implement) @@ -107,6 +109,10 @@ class PrinterOutputDevice(OutputDevice, QObject): def connected(self): return self._connected + @pyqtProperty(bool, notify = connectingChanged) + def isConnecting(self): + return self._connecting + ## Ensure that close gets called when object is destroyed def __del__(self): self.close() From f963ad50217896f71528dca8d9e63488979f4921 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 13:46:10 +0200 Subject: [PATCH 009/424] Renamed _setBedTemperature to setTargetBedTemperature CURA-1339 --- cura/PrinterOutputDevice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index d9f119bf83..6c8c409fb7 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -61,13 +61,13 @@ class PrinterOutputDevice(OutputDevice, QObject): # /sa _setBedTemperature @pyqtSlot(int) def setBedTemperature(self, temperature): - self._setBedTemperature(temperature) + self._setTargetBedTemperature(temperature) self._target_bed_temperature = temperature self.targetBedTemperatureChanged.emit() ## Set the bed temperature of the connected printer (if any). # /parameter temperature Temperature bed needs to go to (in deg celsius) - def _setBedTemperature(self, temperature): + def _setTargetBedTemperature(self, temperature): pass ## Set the (target) hotend temperature From 0f097f0f641bea650c4b345f4f29780302ce29aa Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 13:48:32 +0200 Subject: [PATCH 010/424] Added property for target bed temp CURA-1339 --- cura/PrinterOutputDevice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 6c8c409fb7..01ccd822cc 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -70,6 +70,11 @@ class PrinterOutputDevice(OutputDevice, QObject): def _setTargetBedTemperature(self, temperature): pass + ## Get the target bed temperature if connected printer (if any) + @pyqtProperty(int, notify = targetBedTemperatureChanged) + def targetBedTemperature(self): + return self._target_bed_temperature + ## Set the (target) hotend temperature # This function is "final" (do not re-implement) # /param index the index of the hotend that needs to change temperature From 598c5be9760c6b6da835531dfcabc1d87a6deed0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 14:08:10 +0200 Subject: [PATCH 011/424] Temperatures are now stored in the class CURA-1339 --- cura/PrinterOutputDevice.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 01ccd822cc..d09986020c 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -17,6 +17,8 @@ class PrinterOutputDevice(OutputDevice, QObject): OutputDevice.__init__(self, device_id) self._target_bed_temperature = 0 + self._bed_temperature = 0 + self._hotend_temperatures = {} self._target_hotend_temperatures = {} self._head_x = 0 self._head_y = 0 @@ -60,7 +62,7 @@ class PrinterOutputDevice(OutputDevice, QObject): # This function is "final" (do not re-implement) # /sa _setBedTemperature @pyqtSlot(int) - def setBedTemperature(self, temperature): + def setTargetBedTemperature(self, temperature): self._setTargetBedTemperature(temperature) self._target_bed_temperature = temperature self.targetBedTemperatureChanged.emit() @@ -70,6 +72,11 @@ class PrinterOutputDevice(OutputDevice, QObject): def _setTargetBedTemperature(self, temperature): pass + ## Get the bed temperature if connected printer (if any) + @pyqtProperty(int, notify = bedTemperatureChanged) + def bedTemperature(self): + return self._bed_temperature + ## Get the target bed temperature if connected printer (if any) @pyqtProperty(int, notify = targetBedTemperatureChanged) def targetBedTemperature(self): @@ -81,7 +88,7 @@ class PrinterOutputDevice(OutputDevice, QObject): # /param temperature The temperature it needs to change to (in deg celsius). # /sa _setTargetHotendTemperature @pyqtSlot(int, int) - def setHotendTemperature(self, index, temperature): + def setTargetHotendTemperature(self, index, temperature): self._setTargetHotendTemperature(index, temperature) self._target_hotend_temperatures[index] = temperature self.targetHotendTemperaturesChanged.emit() @@ -91,17 +98,11 @@ class PrinterOutputDevice(OutputDevice, QObject): @pyqtProperty("QVariantMap", notify = targetHotendTemperaturesChanged) def targetHotendTemperatures(self): - return self._getTargetHotendTemperatures() - - def _getTargetHotendTemperatures(self): - raise NotImplementedError("_getTargetHotendTemperatures needs to be implemented") + return self._target_hotend_temperatures @pyqtProperty("QVariantMap", notify = hotendTemperaturesChanged) def hotendTemperatures(self): - return self._getHotendTemperatures() - - def _getHotendTemperatures(self): - raise NotImplementedError("_getHotendTemperatures needs to be implemented") + return self._hotend_temperatures ## Attempt to establish connection def connect(self): From 583069010788a456b3a0db633180925505d4213c Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 14:11:18 +0200 Subject: [PATCH 012/424] Added setter for progress CURA-1339 --- cura/PrinterOutputDevice.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index d09986020c..6d86cd8a91 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -20,6 +20,7 @@ class PrinterOutputDevice(OutputDevice, QObject): self._bed_temperature = 0 self._hotend_temperatures = {} self._target_hotend_temperatures = {} + self._progress = -1 self._head_x = 0 self._head_y = 0 self._head_z = 0 @@ -194,13 +195,12 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Get the progress of any currently active process. # This function is "final" (do not re-implement) # /sa _getProgress - # /returns float progess of the process. -1 indicates that there is no process. + # /returns float progress of the process. -1 indicates that there is no process. @pyqtProperty(float, notify = progressChanged) def progress(self): - try: - return float(self._getProgress()) - except ValueError: - return -1 + return self._progress - def _getProgress(self): - raise NotImplementedError("_getProgress needs to be implemented") \ No newline at end of file + ## Set the progress of any currently active process + def setProgress(self, progress): + self._progress = progress + self.progressChanged.emit() \ No newline at end of file From 2b9aa1dbb5d5a6afb00b3c0a719283e015bbfeee Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 15:09:25 +0200 Subject: [PATCH 013/424] PrinterOutput device now uses connection state This is instead of the multiple booleans that were used in USB printer CURA-1339 --- cura/PrinterOutputDevice.py | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 6d86cd8a91..54550e1aee 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -1,6 +1,6 @@ from UM.OutputDevice.OutputDevice import OutputDevice from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject - +from enum import IntEnum # For the connection state tracking. ## Printer output device adds extra interface options on top of output device. # @@ -20,12 +20,11 @@ class PrinterOutputDevice(OutputDevice, QObject): self._bed_temperature = 0 self._hotend_temperatures = {} self._target_hotend_temperatures = {} - self._progress = -1 + self._progress = 0 self._head_x = 0 self._head_y = 0 self._head_z = 0 - self._connected = False - self._connecting = False + self._connection_state = ConnectionState.CLOSED def requestWrite(self, node, file_name = None, filter_by_machine = False): raise NotImplementedError("requestWrite needs to be implemented") @@ -41,8 +40,7 @@ class PrinterOutputDevice(OutputDevice, QObject): headPositionChanged = pyqtSignal() - conectedChanged = pyqtSignal() - connectingChanged = pyqtSignal() + connectionStateChanged = pyqtSignal(str) ## Get the bed temperature of the bed (if any) # This function is "final" (do not re-implement) @@ -112,13 +110,13 @@ class PrinterOutputDevice(OutputDevice, QObject): def close(self): pass - @pyqtProperty(bool, notify = conectedChanged) - def connected(self): - return self._connected + @pyqtProperty(bool, notify = connectionStateChanged) + def connectionState(self): + return self._connection_state - @pyqtProperty(bool, notify = connectingChanged) - def isConnecting(self): - return self._connecting + def setConnectionState(self, connection_state): + self._connection_state = connection_state + self.connectionStateChanged.emit(self._id) ## Ensure that close gets called when object is destroyed def __del__(self): @@ -203,4 +201,10 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Set the progress of any currently active process def setProgress(self, progress): self._progress = progress - self.progressChanged.emit() \ No newline at end of file + self.progressChanged.emit() + +## The current processing state of the backend. +class ConnectionState(IntEnum): + CLOSED = 0 + CONNECTING = 1 + CONNECTED = 2 \ No newline at end of file From 0cd1031ec7f51356188672d657a02028a1c7afa0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 15:15:37 +0200 Subject: [PATCH 014/424] Changed USB printing to reflect changes in output device API CURA-1339 --- plugins/USBPrinting/USBPrinterManager.py | 6 +- plugins/USBPrinting/USBPrinterOutputDevice.py | 165 ++++-------------- 2 files changed, 36 insertions(+), 135 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index 1188fce28f..1c2c96484f 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -8,6 +8,7 @@ from UM.Resources import Resources from UM.Logger import Logger from UM.PluginRegistry import PluginRegistry from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin +from cura.PrinterOutputDevice import ConnectionState from UM.Qt.ListModel import ListModel from UM.Message import Message @@ -20,7 +21,6 @@ import time import os.path from UM.Extension import Extension -from PyQt5.QtQuick import QQuickView from PyQt5.QtQml import QQmlComponent, QQmlContext from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt from UM.i18n import i18nCatalog @@ -197,7 +197,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): self._printer_connections[serial_port] = connection def _onPrinterConnectionStateChanged(self, serial_port): - if self._printer_connections[serial_port].isConnected(): + if self._printer_connections[serial_port].connectionState == ConnectionState.CLOSED: self.getOutputDeviceManager().addOutputDevice(self._printer_connections[serial_port]) else: self.getOutputDeviceManager().removeOutputDevice(serial_port) @@ -209,7 +209,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): self._printer_connections_model.addRoleName(Qt.UserRole + 1,"name") self._printer_connections_model.addRoleName(Qt.UserRole + 2, "printer") for connection in self._printer_connections: - if self._printer_connections[connection].isConnected(): + if self._printer_connections[connection].isConnected: self._printer_connections_model.appendItem({"name":connection, "printer": self._printer_connections[connection]}) return self._printer_connections_model diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index a2dcaa5dca..4514d58ae3 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -11,25 +11,20 @@ import functools import os.path from UM.Application import Application -from UM.Signal import Signal, SignalEmitter from UM.Logger import Logger -from UM.OutputDevice.OutputDevice import OutputDevice from UM.PluginRegistry import PluginRegistry +from cura.PrinterOutputDevice import PrinterOutputDevice, ConnectionState -from PyQt5.QtQuick import QQuickView from PyQt5.QtQml import QQmlComponent, QQmlContext -from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt +from PyQt5.QtCore import QUrl, pyqtSlot, pyqtSignal from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") -class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): - def __init__(self, serial_port, parent = None): - QObject.__init__(self, parent) - OutputDevice.__init__(self, serial_port) - SignalEmitter.__init__(self) - #super().__init__(serial_port) +class USBPrinterOutputDevice(PrinterOutputDevice): + def __init__(self, serial_port): + super().__init__(serial_port) self.setName(catalog.i18nc("@item:inmenu", "USB printing")) self.setShortDescription(catalog.i18nc("@action:button", "Print with USB")) self.setDescription(catalog.i18nc("@info:tooltip", "Print with USB")) @@ -46,18 +41,10 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): self._end_stop_thread.daemon = True self._poll_endstop = -1 - # Printer is connected - self._is_connected = False - - # Printer is in the process of connecting - self._is_connecting = False - # The baud checking is done by sending a number of m105 commands to the printer and waiting for a readable # response. If the baudrate is correct, this should make sense, else we get giberish. self._required_responses_auto_baud = 3 - self._progress = 0 - self._listen_thread = threading.Thread(target=self._listen) self._listen_thread.daemon = True @@ -119,40 +106,26 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): self._control_view = None onError = pyqtSignal() - progressChanged = pyqtSignal() - extruderTemperatureChanged = pyqtSignal() - bedTemperatureChanged = pyqtSignal() + firmwareUpdateComplete = pyqtSignal() endstopStateChanged = pyqtSignal(str ,bool, arguments = ["key","state"]) - @pyqtProperty(float, notify = progressChanged) - def progress(self): - return self._progress + def _setTargetBedTemperature(self, temperature): + Logger.log("d", "Setting bed temperature to %s", temperature) + self._sendCommand("M140 S%s" % temperature) - @pyqtProperty(float, notify = extruderTemperatureChanged) - def extruderTemperature(self): - return self._extruder_temperatures[0] + def _setHeadPosition(self, x, y , z, speed): + self._sendCommand("G0 X%s Y%s Z%s F%s" % (x, y, z, speed)) - @pyqtProperty(float, notify = bedTemperatureChanged) - def bedTemperature(self): - return self._bed_temperature + def _setHeadX(self, x, speed): + self._sendCommand("G0 X%s F%s" % (x, speed)) - @pyqtProperty(str, notify = onError) - def error(self): - return self._error_state + def _setHeadY(self, y, speed): + self._sendCommand("G0 Y%s F%s" % (y, speed)) - # TODO: Might need to add check that extruders can not be changed when it started printing or loading these settings from settings object - def setNumExtuders(self, num): - self._extruder_count = num - self._extruder_temperatures = [0] * self._extruder_count - self._target_extruder_temperatures = [0] * self._extruder_count - - ## Is the printer actively printing - def isPrinting(self): - if not self._is_connected or self._serial is None: - return False - return self._is_printing + def _setHeadZ(self, z, speed): + self._sendCommand("G0 Y%s F%s" % (z, speed)) @pyqtSlot() def startPrint(self): @@ -163,7 +136,7 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): ## Start a print based on a g-code. # \param gcode_list List with gcode (strings). def printGCode(self, gcode_list): - if self.isPrinting() or not self._is_connected: + if not self._progress or self._connection_state != ConnectionState.CONNECTED: Logger.log("d", "Printer is busy or not connected, aborting print") self.writeError.emit(self) return @@ -198,7 +171,7 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): def _updateFirmware(self): self.setProgress(0, 100) - if self._is_connecting or self._is_connected: + if self._connection_state != ConnectionState.CLOSED: self.close() hex_file = intelHex.readHex(self._firmware_file_name) @@ -253,14 +226,14 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): self._poll_endstop = False def _pollEndStop(self): - while self._is_connected and self._poll_endstop: + while self._connection_state == ConnectionState.CONNECTED and self._poll_endstop: self.sendCommand("M119") time.sleep(0.5) ## Private connect function run by thread. Can be started by calling connect. def _connect(self): Logger.log("d", "Attempting to connect to %s", self._serial_port) - self._is_connecting = True + self.setConnectionState(ConnectionState.CONNECTING) programmer = stk500v2.Stk500v2() try: programmer.connect(self._serial_port) # Connect with the serial, if this succeeds, it's an arduino based usb device. @@ -277,7 +250,7 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): try: self._serial = serial.Serial(str(self._serial_port), baud_rate, timeout = 3, writeTimeout = 10000) except serial.SerialException: - #Logger.log("i", "Could not open port %s" % self._serial_port) + Logger.log("d", "Could not open port %s" % self._serial_port) continue else: if not self.setBaudRate(baud_rate): @@ -291,15 +264,16 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): while timeout_time > time.time(): line = self._readline() if line is None: - self.setIsConnected(False) # Something went wrong with reading, could be that close was called. + # Something went wrong with reading, could be that close was called. + self.setConnectionState(ConnectionState.CLOSED) return if b"T:" in line: self._serial.timeout = 0.5 sucesfull_responses += 1 if sucesfull_responses >= self._required_responses_auto_baud: - self._serial.timeout = 2 #Reset serial timeout - self.setIsConnected(True) + self._serial.timeout = 2 # Reset serial timeout + self.setConnectionState(ConnectionState.CONNECTED) Logger.log("i", "Established printer connection on port %s" % self._serial_port) return @@ -307,7 +281,7 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): Logger.log("e", "Baud rate detection for %s failed", self._serial_port) self.close() # Unable to connect, wrap up. - self.setIsConnected(False) + self.setConnectionState(ConnectionState.CLOSED) ## Set the baud rate of the serial. This can cause exceptions, but we simply want to ignore those. def setBaudRate(self, baud_rate): @@ -317,21 +291,9 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): except Exception as e: return False - def setIsConnected(self, state): - self._is_connecting = False - if self._is_connected != state: - self._is_connected = state - self.connectionStateChanged.emit(self._serial_port) - if self._is_connected: - self._listen_thread.start() #Start listening - else: - Logger.log("w", "Printer connection state was not changed") - - connectionStateChanged = Signal() - ## Close the printer connection def close(self): - Logger.log("d", "Closing the printer connection.") + Logger.log("d", "Closing the USB printer connection.") if self._connect_thread.isAlive(): try: self._connect_thread.join() @@ -339,10 +301,10 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): Logger.log("d", "PrinterConnection.close: %s (expected)", e) pass # This should work, but it does fail sometimes for some reason - self._connect_thread = threading.Thread(target=self._connect) + self._connect_thread = threading.Thread(target = self._connect) self._connect_thread.daemon = True - self.setIsConnected(False) + self.setConnectionState(ConnectionState.CLOSED) if self._serial is not None: try: self._listen_thread.join() @@ -350,49 +312,10 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): pass self._serial.close() - self._listen_thread = threading.Thread(target=self._listen) + self._listen_thread = threading.Thread(target = self._listen) self._listen_thread.daemon = True self._serial = None - def isConnected(self): - return self._is_connected - - @pyqtSlot(int) - def heatupNozzle(self, temperature): - Logger.log("d", "Setting nozzle temperature to %s", temperature) - self._sendCommand("M104 S%s" % temperature) - - @pyqtSlot(int) - def heatupBed(self, temperature): - Logger.log("d", "Setting bed temperature to %s", temperature) - self._sendCommand("M140 S%s" % temperature) - - @pyqtSlot() - def setMoveToRelative(self): - self._sendCommand("G91") - - @pyqtSlot() - def setMoveToAbsolute(self): - self._sendCommand("G90") - - @pyqtSlot("long", "long","long") - def moveHead(self, x, y, z): - Logger.log("d","Moving head to %s, %s , %s", x, y, z) - self._sendCommand("G0 X%s Y%s Z%s F3000" % (x, y, z)) - - @pyqtSlot("long", "long","long") - def moveHeadRelative(self, x, y, z): - self.setMoveToRelative() - self.moveHead(x,y,z) - self.setMoveToAbsolute() - - @pyqtSlot() - def homeHead(self): - self._sendCommand("G28") - - @pyqtSlot() - def homeBed(self): - self._sendCommand("G28 Z") ## Directly send the command, withouth checking connection state (eg; printing). # \param cmd string with g-code @@ -433,10 +356,6 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): self._setErrorState("Unexpected error while writing serial port %s " % e) self.close() - ## Ensure that close gets called when object is destroyed - def __del__(self): - self.close() - def createControlInterface(self): if self._control_view is None: Logger.log("d", "Creating control interface for printer connection") @@ -456,7 +375,7 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): ## Send a command to printer. # \param cmd string with g-code def sendCommand(self, cmd): - if self.isPrinting(): + if not self._progress: self._command_queue.put(cmd) elif self.isConnected(): self._sendCommand(cmd) @@ -467,24 +386,6 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): self._error_state = error self.onError.emit() - ## Private function to set the temperature of an extruder - # \param index index of the extruder - # \param temperature received temperature - def _setExtruderTemperature(self, index, temperature): - try: - self._extruder_temperatures[index] = temperature - self.extruderTemperatureChanged.emit() - except Exception as e: - Logger.log("d", "PrinterConnection._setExtruderTemperature: ", e) - pass - - ## Private function to set the temperature of the bed. - # As all printers (as of time of writing) only support a single heated bed, - # these are not indexed as with extruders. - def _setBedTemperature(self, temperature): - self._bed_temperature = temperature - self.bedTemperatureChanged.emit() - def requestWrite(self, node, file_name = None, filter_by_machine = False): self.showControlInterface() @@ -507,7 +408,7 @@ class USBPrinterOutputDevice(OutputDevice, QObject, SignalEmitter): Logger.log("i", "Printer connection listen thread started for %s" % self._serial_port) temperature_request_timeout = time.time() ok_timeout = time.time() - while self._is_connected: + while self._connected: line = self._readline() if line is None: From 5ff5a957ae50c666e0216780ff400d737631194f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 16:08:17 +0200 Subject: [PATCH 015/424] Added _setBedTemperature CURA-1339 --- cura/PrinterOutputDevice.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 54550e1aee..9b85b7f2ca 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -47,10 +47,7 @@ class PrinterOutputDevice(OutputDevice, QObject): # /sa _getBedTemperature @pyqtProperty(float, notify = bedTemperatureChanged) def bedTemperature(self): - return self._getBedTemperature() - - def _getBedTemperature(self): - return None + return self._bed_temperature ## Get the temperature of a hot end as defined by index. # /parameter index Index of the hotend to get a temperature from. @@ -59,7 +56,7 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Set the (target) bed temperature # This function is "final" (do not re-implement) - # /sa _setBedTemperature + # /sa _setTargetBedTemperature @pyqtSlot(int) def setTargetBedTemperature(self, temperature): self._setTargetBedTemperature(temperature) @@ -71,6 +68,10 @@ class PrinterOutputDevice(OutputDevice, QObject): def _setTargetBedTemperature(self, temperature): pass + def _setBedTemperature(self, temperature): + self._bed_temperature = temperature + self.bedTemperatureChanged.emit() + ## Get the bed temperature if connected printer (if any) @pyqtProperty(int, notify = bedTemperatureChanged) def bedTemperature(self): From 45b3e8fbd6b2b8487f5702d7e386b79d91d88d8b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 16:56:44 +0200 Subject: [PATCH 016/424] Hotend temperatures now follow same logic as bed CURA-1339 --- cura/PrinterOutputDevice.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 9b85b7f2ca..59d443d835 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -18,8 +18,9 @@ class PrinterOutputDevice(OutputDevice, QObject): self._target_bed_temperature = 0 self._bed_temperature = 0 - self._hotend_temperatures = {} - self._target_hotend_temperatures = {} + self._num_extruders = 1 + self._hotend_temperatures = [0] * self._num_extruders + self._target_hotend_temperatures = [0] * self._num_extruders self._progress = 0 self._head_x = 0 self._head_y = 0 @@ -49,11 +50,6 @@ class PrinterOutputDevice(OutputDevice, QObject): def bedTemperature(self): return self._bed_temperature - ## Get the temperature of a hot end as defined by index. - # /parameter index Index of the hotend to get a temperature from. - def getHotendTemperature(self, index): - raise NotImplementedError("getHotendTemperature needs to be implemented") - ## Set the (target) bed temperature # This function is "final" (do not re-implement) # /sa _setTargetBedTemperature @@ -96,14 +92,18 @@ class PrinterOutputDevice(OutputDevice, QObject): def _setTargetHotendTemperature(self, index, temperature): raise NotImplementedError("_setTargetHotendTemperature needs to be implemented") - @pyqtProperty("QVariantMap", notify = targetHotendTemperaturesChanged) + @pyqtProperty("QVariantList", notify = targetHotendTemperaturesChanged) def targetHotendTemperatures(self): return self._target_hotend_temperatures - @pyqtProperty("QVariantMap", notify = hotendTemperaturesChanged) + @pyqtProperty("QVariantList", notify = hotendTemperaturesChanged) def hotendTemperatures(self): return self._hotend_temperatures + def _setHotendTemperature(self, index, temperature): + self._hotend_temperatures[index] = temperature + self.hotendTemperaturesChanged.emit() + ## Attempt to establish connection def connect(self): pass From 0a46567c179c3b1c12fc4635a77d7c39a4d42cb2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 16:57:08 +0200 Subject: [PATCH 017/424] USB printing now uses printeroutputdevice for temperatures CURA-1339 --- plugins/USBPrinting/ControlWindow.qml | 3 +- plugins/USBPrinting/USBPrinterManager.py | 4 +-- plugins/USBPrinting/USBPrinterOutputDevice.py | 29 +++++-------------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/plugins/USBPrinting/ControlWindow.qml b/plugins/USBPrinting/ControlWindow.qml index 50dfe64f1f..5f6951bedc 100644 --- a/plugins/USBPrinting/ControlWindow.qml +++ b/plugins/USBPrinting/ControlWindow.qml @@ -25,7 +25,8 @@ UM.Dialog Label { //: USB Printing dialog label, %1 is head temperature - text: catalog.i18nc("@label","Extruder Temperature %1").arg(manager.extruderTemperature) + Component.onCompleted: console.log(manager.hotendTemperatures) + text: catalog.i18nc("@label","Extruder Temperature %1").arg(manager.hotendTemperatures[0]) } Label { diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index 1c2c96484f..f49cafeb04 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -197,7 +197,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): self._printer_connections[serial_port] = connection def _onPrinterConnectionStateChanged(self, serial_port): - if self._printer_connections[serial_port].connectionState == ConnectionState.CLOSED: + if self._printer_connections[serial_port].connectionState == ConnectionState.CONNECTED: self.getOutputDeviceManager().addOutputDevice(self._printer_connections[serial_port]) else: self.getOutputDeviceManager().removeOutputDevice(serial_port) @@ -209,7 +209,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): self._printer_connections_model.addRoleName(Qt.UserRole + 1,"name") self._printer_connections_model.addRoleName(Qt.UserRole + 2, "printer") for connection in self._printer_connections: - if self._printer_connections[connection].isConnected: + if self._printer_connections[connection].connectionState == ConnectionState.CONNECTED: self._printer_connections_model.appendItem({"name":connection, "printer": self._printer_connections[connection]}) return self._printer_connections_model diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 4514d58ae3..8de0a74f76 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -69,21 +69,6 @@ class USBPrinterOutputDevice(PrinterOutputDevice): # List of gcode lines to be printed self._gcode = [] - # Number of extruders - self._extruder_count = 1 - - # Temperatures of all extruders - self._extruder_temperatures = [0] * self._extruder_count - - # Target temperatures of all extruders - self._target_extruder_temperatures = [0] * self._extruder_count - - #Target temperature of the bed - self._target_bed_temperature = 0 - - # Temperature of the bed - self._bed_temperature = 0 - # Current Z stage location self._current_z = 0 @@ -274,6 +259,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if sucesfull_responses >= self._required_responses_auto_baud: self._serial.timeout = 2 # Reset serial timeout self.setConnectionState(ConnectionState.CONNECTED) + self._listen_thread.start() # Start listening Logger.log("i", "Established printer connection on port %s" % self._serial_port) return @@ -408,15 +394,14 @@ class USBPrinterOutputDevice(PrinterOutputDevice): Logger.log("i", "Printer connection listen thread started for %s" % self._serial_port) temperature_request_timeout = time.time() ok_timeout = time.time() - while self._connected: + while self._connection_state == ConnectionState.CONNECTED: line = self._readline() - if line is None: break # None is only returned when something went wrong. Stop listening if time.time() > temperature_request_timeout: - if self._extruder_count > 0: - self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._extruder_count + if self._num_extruders > 0: + self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._num_extruders self.sendCommand("M105 T%d" % (self._temperature_requested_extruder_index)) else: self.sendCommand("M105") @@ -437,7 +422,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): elif b" T:" in line or line.startswith(b"T:"): #Temperature message try: - self._setExtruderTemperature(self._temperature_requested_extruder_index,float(re.search(b"T: *([0-9\.]*)", line).group(1))) + self._setHotendTemperature(self._temperature_requested_extruder_index, float(re.search(b"T: *([0-9\.]*)", line).group(1))) except: pass if b"B:" in line: # Check if it's a bed temperature @@ -469,8 +454,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice): else: # Request the temperature on comm timeout (every 2 seconds) when we are not printing.) if line == b"": - if self._extruder_count > 0: - self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._extruder_count + if self._num_extruders > 0: + self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._num_extruders self.sendCommand("M105 T%d" % self._temperature_requested_extruder_index) else: self.sendCommand("M105") From ceb8ef86f80c3da630d70c0d6938d8cff41b2737 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 11:00:03 +0200 Subject: [PATCH 018/424] Added home bed & head functions CURA-1339 --- cura/PrinterOutputDevice.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 59d443d835..794d77d48a 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -1,6 +1,8 @@ from UM.OutputDevice.OutputDevice import OutputDevice from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject from enum import IntEnum # For the connection state tracking. +from UM.Logger import Logger + ## Printer output device adds extra interface options on top of output device. # @@ -59,6 +61,27 @@ class PrinterOutputDevice(OutputDevice, QObject): self._target_bed_temperature = temperature self.targetBedTemperatureChanged.emit() + ## Home the head of the connected printer + # This function is "final" (do not re-implement) + @pyqtSlot() + def homeHead(self): + self._homeHead() + + ## Home the head of the connected printer + # This is an implementation function and should be overriden by children. + def _homeHead(self): + Logger.log("w", "_homeHead is not implemented by this output device") + + ## Home the bed of the connected printer + # This function is "final" (do not re-implement) + def homeBed(self): + self._homeBed() + + ## Home the bed of the connected printer + # This is an implementation function and should be overriden by children.. + def _homeBed(self): + Logger.log("w", "_homeBed is not implemented by this output device") + ## Set the bed temperature of the connected printer (if any). # /parameter temperature Temperature bed needs to go to (in deg celsius) def _setTargetBedTemperature(self, temperature): From 5f2e0ceec8ce484dea35122ec8fda1e5bd2f8a20 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 11:02:16 +0200 Subject: [PATCH 019/424] Fixes so the QML displays right temperatures again CURA-1339 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 4 ++-- resources/qml/WizardPages/UltimakerCheckup.qml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 8de0a74f76..3c724007da 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -121,7 +121,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): ## Start a print based on a g-code. # \param gcode_list List with gcode (strings). def printGCode(self, gcode_list): - if not self._progress or self._connection_state != ConnectionState.CONNECTED: + if self._progress or self._connection_state != ConnectionState.CONNECTED: Logger.log("d", "Printer is busy or not connected, aborting print") self.writeError.emit(self) return @@ -363,7 +363,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def sendCommand(self, cmd): if not self._progress: self._command_queue.put(cmd) - elif self.isConnected(): + elif self._connection_state == ConnectionState.CONNECTED: self._sendCommand(cmd) ## Set the error state with a message. diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index b8c8aebe12..80024545c9 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -239,7 +239,7 @@ Item if(printer_connection != null) { nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking") - printer_connection.heatupNozzle(190) + printer_connection.setHotendTemperature(0, 190) wizardPage.extruder_target_temp = 190 } } @@ -253,7 +253,7 @@ Item anchors.leftMargin: UM.Theme.getSize("default_margin").width width: wizardPage.rightRow * 0.2 wrapMode: Text.WordWrap - text: printer_connection != null ? printer_connection.extruderTemperature + "°C" : "0°C" + text: printer_connection != null ? printer_connection.hotendTemperatures[0] + "°C" : "0°C" font.bold: true } ///////////////////////////////////////////////////////////////////////////// @@ -295,7 +295,7 @@ Item if(printer_connection != null) { bedTempStatus.text = catalog.i18nc("@info:progress","Checking") - printer_connection.heatupBed(60) + printer_connection.setBedTemperature(60) wizardPage.bed_target_temp = 60 } } @@ -348,16 +348,16 @@ Item } } - onExtruderTemperatureChanged: + onHotendTemperaturesChanged: { - if(printer_connection.extruderTemperature > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperature < wizardPage.extruder_target_temp + 10) + if(printer_connection.extruderTemperatures[0] > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperatures[0] < wizardPage.extruder_target_temp + 10) { if(printer_connection != null) { nozzleTempStatus.text = catalog.i18nc("@info:status","Works") wizardPage.checkupProgress.nozzleTemp = true checkTotalCheckUp() - printer_connection.heatupNozzle(0) + printer_connection.setTargetHotendTemperature(0, 0) } } } @@ -368,7 +368,7 @@ Item bedTempStatus.text = catalog.i18nc("@info:status","Works") wizardPage.checkupProgress.bedTemp = true checkTotalCheckUp() - printer_connection.heatupBed(0) + printer_connection.setBedTemperature(0) } } } From 4f3489233ce8942d577bb270851dd2d5fc9c1149 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 11:02:43 +0200 Subject: [PATCH 020/424] Added home head & bed implementations CURA-1339 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 3c724007da..db988b8b6b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -112,6 +112,12 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def _setHeadZ(self, z, speed): self._sendCommand("G0 Y%s F%s" % (z, speed)) + def _homeHead(self): + self._sendCommand("G28") + + def _homeBed(self): + self._sendCommand("G28 Z") + @pyqtSlot() def startPrint(self): self.writeStarted.emit(self) From 58b216828a52f1c6b138a5d480753b0d83754803 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 11:06:11 +0200 Subject: [PATCH 021/424] Added handling for when connection was never correctly added to list CURA-1339 --- plugins/USBPrinting/USBPrinterManager.py | 14 +++++++++----- plugins/USBPrinting/USBPrinterOutputDevice.py | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index f49cafeb04..6e1ef07c0d 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -197,11 +197,15 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): self._printer_connections[serial_port] = connection def _onPrinterConnectionStateChanged(self, serial_port): - if self._printer_connections[serial_port].connectionState == ConnectionState.CONNECTED: - self.getOutputDeviceManager().addOutputDevice(self._printer_connections[serial_port]) - else: - self.getOutputDeviceManager().removeOutputDevice(serial_port) - self.printerConnectionStateChanged.emit() + try: + if self._printer_connections[serial_port].connectionState == ConnectionState.CONNECTED: + self.getOutputDeviceManager().addOutputDevice(self._printer_connections[serial_port]) + else: + self.getOutputDeviceManager().removeOutputDevice(serial_port) + self.printerConnectionStateChanged.emit() + except KeyError: + pass # no output device by this device_id found in connection list. + @pyqtProperty(QObject , notify = printerConnectionStateChanged) def connectedPrinterList(self): diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index db988b8b6b..59402f4fa7 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -117,7 +117,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def _homeBed(self): self._sendCommand("G28 Z") - + @pyqtSlot() def startPrint(self): self.writeStarted.emit(self) From 0c09df71d9b69dde5bdbcdacdad19411c2f260d1 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 11:09:30 +0200 Subject: [PATCH 022/424] wizard now sets Target temperature CURA-1339 --- plugins/USBPrinting/USBPrinterManager.py | 2 +- resources/qml/WizardPages/UltimakerCheckup.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index 6e1ef07c0d..ced91982ea 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -204,7 +204,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): self.getOutputDeviceManager().removeOutputDevice(serial_port) self.printerConnectionStateChanged.emit() except KeyError: - pass # no output device by this device_id found in connection list. + pass # no output device by this device_id found in connection list. @pyqtProperty(QObject , notify = printerConnectionStateChanged) diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index 80024545c9..d59c8be6bd 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -239,7 +239,7 @@ Item if(printer_connection != null) { nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking") - printer_connection.setHotendTemperature(0, 190) + printer_connection.setTargetHotendTemperature(0, 190) wizardPage.extruder_target_temp = 190 } } @@ -295,7 +295,7 @@ Item if(printer_connection != null) { bedTempStatus.text = catalog.i18nc("@info:progress","Checking") - printer_connection.setBedTemperature(60) + printer_connection.setTargetBedTemperature(60) wizardPage.bed_target_temp = 60 } } From 9e8d61aea225db999df34c2d59718f4e788d5173 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 13:03:54 +0200 Subject: [PATCH 023/424] Added missing pyqtslot decorator CURA-1339 --- cura/PrinterOutputDevice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 794d77d48a..91eba34631 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -74,6 +74,7 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Home the bed of the connected printer # This function is "final" (do not re-implement) + @pyqtSlot() def homeBed(self): self._homeBed() From 34b76f3c1eab5da4487422836c2acdc9be6e84f1 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 13:04:16 +0200 Subject: [PATCH 024/424] Implemented _setTargetHotendTemp CURA-1339 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 59402f4fa7..4cb85aa1d8 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -100,6 +100,9 @@ class USBPrinterOutputDevice(PrinterOutputDevice): Logger.log("d", "Setting bed temperature to %s", temperature) self._sendCommand("M140 S%s" % temperature) + def _setTargetHotendTemperature(self, index, temperature): + self._sendCommand("M140 T%s S%s" % (index, temperature)) + def _setHeadPosition(self, x, y , z, speed): self._sendCommand("G0 X%s Y%s Z%s F%s" % (x, y, z, speed)) From 92c0c4b6375f5d8c884bfbaa755dc8aef668d45d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 13:18:05 +0200 Subject: [PATCH 025/424] Remove unusde code CURA-1339 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 4cb85aa1d8..69cdf8c6a6 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -320,19 +320,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if "M109" in cmd or "M190" in cmd: self._heatup_wait_start_time = time.time() - if "M104" in cmd or "M109" in cmd: - try: - t = 0 - if "T" in cmd: - t = int(re.search("T([0-9]+)", cmd).group(1)) - self._target_extruder_temperatures[t] = float(re.search("S([0-9]+)", cmd).group(1)) - except: - pass - if "M140" in cmd or "M190" in cmd: - try: - self._target_bed_temperature = float(re.search("S([0-9]+)", cmd).group(1)) - except: - pass + try: command = (cmd + "\n").encode() self._serial.write(b"\n") @@ -370,7 +358,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): ## Send a command to printer. # \param cmd string with g-code def sendCommand(self, cmd): - if not self._progress: + if self._progress: self._command_queue.put(cmd) elif self._connection_state == ConnectionState.CONNECTED: self._sendCommand(cmd) From 6909ed8765a99f2f2a9fc6e7665b92bc44185c56 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 13:20:55 +0200 Subject: [PATCH 026/424] Changed setBed temp to target bed temp CURA-1339 --- resources/qml/WizardPages/UltimakerCheckup.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index d59c8be6bd..188a7740f0 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -368,7 +368,7 @@ Item bedTempStatus.text = catalog.i18nc("@info:status","Works") wizardPage.checkupProgress.bedTemp = true checkTotalCheckUp() - printer_connection.setBedTemperature(0) + printer_connection.setTargetBedTemperature(0) } } } From 8c971d217dfaf03ff70721c30d876828a00719c0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 13:22:48 +0200 Subject: [PATCH 027/424] Fixed typo in command for setting nozzle temp CURA-1339 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 69cdf8c6a6..567ca664ce 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -101,7 +101,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._sendCommand("M140 S%s" % temperature) def _setTargetHotendTemperature(self, index, temperature): - self._sendCommand("M140 T%s S%s" % (index, temperature)) + Logger.log("d", "Setting hotend %s temperature to %s", index, temperature) + self._sendCommand("M104 T%s S%s" % (index, temperature)) def _setHeadPosition(self, x, y , z, speed): self._sendCommand("G0 X%s Y%s Z%s F%s" % (x, y, z, speed)) From 9ee6323177d4cd6bf166996ace35bd02958dc72b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 13:26:38 +0200 Subject: [PATCH 028/424] wizard now uses correct property CURA-1339 --- resources/qml/WizardPages/UltimakerCheckup.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index 188a7740f0..2aaf4c7543 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -350,7 +350,7 @@ Item onHotendTemperaturesChanged: { - if(printer_connection.extruderTemperatures[0] > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperatures[0] < wizardPage.extruder_target_temp + 10) + if(printer_connection.hotendTemperatures[0] > wizardPage.extruder_target_temp - 10 && printer_connection.hotendTemperatures[0] < wizardPage.extruder_target_temp + 10) { if(printer_connection != null) { From 4b5c118ed2311840663f666a061cdc56a67d8e25 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 13:55:33 +0200 Subject: [PATCH 029/424] Refactoring & documentation CURA-1339 --- plugins/USBPrinting/USBPrinterManager.py | 244 ------------------ plugins/USBPrinting/USBPrinterOutputDevice.py | 48 ++-- plugins/USBPrinting/__init__.py | 6 +- 3 files changed, 28 insertions(+), 270 deletions(-) delete mode 100644 plugins/USBPrinting/USBPrinterManager.py diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py deleted file mode 100644 index ced91982ea..0000000000 --- a/plugins/USBPrinting/USBPrinterManager.py +++ /dev/null @@ -1,244 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Cura is released under the terms of the AGPLv3 or higher. - -from UM.Signal import Signal, SignalEmitter -from . import USBPrinterOutputDevice -from UM.Application import Application -from UM.Resources import Resources -from UM.Logger import Logger -from UM.PluginRegistry import PluginRegistry -from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin -from cura.PrinterOutputDevice import ConnectionState -from UM.Qt.ListModel import ListModel -from UM.Message import Message - -from cura.CuraApplication import CuraApplication - -import threading -import platform -import glob -import time -import os.path -from UM.Extension import Extension - -from PyQt5.QtQml import QQmlComponent, QQmlContext -from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt -from UM.i18n import i18nCatalog -i18n_catalog = i18nCatalog("cura") - -class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): - def __init__(self, parent = None): - QObject.__init__(self, parent) - SignalEmitter.__init__(self) - OutputDevicePlugin.__init__(self) - Extension.__init__(self) - self._serial_port_list = [] - self._printer_connections = {} - self._printer_connections_model = None - self._update_thread = threading.Thread(target = self._updateThread) - self._update_thread.setDaemon(True) - - self._check_updates = True - self._firmware_view = None - - ## Add menu item to top menu of the application. - self.setMenuName(i18n_catalog.i18nc("@title:menu","Firmware")) - self.addMenuItem(i18n_catalog.i18nc("@item:inmenu", "Update Firmware"), self.updateAllFirmware) - - Application.getInstance().applicationShuttingDown.connect(self.stop) - self.addConnectionSignal.connect(self.addConnection) #Because the model needs to be created in the same thread as the QMLEngine, we use a signal. - - addConnectionSignal = Signal() - printerConnectionStateChanged = pyqtSignal() - - progressChanged = pyqtSignal() - - @pyqtProperty(float, notify = progressChanged) - def progress(self): - progress = 0 - for printer_name, connection in self._printer_connections.items(): # TODO: @UnusedVariable "printer_name" - progress += connection.progress - - return progress / len(self._printer_connections) - - def start(self): - self._check_updates = True - self._update_thread.start() - - def stop(self): - self._check_updates = False - try: - self._update_thread.join() - except RuntimeError: - pass - - def _updateThread(self): - while self._check_updates: - result = self.getSerialPortList(only_list_usb = True) - self._addRemovePorts(result) - time.sleep(5) - - ## Show firmware interface. - # This will create the view if its not already created. - def spawnFirmwareInterface(self, serial_port): - if self._firmware_view is None: - path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath("USBPrinting"), "FirmwareUpdateWindow.qml")) - component = QQmlComponent(Application.getInstance()._engine, path) - - self._firmware_context = QQmlContext(Application.getInstance()._engine.rootContext()) - self._firmware_context.setContextProperty("manager", self) - self._firmware_view = component.create(self._firmware_context) - - self._firmware_view.show() - - @pyqtSlot() - def updateAllFirmware(self): - if not self._printer_connections: - Message(i18n_catalog.i18nc("@info","Cannot update firmware, there were no connected printers found.")).show() - return - - self.spawnFirmwareInterface("") - for printer_connection in self._printer_connections: - try: - self._printer_connections[printer_connection].updateFirmware(Resources.getPath(CuraApplication.ResourceTypes.Firmware, self._getDefaultFirmwareName())) - except FileNotFoundError: - self._printer_connections[printer_connection].setProgress(100, 100) - Logger.log("w", "No firmware found for printer %s", printer_connection) - continue - - @pyqtSlot(str, result = bool) - def updateFirmwareBySerial(self, serial_port): - if serial_port in self._printer_connections: - self.spawnFirmwareInterface(self._printer_connections[serial_port].getSerialPort()) - try: - self._printer_connections[serial_port].updateFirmware(Resources.getPath(CuraApplication.ResourceTypes.Firmware, self._getDefaultFirmwareName())) - except FileNotFoundError: - self._firmware_view.close() - Logger.log("e", "Could not find firmware required for this machine") - return False - return True - return False - - ## Return the singleton instance of the USBPrinterManager - @classmethod - def getInstance(cls, engine = None, script_engine = None): - # Note: Explicit use of class name to prevent issues with inheritance. - if USBPrinterManager._instance is None: - USBPrinterManager._instance = cls() - - return USBPrinterManager._instance - - def _getDefaultFirmwareName(self): - machine_instance = Application.getInstance().getMachineManager().getActiveMachineInstance() - machine_type = machine_instance.getMachineDefinition().getId() - if platform.system() == "Linux": - baudrate = 115200 - else: - baudrate = 250000 - - # NOTE: The keyword used here is the id of the machine. You can find the id of your machine in the *.json file, eg. - # https://github.com/Ultimaker/Cura/blob/master/resources/machines/ultimaker_original.json#L2 - # The *.hex files are stored at a seperate repository: - # https://github.com/Ultimaker/cura-binary-data/tree/master/cura/resources/firmware - machine_without_extras = {"bq_witbox" : "MarlinWitbox.hex", - "ultimaker_original" : "MarlinUltimaker-{baudrate}.hex", - "ultimaker_original_plus" : "MarlinUltimaker-UMOP-{baudrate}.hex", - "ultimaker2" : "MarlinUltimaker2.hex", - "ultimaker2_go" : "MarlinUltimaker2go.hex", - "ultimaker2plus" : "MarlinUltimaker2plus.hex", - "ultimaker2_extended" : "MarlinUltimaker2extended.hex", - "ultimaker2_extended_plus" : "MarlinUltimaker2extended-plus.hex", - } - machine_with_heated_bed = {"ultimaker_original" : "MarlinUltimaker-HBK-{baudrate}.hex", - } - - ##TODO: Add check for multiple extruders - hex_file = None - if machine_type in machine_without_extras.keys(): # The machine needs to be defined here! - if machine_type in machine_with_heated_bed.keys() and machine_instance.getMachineSettingValue("machine_heated_bed"): - Logger.log("d", "Choosing firmware with heated bed enabled for machine %s.", machine_type) - hex_file = machine_with_heated_bed[machine_type] # Return firmware with heated bed enabled - else: - Logger.log("d", "Choosing basic firmware for machine %s.", machine_type) - hex_file = machine_without_extras[machine_type] # Return "basic" firmware - else: - Logger.log("e", "There is no firmware for machine %s.", machine_type) - - if hex_file: - return hex_file.format(baudrate=baudrate) - else: - Logger.log("e", "Could not find any firmware for machine %s.", machine_type) - raise FileNotFoundError() - - def _addRemovePorts(self, serial_ports): - # First, find and add all new or changed keys - for serial_port in list(serial_ports): - if serial_port not in self._serial_port_list: - self.addConnectionSignal.emit(serial_port) #Hack to ensure its created in main thread - continue - self._serial_port_list = list(serial_ports) - - connections_to_remove = [] - for port, connection in self._printer_connections.items(): - if port not in self._serial_port_list: - connection.close() - connections_to_remove.append(port) - - for port in connections_to_remove: - del self._printer_connections[port] - - - ## Because the model needs to be created in the same thread as the QMLEngine, we use a signal. - def addConnection(self, serial_port): - connection = USBPrinterOutputDevice.USBPrinterOutputDevice(serial_port) - connection.connect() - connection.connectionStateChanged.connect(self._onPrinterConnectionStateChanged) - connection.progressChanged.connect(self.progressChanged) - self._printer_connections[serial_port] = connection - - def _onPrinterConnectionStateChanged(self, serial_port): - try: - if self._printer_connections[serial_port].connectionState == ConnectionState.CONNECTED: - self.getOutputDeviceManager().addOutputDevice(self._printer_connections[serial_port]) - else: - self.getOutputDeviceManager().removeOutputDevice(serial_port) - self.printerConnectionStateChanged.emit() - except KeyError: - pass # no output device by this device_id found in connection list. - - - @pyqtProperty(QObject , notify = printerConnectionStateChanged) - def connectedPrinterList(self): - self._printer_connections_model = ListModel() - self._printer_connections_model.addRoleName(Qt.UserRole + 1,"name") - self._printer_connections_model.addRoleName(Qt.UserRole + 2, "printer") - for connection in self._printer_connections: - if self._printer_connections[connection].connectionState == ConnectionState.CONNECTED: - self._printer_connections_model.appendItem({"name":connection, "printer": self._printer_connections[connection]}) - return self._printer_connections_model - - ## Create a list of serial ports on the system. - # \param only_list_usb If true, only usb ports are listed - def getSerialPortList(self, only_list_usb = False): - base_list = [] - if platform.system() == "Windows": - import winreg - try: - key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,"HARDWARE\\DEVICEMAP\\SERIALCOMM") - i = 0 - while True: - values = winreg.EnumValue(key, i) - if not only_list_usb or "USBSER" in values[0]: - base_list += [values[1]] - i += 1 - except Exception as e: - pass - else: - if only_list_usb: - base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*") - base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list - else: - base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.*") + glob.glob("/dev/tty.usb*") + glob.glob("/dev/rfcomm*") + glob.glob("/dev/serial/by-id/*") - return list(base_list) - - _instance = None diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 567ca664ce..5536d6c74b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -72,6 +72,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): # Current Z stage location self._current_z = 0 + # Check if endstops are ever pressed (used for first run) self._x_min_endstop_pressed = False self._y_min_endstop_pressed = False self._z_min_endstop_pressed = False @@ -140,14 +141,14 @@ class USBPrinterOutputDevice(PrinterOutputDevice): for layer in gcode_list: self._gcode.extend(layer.split("\n")) - #Reset line number. If this is not done, first line is sometimes ignored + # Reset line number. If this is not done, first line is sometimes ignored self._gcode.insert(0, "M110") self._gcode_position = 0 self._print_start_time_100 = None self._is_printing = True self._print_start_time = time.time() - for i in range(0, 4): #Push first 4 entries before accepting other inputs + for i in range(0, 4): # Push first 4 entries before accepting other inputs self._sendNextGcodeLine() self.writeFinished.emit(self) @@ -162,7 +163,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if not self._updating_firmware and not self._connect_thread.isAlive(): self._connect_thread.start() - ## Private fuction (threaded) that actually uploads the firmware. + ## Private function (threaded) that actually uploads the firmware. def _updateFirmware(self): self.setProgress(0, 100) @@ -182,7 +183,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice): except Exception: pass - time.sleep(1) # Give programmer some time to connect. Might need more in some cases, but this worked in all tested cases. + # Give programmer some time to connect. Might need more in some cases, but this worked in all tested cases. + time.sleep(1) if not programmer.isConnected(): Logger.log("e", "Unable to connect with serial. Could not update firmware") @@ -238,7 +240,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice): except Exception as e: Logger.log("i", "Could not establish connection on %s, unknown reasons. Device is not arduino based." % self._serial_port) - # If the programmer connected, we know its an atmega based version. Not all that useful, but it does give some debugging information. + # If the programmer connected, we know its an atmega based version. + # Not all that useful, but it does give some debugging information. for baud_rate in self._getBaudrateList(): # Cycle all baud rates (auto detect) Logger.log("d","Attempting to connect to printer with serial %s on baud rate %s", self._serial_port, baud_rate) if self._serial is None: @@ -259,7 +262,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): while timeout_time > time.time(): line = self._readline() if line is None: - # Something went wrong with reading, could be that close was called. + # Something went wrong with reading, could be that close was called. self.setConnectionState(ConnectionState.CLOSED) return @@ -273,10 +276,10 @@ class USBPrinterOutputDevice(PrinterOutputDevice): Logger.log("i", "Established printer connection on port %s" % self._serial_port) return - self._sendCommand("M105") # Send M105 as long as we are listening, otherwise we end up in an undefined state + self._sendCommand("M105") # Send M105 as long as we are listening, otherwise we end up in an undefined state Logger.log("e", "Baud rate detection for %s failed", self._serial_port) - self.close() # Unable to connect, wrap up. + self.close() # Unable to connect, wrap up. self.setConnectionState(ConnectionState.CLOSED) ## Set the baud rate of the serial. This can cause exceptions, but we simply want to ignore those. @@ -312,7 +315,6 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._listen_thread.daemon = True self._serial = None - ## Directly send the command, withouth checking connection state (eg; printing). # \param cmd string with g-code def _sendCommand(self, cmd): @@ -395,7 +397,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): while self._connection_state == ConnectionState.CONNECTED: line = self._readline() if line is None: - break # None is only returned when something went wrong. Stop listening + break # None is only returned when something went wrong. Stop listening if time.time() > temperature_request_timeout: if self._num_extruders > 0: @@ -408,8 +410,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if line.startswith(b"Error:"): # Oh YEAH, consistency. # Marlin reports a MIN/MAX temp error as "Error:x\n: Extruder switched off. MAXTEMP triggered !\n" - # But a bed temp error is reported as "Error: Temperature heated bed switched off. MAXTEMP triggered !!" - # So we can have an extra newline in the most common case. Awesome work people. + # But a bed temp error is reported as "Error: Temperature heated bed switched off. MAXTEMP triggered !!" + # So we can have an extra newline in the most common case. Awesome work people. if re.match(b"Error:[0-9]\n", line): line = line.rstrip() + self._readline() @@ -418,12 +420,12 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if not self.hasError(): self._setErrorState(line[6:]) - elif b" T:" in line or line.startswith(b"T:"): #Temperature message + elif b" T:" in line or line.startswith(b"T:"): # Temperature message try: self._setHotendTemperature(self._temperature_requested_extruder_index, float(re.search(b"T: *([0-9\.]*)", line).group(1))) except: pass - if b"B:" in line: # Check if it's a bed temperature + if b"B:" in line: # Check if it's a bed temperature try: self._setBedTemperature(float(re.search(b"B: *([0-9\.]*)", line).group(1))) except Exception as e: @@ -435,7 +437,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if self._is_printing: if line == b"" and time.time() > ok_timeout: - line = b"ok" # Force a timeout (basicly, send next command) + line = b"ok" # Force a timeout (basically, send next command) if b"ok" in line: ok_timeout = time.time() + 5 @@ -443,14 +445,14 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._sendCommand(self._command_queue.get()) else: self._sendNextGcodeLine() - elif b"resend" in line.lower() or b"rs" in line: # Because a resend can be asked with "resend" and "rs" + elif b"resend" in line.lower() or b"rs" in line: # Because a resend can be asked with "resend" and "rs" try: self._gcode_position = int(line.replace(b"N:",b" ").replace(b"N",b" ").replace(b":",b" ").split()[-1]) except: if b"rs" in line: self._gcode_position = int(line.split()[1]) - else: # Request the temperature on comm timeout (every 2 seconds) when we are not printing.) + else: # Request the temperature on comm timeout (every 2 seconds) when we are not printing.) if line == b"": if self._num_extruders > 0: self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._num_extruders @@ -472,7 +474,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): line = line.strip() try: if line == "M0" or line == "M1": - line = "M105" #Don't send the M0 or M1 to the machine, as M0 and M1 are handled as an LCD menu pause. + line = "M105" # Don't send the M0 or M1 to the machine, as M0 and M1 are handled as an LCD menu pause. if ("G0" in line or "G1" in line) and "Z" in line: z = float(re.search("Z([0-9\.]*)", line).group(1)) if self._current_z != z: @@ -484,13 +486,13 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._sendCommand("N%d%s*%d" % (self._gcode_position, line, checksum)) self._gcode_position += 1 - self.setProgress(( self._gcode_position / len(self._gcode)) * 100) + self.setProgress((self._gcode_position / len(self._gcode)) * 100) self.progressChanged.emit() ## Set the progress of the print. # It will be normalized (based on max_progress) to range 0 - 100 def setProgress(self, progress, max_progress = 100): - self._progress = (progress / max_progress) * 100 #Convert to scale of 0-100 + self._progress = (progress / max_progress) * 100 # Convert to scale of 0-100 self.progressChanged.emit() ## Cancel the current print. Printer connection wil continue to listen. @@ -507,7 +509,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): ## Check if the process did not encounter an error yet. def hasError(self): - return self._error_state != None + return self._error_state is not None ## private read line used by printer connection to listen for data on serial port. def _readline(self): @@ -516,7 +518,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): try: ret = self._serial.readline() except Exception as e: - Logger.log("e","Unexpected error while reading serial port. %s" %e) + Logger.log("e", "Unexpected error while reading serial port. %s" % e) self._setErrorState("Printer has been disconnected") self.close() return None @@ -530,7 +532,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def _onFirmwareUpdateComplete(self): self._update_firmware_thread.join() - self._update_firmware_thread = threading.Thread(target= self._updateFirmware) + self._update_firmware_thread = threading.Thread(target = self._updateFirmware) self._update_firmware_thread.daemon = True self.connect() diff --git a/plugins/USBPrinting/__init__.py b/plugins/USBPrinting/__init__.py index 47f5de321f..281aecd682 100644 --- a/plugins/USBPrinting/__init__.py +++ b/plugins/USBPrinting/__init__.py @@ -1,7 +1,7 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. -from . import USBPrinterManager +from . import USBPrinterOutputDeviceManager from PyQt5.QtQml import qmlRegisterType, qmlRegisterSingletonType from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("cura") @@ -19,5 +19,5 @@ def getMetaData(): } def register(app): - qmlRegisterSingletonType(USBPrinterManager.USBPrinterManager, "UM", 1, 0, "USBPrinterManager", USBPrinterManager.USBPrinterManager.getInstance) - return {"extension":USBPrinterManager.USBPrinterManager.getInstance(),"output_device": USBPrinterManager.USBPrinterManager.getInstance() } + qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "UM", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance) + return {"extension":USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance(), "output_device": USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance()} From fc88844cf87d0d7a895b21c1d9df50220af9d645 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 14:05:36 +0200 Subject: [PATCH 030/424] Added relative move option CURA-1339 --- cura/PrinterOutputDevice.py | 16 ++++++++++++++++ plugins/USBPrinting/USBPrinterOutputDevice.py | 3 --- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 91eba34631..1eff1b945a 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -203,6 +203,22 @@ class PrinterOutputDevice(OutputDevice, QObject): def setHeadZ(self, z, speed = 3000): self._setHeadY(z, speed) + ## Move the head of the printer. + # Note that this is a relative move. If you want to move the head to a specific position you can use + # setHeadPosition + # This function is "final" (do not re-implement) + # /param x distance in x to move + # /param y distance in y to move + # /param z distance in z to move + # /param speed Speed by which it needs to move (in mm/minute) + @pyqtSlot("long", "long", "long") + @pyqtSlot("long", "long", "long", "long") + def moveHead(self, x = 0, y = 0, z = 0, speed = 3000): + self._moveHead(x, y, z, speed) + + def _moveHead(self, x, y, z, speed): + pass + def _setHeadPosition(self, x, y, z, speed): pass diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 5536d6c74b..8262aaf3c4 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -69,9 +69,6 @@ class USBPrinterOutputDevice(PrinterOutputDevice): # List of gcode lines to be printed self._gcode = [] - # Current Z stage location - self._current_z = 0 - # Check if endstops are ever pressed (used for first run) self._x_min_endstop_pressed = False self._y_min_endstop_pressed = False From 6b7fb894f8c634b3fa2d4cb05242638ec31c3cea Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 14:21:22 +0200 Subject: [PATCH 031/424] Added moveHead to usb printing And ensured that wizard page uses correct version again CURA-1339 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 5 +++++ resources/qml/WizardPages/Bedleveling.qml | 22 +++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 8262aaf3c4..fbf9e376b6 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -126,6 +126,11 @@ class USBPrinterOutputDevice(PrinterOutputDevice): gcode_list = getattr( Application.getInstance().getController().getScene(), "gcode_list") self.printGCode(gcode_list) + def _moveHead(self, x, y, z, speed): + self._sendCommand("G91") + self._sendCommand("G0 X%s Y%s Z%s F%s" % (x, y, z, speed)) + self._sendCommand("G90") + ## Start a print based on a g-code. # \param gcode_list List with gcode (strings). def printGCode(self, gcode_list): diff --git a/resources/qml/WizardPages/Bedleveling.qml b/resources/qml/WizardPages/Bedleveling.qml index 1721f0fd4a..256b858792 100644 --- a/resources/qml/WizardPages/Bedleveling.qml +++ b/resources/qml/WizardPages/Bedleveling.qml @@ -22,7 +22,7 @@ Item Component.onCompleted: { printer_connection.homeBed() - printer_connection.moveHeadRelative(0, 0, 3) + printer_connection.moveHead(0, 0, 3) printer_connection.homeHead() } UM.I18nCatalog { id: catalog; name:"cura"} @@ -84,23 +84,23 @@ Item { if(wizardPage.leveling_state == 0) { - printer_connection.moveHeadRelative(0, 0, 3) + printer_connection.moveHead(0, 0, 3) printer_connection.homeHead() - printer_connection.moveHeadRelative(0, 0, 3) - printer_connection.moveHeadRelative(platform_width - 10, 0, 0) - printer_connection.moveHeadRelative(0, 0, -3) + printer_connection.moveHead(0, 0, 3) + printer_connection.moveHead(platform_width - 10, 0, 0) + printer_connection.moveHead(0, 0, -3) } if(wizardPage.leveling_state == 1) { - printer_connection.moveHeadRelative(0, 0, 3) - printer_connection.moveHeadRelative(-platform_width/2, platform_height - 10, 0) - printer_connection.moveHeadRelative(0, 0, -3) + printer_connection.moveHead(0, 0, 3) + printer_connection.moveHead(-platform_width/2, platform_height - 10, 0) + printer_connection.moveHead(0, 0, -3) } if(wizardPage.leveling_state == 2) { - printer_connection.moveHeadRelative(0, 0, 3) - printer_connection.moveHeadRelative(-platform_width/2 + 10, -(platform_height + 10), 0) - printer_connection.moveHeadRelative(0, 0, -3) + printer_connection.moveHead(0, 0, 3) + printer_connection.moveHead(-platform_width/2 + 10, -(platform_height + 10), 0) + printer_connection.moveHead(0, 0, -3) } wizardPage.leveling_state++ if (wizardPage.leveling_state >= 3){ From 6f7b80299e2a8a901c840200d574308189ee0736 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 15:46:16 +0200 Subject: [PATCH 032/424] Added warning logging CURA-1339 --- cura/PrinterOutputDevice.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 1eff1b945a..e045b1912f 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -86,7 +86,7 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Set the bed temperature of the connected printer (if any). # /parameter temperature Temperature bed needs to go to (in deg celsius) def _setTargetBedTemperature(self, temperature): - pass + Logger.log("w", "_setTargetBedTemperature is not implemented by this output device") def _setBedTemperature(self, temperature): self._bed_temperature = temperature @@ -114,7 +114,7 @@ class PrinterOutputDevice(OutputDevice, QObject): self.targetHotendTemperaturesChanged.emit() def _setTargetHotendTemperature(self, index, temperature): - raise NotImplementedError("_setTargetHotendTemperature needs to be implemented") + Logger.log("w", "_setTargetHotendTemperature is not implemented by this output device") @pyqtProperty("QVariantList", notify = targetHotendTemperaturesChanged) def targetHotendTemperatures(self): @@ -217,19 +217,19 @@ class PrinterOutputDevice(OutputDevice, QObject): self._moveHead(x, y, z, speed) def _moveHead(self, x, y, z, speed): - pass + Logger.log("w", "_moveHead is not implemented by this output device") def _setHeadPosition(self, x, y, z, speed): - pass + Logger.log("w", "_setHeadPosition is not implemented by this output device") def _setHeadX(self, x, speed): - pass + Logger.log("w", "_setHeadX is not implemented by this output device") def _setHeadY(self, y, speed): - pass + Logger.log("w", "_setHeadY is not implemented by this output device") def _setHeadZ(self, z, speed): - pass + Logger.log("w", "_setHeadZ is not implemented by this output device") ## Get the progress of any currently active process. # This function is "final" (do not re-implement) From c2b1753d25573fb588d23420d1c1f6543fd481c4 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 14 Apr 2016 15:59:10 +0200 Subject: [PATCH 033/424] Updated documentation CURA-1339 --- cura/PrinterOutputDevice.py | 62 ++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 5 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index e045b1912f..fb4a851676 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -47,14 +47,15 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Get the bed temperature of the bed (if any) # This function is "final" (do not re-implement) - # /sa _getBedTemperature + # /sa _getBedTemperature implementation function @pyqtProperty(float, notify = bedTemperatureChanged) def bedTemperature(self): return self._bed_temperature ## Set the (target) bed temperature # This function is "final" (do not re-implement) - # /sa _setTargetBedTemperature + # /param temperature new target temperature of the bed (in deg C) + # /sa _setTargetBedTemperature implementation function @pyqtSlot(int) def setTargetBedTemperature(self, temperature): self._setTargetBedTemperature(temperature) @@ -63,6 +64,7 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Home the head of the connected printer # This function is "final" (do not re-implement) + # /sa _homeHead implementation function @pyqtSlot() def homeHead(self): self._homeHead() @@ -74,20 +76,26 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Home the bed of the connected printer # This function is "final" (do not re-implement) + # /sa _homeBed implementation function @pyqtSlot() def homeBed(self): self._homeBed() ## Home the bed of the connected printer - # This is an implementation function and should be overriden by children.. + # This is an implementation function and should be overriden by children. + # /sa homeBed def _homeBed(self): Logger.log("w", "_homeBed is not implemented by this output device") - ## Set the bed temperature of the connected printer (if any). + ## Protected setter for the bed temperature of the connected printer (if any). # /parameter temperature Temperature bed needs to go to (in deg celsius) + # /sa setTargetBedTemperature def _setTargetBedTemperature(self, temperature): Logger.log("w", "_setTargetBedTemperature is not implemented by this output device") + ## Protected setter for the current bed temperature. + # This simply sets the bed temperature, but ensures that a signal is emitted. + # /param temperature temperature of the bed. def _setBedTemperature(self, temperature): self._bed_temperature = temperature self.bedTemperatureChanged.emit() @@ -106,13 +114,17 @@ class PrinterOutputDevice(OutputDevice, QObject): # This function is "final" (do not re-implement) # /param index the index of the hotend that needs to change temperature # /param temperature The temperature it needs to change to (in deg celsius). - # /sa _setTargetHotendTemperature + # /sa _setTargetHotendTemperature implementation function @pyqtSlot(int, int) def setTargetHotendTemperature(self, index, temperature): self._setTargetHotendTemperature(index, temperature) self._target_hotend_temperatures[index] = temperature self.targetHotendTemperaturesChanged.emit() + ## Implementation function of setTargetHotendTemperature. + # /param index Index of the hotend to set the temperature of + # /param temperature Temperature to set the hotend to (in deg C) + # /sa setTargetHotendTemperature def _setTargetHotendTemperature(self, index, temperature): Logger.log("w", "_setTargetHotendTemperature is not implemented by this output device") @@ -124,6 +136,10 @@ class PrinterOutputDevice(OutputDevice, QObject): def hotendTemperatures(self): return self._hotend_temperatures + ## Protected setter for the current hotend temperature. + # This simply sets the hotend temperature, but ensures that a signal is emitted. + # /param index Index of the hotend + # /param temperature temperature of the hotend (in deg C) def _setHotendTemperature(self, index, temperature): self._hotend_temperatures[index] = temperature self.hotendTemperaturesChanged.emit() @@ -132,6 +148,7 @@ class PrinterOutputDevice(OutputDevice, QObject): def connect(self): pass + ## Attempt to close the connection def close(self): pass @@ -139,6 +156,8 @@ class PrinterOutputDevice(OutputDevice, QObject): def connectionState(self): return self._connection_state + ## Set the connection state of this output device. + # /param connection_state ConnectionState enum. def setConnectionState(self, connection_state): self._connection_state = connection_state self.connectionStateChanged.emit(self._id) @@ -169,7 +188,11 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Set the position of the head. # In some machines it's actually the bed that moves. For convenience sake we simply see it all as head movements. # This function is "final" (do not re-implement) + # /param x new x location of the head. + # /param y new y location of the head. + # /param z new z location of the head. # /param speed Speed by which it needs to move (in mm/minute) + # /sa _setHeadPosition implementation function @pyqtSlot("long", "long", "long") @pyqtSlot("long", "long", "long", "long") def setHeadPosition(self, x, y, z, speed = 3000): @@ -179,6 +202,7 @@ class PrinterOutputDevice(OutputDevice, QObject): # This function is "final" (do not re-implement) # /param x x position head needs to move to. # /param speed Speed by which it needs to move (in mm/minute) + # /sa _setHeadx implementation function @pyqtSlot("long") @pyqtSlot("long", "long") def setHeadX(self, x, speed = 3000): @@ -188,6 +212,7 @@ class PrinterOutputDevice(OutputDevice, QObject): # This function is "final" (do not re-implement) # /param y y position head needs to move to. # /param speed Speed by which it needs to move (in mm/minute) + # /sa _setHeadY implementation function @pyqtSlot("long") @pyqtSlot("long", "long") def setHeadY(self, y, speed = 3000): @@ -198,6 +223,7 @@ class PrinterOutputDevice(OutputDevice, QObject): # This function is "final" (do not re-implement) # /param z z position head needs to move to. # /param speed Speed by which it needs to move (in mm/minute) + # /sa _setHeadZ implementation function @pyqtSlot("long") @pyqtSlot("long", "long") def setHeadZ(self, z, speed = 3000): @@ -211,23 +237,48 @@ class PrinterOutputDevice(OutputDevice, QObject): # /param y distance in y to move # /param z distance in z to move # /param speed Speed by which it needs to move (in mm/minute) + # /sa _moveHead implementation function @pyqtSlot("long", "long", "long") @pyqtSlot("long", "long", "long", "long") def moveHead(self, x = 0, y = 0, z = 0, speed = 3000): self._moveHead(x, y, z, speed) + ## Implementation function of moveHead. + # /param x distance in x to move + # /param y distance in y to move + # /param z distance in z to move + # /param speed Speed by which it needs to move (in mm/minute) + # /sa moveHead def _moveHead(self, x, y, z, speed): Logger.log("w", "_moveHead is not implemented by this output device") + ## Implementation function of setHeadPosition. + # /param x new x location of the head. + # /param y new y location of the head. + # /param z new z location of the head. + # /param speed Speed by which it needs to move (in mm/minute) + # /sa setHeadPosition def _setHeadPosition(self, x, y, z, speed): Logger.log("w", "_setHeadPosition is not implemented by this output device") + ## Implementation function of setHeadX. + # /param x new x location of the head. + # /param speed Speed by which it needs to move (in mm/minute) + # /sa setHeadX def _setHeadX(self, x, speed): Logger.log("w", "_setHeadX is not implemented by this output device") + ## Implementation function of setHeadY. + # /param y new y location of the head. + # /param speed Speed by which it needs to move (in mm/minute) + # /sa _setHeadY def _setHeadY(self, y, speed): Logger.log("w", "_setHeadY is not implemented by this output device") + ## Implementation function of setHeadZ. + # /param z new z location of the head. + # /param speed Speed by which it needs to move (in mm/minute) + # /sa _setHeadZ def _setHeadZ(self, z, speed): Logger.log("w", "_setHeadZ is not implemented by this output device") @@ -240,6 +291,7 @@ class PrinterOutputDevice(OutputDevice, QObject): return self._progress ## Set the progress of any currently active process + # /param progress Progress of the process. def setProgress(self, progress): self._progress = progress self.progressChanged.emit() From efb5c668fe6b7bb23ff9d64b884eb3a22a672a94 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Thu, 14 Apr 2016 17:13:29 +0200 Subject: [PATCH 034/424] USBPrinting: Adding entry for BQ Hephestos 2 firmware --- plugins/USBPrinting/USBPrinterManager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index 6dc88f59d5..32181a77f8 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -141,6 +141,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): # The *.hex files are stored at a seperate repository: # https://github.com/Ultimaker/cura-binary-data/tree/master/cura/resources/firmware machine_without_extras = {"bq_witbox" : "MarlinWitbox.hex", + "bq_hephestos_2" : "MarlinHephestos2.hex", "ultimaker_original" : "MarlinUltimaker-{baudrate}.hex", "ultimaker_original_plus" : "MarlinUltimaker-UMOP-{baudrate}.hex", "ultimaker2" : "MarlinUltimaker2.hex", From 3776d3c6d236cbaaba08d002ca740ad459b334e2 Mon Sep 17 00:00:00 2001 From: Tom Heijmans Date: Fri, 15 Apr 2016 13:33:30 +0200 Subject: [PATCH 035/424] Updated material & UM2+ profiles --- resources/profiles/materials/abs.cfg | 7 ++++--- resources/profiles/materials/cpe.cfg | 3 ++- resources/profiles/materials/pla.cfg | 2 ++ .../ultimaker2+/abs_0.25_normal.curaprofile | 17 ++++++---------- .../ultimaker2+/abs_0.4_fast.curaprofile | 15 +++++--------- .../ultimaker2+/abs_0.4_high.curaprofile | 12 +++-------- .../ultimaker2+/abs_0.4_normal.curaprofile | 13 +++--------- .../ultimaker2+/abs_0.6_normal.curaprofile | 12 +++-------- .../ultimaker2+/abs_0.8_normal.curaprofile | 12 +++-------- .../ultimaker2+/cpe_0.25_normal.curaprofile | 17 +++++----------- .../ultimaker2+/cpe_0.4_fast.curaprofile | 12 ++++------- .../ultimaker2+/cpe_0.4_high.curaprofile | 19 +++++------------- .../ultimaker2+/cpe_0.4_normal.curaprofile | 16 +++++---------- .../ultimaker2+/cpe_0.6_normal.curaprofile | 20 ++++++------------- .../ultimaker2+/cpe_0.8_normal.curaprofile | 19 ++++++------------ .../ultimaker2+/pla_0.25_normal.curaprofile | 14 ++++--------- .../ultimaker2+/pla_0.4_fast.curaprofile | 15 +++++--------- .../ultimaker2+/pla_0.4_high.curaprofile | 14 ++++--------- .../ultimaker2+/pla_0.4_normal.curaprofile | 13 ++++-------- .../ultimaker2+/pla_0.6_normal.curaprofile | 13 ++++-------- .../ultimaker2+/pla_0.8_normal.curaprofile | 16 +++++---------- 21 files changed, 88 insertions(+), 193 deletions(-) diff --git a/resources/profiles/materials/abs.cfg b/resources/profiles/materials/abs.cfg index 3d05d7003a..d5fe2cc199 100644 --- a/resources/profiles/materials/abs.cfg +++ b/resources/profiles/materials/abs.cfg @@ -4,7 +4,8 @@ type = material name = ABS [settings] -material_bed_temperature = 100 -material_flow = 107 material_print_temperature = 250 -cool_fan_speed = 50 +material_bed_temperature = 80 +material_flow = 107 +retraction_amount = 6.5 + diff --git a/resources/profiles/materials/cpe.cfg b/resources/profiles/materials/cpe.cfg index 3f1b33d74a..e389bdb23a 100644 --- a/resources/profiles/materials/cpe.cfg +++ b/resources/profiles/materials/cpe.cfg @@ -5,4 +5,5 @@ name = CPE [settings] material_print_temperature = 250 -cool_fan_speed = 50 +material_bed_temperature = 70 +retraction_amount = 6.5 diff --git a/resources/profiles/materials/pla.cfg b/resources/profiles/materials/pla.cfg index 8aead264d8..216f2bfb66 100644 --- a/resources/profiles/materials/pla.cfg +++ b/resources/profiles/materials/pla.cfg @@ -4,3 +4,5 @@ type = material name = PLA [settings] +material_bed_temperature = 60 +retraction_amount = 6.5 diff --git a/resources/profiles/ultimaker2+/abs_0.25_normal.curaprofile b/resources/profiles/ultimaker2+/abs_0.25_normal.curaprofile index 15632a183b..9f45e9d01a 100644 --- a/resources/profiles/ultimaker2+/abs_0.25_normal.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.25_normal.curaprofile @@ -1,6 +1,6 @@ [general] version = 1 -name = Normal Quality +name = High Quality machine_type = ultimaker2plus machine_variant = 0.25 mm material = ABS @@ -9,17 +9,12 @@ weight = -2 [settings] layer_height = 0.06 wall_thickness = 0.88 -line_width = 0.22 top_bottom_thickness = 0.72 infill_sparse_density = 22 -speed_print = 20 -layer_height_0 = 0.15 -speed_layer_0 = 20 -speed_infill = 30 -speed_topbottom = 20 -speed_wall_x = 25 -cool_min_layer_time = 2 -cool_min_speed = 10 -cool_lift_head = True +speed_print = 30 +cool_min_layer_time = 3 cool_fan_speed_min = 20 +cool_min_speed = 10 +cool_min_layer_time_fan_speed_max = 15 + diff --git a/resources/profiles/ultimaker2+/abs_0.4_fast.curaprofile b/resources/profiles/ultimaker2+/abs_0.4_fast.curaprofile index 03c5cad45f..50018372b5 100644 --- a/resources/profiles/ultimaker2+/abs_0.4_fast.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.4_fast.curaprofile @@ -9,18 +9,13 @@ weight = -1 [settings] layer_height = 0.15 wall_thickness = 0.7 -line_width = 0.35 top_bottom_thickness = 0.75 infill_sparse_density = 18 -speed_print = 40 -layer_height_0 = 0.26 -speed_layer_0 = 30 +speed_print = 55 speed_travel = 150 -speed_infill = 55 -speed_topbottom = 30 -speed_wall_0 = 30 +speed_layer_0 = 30 cool_min_layer_time = 3 -cool_min_speed = 20 -cool_lift_head = True -cool_fan_speed_min = 50 +cool_fan_speed_min = 20 +cool_min_speed = 10 +cool_min_layer_time_fan_speed_max = 15 diff --git a/resources/profiles/ultimaker2+/abs_0.4_high.curaprofile b/resources/profiles/ultimaker2+/abs_0.4_high.curaprofile index 30867e8605..341c9cc34f 100644 --- a/resources/profiles/ultimaker2+/abs_0.4_high.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.4_high.curaprofile @@ -9,17 +9,11 @@ weight = -3 [settings] layer_height = 0.06 wall_thickness = 1.05 -line_width = 0.35 top_bottom_thickness = 0.72 infill_sparse_density = 22 -speed_print = 30 -layer_height_0 = 0.26 -speed_layer_0 = 20 -speed_infill = 45 -speed_topbottom = 20 -speed_wall_0 = 20 +speed_print = 45 cool_min_layer_time = 3 -cool_min_speed = 10 cool_fan_speed_min = 20 -cool_lift_head = True +cool_min_speed = 10 +cool_min_layer_time_fan_speed_max = 15 diff --git a/resources/profiles/ultimaker2+/abs_0.4_normal.curaprofile b/resources/profiles/ultimaker2+/abs_0.4_normal.curaprofile index a073713649..d8fce8a4dd 100644 --- a/resources/profiles/ultimaker2+/abs_0.4_normal.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.4_normal.curaprofile @@ -9,17 +9,10 @@ weight = -2 [settings] layer_height = 0.1 wall_thickness = 1.05 -line_width = 0.35 top_bottom_thickness = 0.8 infill_sparse_density = 20 -speed_print = 30 -layer_height_0 = 0.26 -speed_layer_0 = 20 -speed_infill = 45 -speed_topbottom = 20 -speed_wall_0 = 20 +speed_print = 45 cool_min_layer_time = 3 -cool_fan_speed_min = 50 +cool_fan_speed_min = 20 cool_min_speed = 10 -cool_lift_head = True - +cool_min_layer_time_fan_speed_max = 15 diff --git a/resources/profiles/ultimaker2+/abs_0.6_normal.curaprofile b/resources/profiles/ultimaker2+/abs_0.6_normal.curaprofile index 7f14ef04a2..5512450471 100644 --- a/resources/profiles/ultimaker2+/abs_0.6_normal.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.6_normal.curaprofile @@ -9,18 +9,12 @@ weight = -2 [settings] layer_height = 0.15 wall_thickness = 1.59 -line_width = 0.53 top_bottom_thickness = 1.2 infill_sparse_density = 20 -speed_print = 25 -layer_height_0 = 0.39 -speed_layer_0 = 20 -speed_infill = 40 -speed_topbottom = 20 -speed_wall_0 = 20 -speed_wall_x = 30 +speed_print = 40 cool_min_layer_time = 3 cool_fan_speed_min = 50 cool_min_speed = 20 -cool_lift_head = True +cool_min_layer_time_fan_speed_max = 20 + diff --git a/resources/profiles/ultimaker2+/abs_0.8_normal.curaprofile b/resources/profiles/ultimaker2+/abs_0.8_normal.curaprofile index 7851f82cee..e5f27c51a2 100644 --- a/resources/profiles/ultimaker2+/abs_0.8_normal.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.8_normal.curaprofile @@ -1,6 +1,6 @@ [general] version = 1 -name = Normal Quality +name = Fast Print machine_type = ultimaker2plus machine_variant = 0.8 mm material = ABS @@ -9,17 +9,11 @@ weight = -2 [settings] layer_height = 0.2 wall_thickness = 2.1 -line_width = 0.7 -speed_print = 20 top_bottom_thickness = 1.2 infill_sparse_density = 20 -layer_height_0 = 0.5 -speed_layer_0 = 20 -speed_infill = 40 -speed_topbottom = 20 -speed_wall_x = 30 +speed_print = 40 cool_min_layer_time = 3 cool_fan_speed_min = 50 cool_min_speed = 15 -cool_lift_head = True +cool_min_layer_time_fan_speed_max = 25 diff --git a/resources/profiles/ultimaker2+/cpe_0.25_normal.curaprofile b/resources/profiles/ultimaker2+/cpe_0.25_normal.curaprofile index 7003b825b5..c4c09932d8 100644 --- a/resources/profiles/ultimaker2+/cpe_0.25_normal.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.25_normal.curaprofile @@ -1,6 +1,6 @@ [general] version = 1 -name = Normal Quality +name = High Quality machine_type = ultimaker2plus machine_variant = 0.25 mm material = CPE @@ -9,18 +9,11 @@ weight = -2 [settings] layer_height = 0.06 wall_thickness = 0.88 -line_width = 0.22 top_bottom_thickness = 0.72 infill_sparse_density = 22 -speed_print = 20 -layer_height_0 = 0.15 -speed_layer_0 = 20 -speed_infill = 30 -speed_topbottom = 20 -speed_wall_x = 25 +speed_print = 30 cool_min_layer_time = 2 -cool_min_speed = 10 -cool_fan_speed_min = 50 -cool_lift_head = True -infill_overlap = 17 +cool_fan_speed_min = 20 +cool_min_speed = 15 +cool_min_layer_time_fan_speed_max = 15 diff --git a/resources/profiles/ultimaker2+/cpe_0.4_fast.curaprofile b/resources/profiles/ultimaker2+/cpe_0.4_fast.curaprofile index 41da312634..f9050e5ce5 100644 --- a/resources/profiles/ultimaker2+/cpe_0.4_fast.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.4_fast.curaprofile @@ -9,18 +9,14 @@ weight = -1 [settings] layer_height = 0.15 wall_thickness = 0.7 -line_width = 0.35 top_bottom_thickness = 0.75 infill_sparse_density = 18 -speed_print = 40 -layer_height_0 = 0.26 +speed_print = 45 speed_travel = 150 speed_layer_0 = 30 -speed_infill = 45 -speed_wall_0 = 30 cool_min_layer_time = 3 -cool_fan_speed_min = 50 +cool_fan_speed_min = 80 cool_min_speed = 10 -cool_lift_head = True -infill_overlap = 17 +cool_min_layer_time_fan_speed_max = 15 + diff --git a/resources/profiles/ultimaker2+/cpe_0.4_high.curaprofile b/resources/profiles/ultimaker2+/cpe_0.4_high.curaprofile index bfa93ff46c..377ab5b257 100644 --- a/resources/profiles/ultimaker2+/cpe_0.4_high.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.4_high.curaprofile @@ -9,19 +9,10 @@ weight = -3 [settings] layer_height = 0.06 wall_thickness = 1.05 -line_width = 0.35 top_bottom_thickness = 0.72 infill_sparse_density = 22 -speed_print = 20 -layer_height_0 = 0.26 -speed_layer_0 = 20 -speed_infill = 45 -speed_topbottom = 20 -speed_wall_x = 30 -cool_min_layer_time = 3 -cool_fan_speed_min = 50 -cool_min_speed = 10 -cool_lift_head = True -infill_overlap = 15 - - +speed_print = 45 +cool_min_layer_time = 2 +cool_fan_speed_min = 80 +cool_min_speed = 15 +cool_min_layer_time_fan_speed_max = 15 diff --git a/resources/profiles/ultimaker2+/cpe_0.4_normal.curaprofile b/resources/profiles/ultimaker2+/cpe_0.4_normal.curaprofile index b725a17713..e8142405ff 100644 --- a/resources/profiles/ultimaker2+/cpe_0.4_normal.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.4_normal.curaprofile @@ -7,19 +7,13 @@ material = CPE weight = -2 [settings] +layer_height = 0.1 wall_thickness = 1.05 -line_width = 0.35 top_bottom_thickness = 0.8 -speed_print = 30 -layer_height_0 = 0.26 -speed_layer_0 = 20 -speed_infill = 45 -speed_topbottom = 20 -speed_wall_0 = 20 -speed_wall_x = 30 +infill_sparse_density = 20 +speed_print = 45 cool_min_layer_time = 3 -cool_fan_speed_min = 50 +cool_fan_speed_min = 80 cool_min_speed = 10 -cool_lift_head = True -infill_overlap = 15 +cool_min_layer_time_fan_speed_max = 15 diff --git a/resources/profiles/ultimaker2+/cpe_0.6_normal.curaprofile b/resources/profiles/ultimaker2+/cpe_0.6_normal.curaprofile index e45bf7ef3f..034fa17e1b 100644 --- a/resources/profiles/ultimaker2+/cpe_0.6_normal.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.6_normal.curaprofile @@ -9,18 +9,10 @@ weight = -2 [settings] layer_height = 0.15 wall_thickness = 1.59 -line_width = 0.53 top_bottom_thickness = 1.2 -speed_print = 25 -layer_height_0 = 0.4 -speed_layer_0 = 20 -speed_infill = 40 -speed_topbottom = 20 -speed_wall_0 = 20 -speed_wall_x = 30 -cool_min_layer_time = 3 -cool_min_speed = 10 -cool_fan_speed_min = 50 -cool_lift_head = True -infill_overlap = 17 - +infill_sparse_density = 20 +speed_print = 40 +cool_min_layer_time = 5 +cool_fan_speed_min = 80 +cool_min_speed = 8 +cool_min_layer_time_fan_speed_max = 20 diff --git a/resources/profiles/ultimaker2+/cpe_0.8_normal.curaprofile b/resources/profiles/ultimaker2+/cpe_0.8_normal.curaprofile index 19cbc9a18e..523a5d3243 100644 --- a/resources/profiles/ultimaker2+/cpe_0.8_normal.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.8_normal.curaprofile @@ -1,6 +1,6 @@ [general] version = 1 -name = Normal Quality +name = Fast Print machine_type = ultimaker2plus machine_variant = 0.8 mm material = CPE @@ -9,17 +9,10 @@ weight = -2 [settings] layer_height = 0.2 wall_thickness = 2.1 -line_width = 0.7 top_bottom_thickness = 1.2 -speed_print = 20 -layer_height_0 = 0.5 -speed_layer_0 = 20 -speed_infill = 40 -speed_topbottom = 20 -speed_wall_x = 30 +infill_sparse_density = 20 +speed_print = 40 cool_min_layer_time = 3 -cool_min_speed = 10 -cool_fan_speed_min = 50 -cool_lift_head = True -infill_overlap = 17 - +cool_fan_speed_min = 80 +cool_min_speed = 8 +cool_min_layer_time_fan_speed_max = 25 diff --git a/resources/profiles/ultimaker2+/pla_0.25_normal.curaprofile b/resources/profiles/ultimaker2+/pla_0.25_normal.curaprofile index d5c27687a5..63c1fc9fdd 100644 --- a/resources/profiles/ultimaker2+/pla_0.25_normal.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.25_normal.curaprofile @@ -1,22 +1,16 @@ [general] version = 1 -name = Normal Quality +name = High Quality machine_type = ultimaker2plus machine_variant = 0.25 mm material = PLA weight = -2 [settings] -line_width = 0.22 layer_height = 0.06 -layer_height_0 = 0.15 wall_thickness = 0.88 top_bottom_thickness = 0.72 infill_sparse_density = 22 -retraction_amount = 6 -speed_print = 20 -speed_infill = 30 -speed_wall_x = 25 -speed_topbottom = 20 -speed_layer_0 = 25 -cool_min_layer_time_fan_speed_max = 15 +speed_print = 30 +cool_min_layer_time = 5 +cool_min_speed = 10 diff --git a/resources/profiles/ultimaker2+/pla_0.4_fast.curaprofile b/resources/profiles/ultimaker2+/pla_0.4_fast.curaprofile index 5088c055c2..06e401c139 100644 --- a/resources/profiles/ultimaker2+/pla_0.4_fast.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.4_fast.curaprofile @@ -7,17 +7,12 @@ material = PLA weight = -1 [settings] -line_width = 0.35 layer_height = 0.15 -layer_height_0 = 0.26 wall_thickness = 0.7 -top_bottom_thickness = 0.6 +top_bottom_thickness = 0.75 infill_sparse_density = 18 -retraction_amount = 5.5 -speed_print = 40 -speed_infill = 60 -speed_wall_x = 50 +speed_print = 60 speed_travel = 150 -speed_topbottom = 30 -speed_layer_0 = 25 -cool_min_layer_time_fan_speed_max = 15 +speed_layer_0 = 30 +cool_min_layer_time = 5 +cool_min_speed = 10 diff --git a/resources/profiles/ultimaker2+/pla_0.4_high.curaprofile b/resources/profiles/ultimaker2+/pla_0.4_high.curaprofile index 5140474e48..5e2f762354 100644 --- a/resources/profiles/ultimaker2+/pla_0.4_high.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.4_high.curaprofile @@ -7,16 +7,10 @@ material = PLA weight = -3 [settings] -line_width = 0.35 layer_height = 0.06 -layer_height_0 = 0.26 wall_thickness = 1.05 -top_bottom_thickness = 0.84 +top_bottom_thickness = 0.72 infill_sparse_density = 22 -retraction_amount = 5.5 -speed_print = 30 -speed_infill = 50 -speed_wall_x = 40 -speed_topbottom = 20 -speed_layer_0 = 25 -cool_min_layer_time_fan_speed_max = 15 \ No newline at end of file +speed_print = 50 +cool_min_layer_time = 5 +cool_min_speed = 10 diff --git a/resources/profiles/ultimaker2+/pla_0.4_normal.curaprofile b/resources/profiles/ultimaker2+/pla_0.4_normal.curaprofile index 88862832b2..689a3251b2 100644 --- a/resources/profiles/ultimaker2+/pla_0.4_normal.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.4_normal.curaprofile @@ -7,15 +7,10 @@ material = PLA weight = -2 [settings] -line_width = 0.35 -layer_height_0 = 0.26 +layer_height = 0.1 wall_thickness = 1.05 top_bottom_thickness = 0.8 infill_sparse_density = 20 -retraction_amount = 5.5 -speed_print = 30 -speed_infill = 50 -speed_wall_x = 40 -speed_topbottom = 20 -speed_layer_0 = 25 -cool_min_layer_time_fan_speed_max = 15 +speed_print = 50 +cool_min_layer_time = 5 +cool_min_speed = 10 diff --git a/resources/profiles/ultimaker2+/pla_0.6_normal.curaprofile b/resources/profiles/ultimaker2+/pla_0.6_normal.curaprofile index 13d1c783d6..188ed42a95 100644 --- a/resources/profiles/ultimaker2+/pla_0.6_normal.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.6_normal.curaprofile @@ -7,15 +7,10 @@ material = PLA weight = -2 [settings] -line_width = 0.53 layer_height = 0.15 -layer_height_0 = 0.4 wall_thickness = 1.59 top_bottom_thickness = 1.2 -retraction_amount = 6 -speed_print = 25 -speed_infill = 55 -speed_wall_x = 40 -speed_topbottom = 20 -speed_layer_0 = 25 -cool_min_layer_time_fan_speed_max = 20 +infill_sparse_density = 20 +speed_print = 55 +cool_min_layer_time = 5 +cool_min_speed = 10 diff --git a/resources/profiles/ultimaker2+/pla_0.8_normal.curaprofile b/resources/profiles/ultimaker2+/pla_0.8_normal.curaprofile index 030bd38064..92cb4a6054 100644 --- a/resources/profiles/ultimaker2+/pla_0.8_normal.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.8_normal.curaprofile @@ -1,22 +1,16 @@ [general] version = 1 -name = Normal Quality +name = Fast Print machine_type = ultimaker2plus machine_variant = 0.8 mm material = PLA weight = -2 [settings] -line_width = 0.7 layer_height = 0.2 -layer_height_0 = 0.5 wall_thickness = 2.1 -top_bottom_thickness = 1.6 +top_bottom_thickness = 1.2 infill_sparse_density = 20 -retraction_amount = 6 -speed_print = 20 -speed_infill = 40 -speed_wall_x = 30 -speed_topbottom = 20 -speed_layer_0 = 25 -cool_min_layer_time_fan_speed_max = 25 +speed_print = 40 +cool_min_layer_time = 5 +cool_min_speed = 10 From 00305f1c53c4763f2d3146caeadca8466f0d3457 Mon Sep 17 00:00:00 2001 From: Tom Heijmans Date: Fri, 15 Apr 2016 13:35:25 +0200 Subject: [PATCH 036/424] Updated inheritance functions for um2+ --- resources/machines/ultimaker2plus.json | 6 ++++++ resources/machines/ultimaker2plus_025.json | 4 ++++ resources/machines/ultimaker2plus_040.json | 4 ++++ resources/machines/ultimaker2plus_060.json | 4 ++++ resources/machines/ultimaker2plus_080.json | 4 ++++ 5 files changed, 22 insertions(+) diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index a3441a8dd4..c1c581618f 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -11,6 +11,12 @@ "inherits": "ultimaker2.json", "overrides": { + "speed_infill": { "inherit_function": "speed_print" }, + "layer_height_0": { "inherit_function": "round(machine_nozzle_size / 1.5, 2)" }, + "retraction_min_travel": { "inherit_function": "machine_nozzle_size * 2" }, + "line_width": { "inherit_function": "round(machine_nozzle_size * 0.875, 2)" }, + "speed_layer_0": { "default": "20" }, + "speed_support": { "inherit_function": "speed_wall_0" }, "machine_height": { "default": 203 }, "machine_show_variants": { "default": true }, "gantry_height": { "default": 52 }, diff --git a/resources/machines/ultimaker2plus_025.json b/resources/machines/ultimaker2plus_025.json index 22bb33cb55..d3aea61e86 100644 --- a/resources/machines/ultimaker2plus_025.json +++ b/resources/machines/ultimaker2plus_025.json @@ -12,6 +12,10 @@ "variant": "0.25 mm", "overrides": { + "speed_wall": { "inherit_function": "round(speed_print / 1.2, 0)" }, + "speed_wall_x": { "inherit_function": "speed_wall" }, + "speed_wall_0": { "inherit_function": "speed_wall - 5" }, + "speed_topbottom": { "inherit_function": "round(speed_print / 1.5, 0)" }, "machine_nozzle_size": { "default": 0.25 }, "machine_nozzle_tip_outer_diameter": { "default": 0.8 }, "coasting_volume": { "default": 0.1 }, diff --git a/resources/machines/ultimaker2plus_040.json b/resources/machines/ultimaker2plus_040.json index 29fc1a75f3..ce7f8514fc 100644 --- a/resources/machines/ultimaker2plus_040.json +++ b/resources/machines/ultimaker2plus_040.json @@ -12,6 +12,10 @@ "variant": "0.4 mm", "overrides": { + "speed_wall": { "inherit_function": "round(speed_print / 1.25, 0)" }, + "speed_wall_x": { "inherit_function": "speed_wall" }, + "speed_wall_0": { "inherit_function": "speed_wall - 10" }, + "speed_topbottom": { "inherit_function": "round(speed_print / 2.25, 0)" }, "machine_nozzle_size": { "default": 0.40 }, "machine_nozzle_tip_outer_diameter": { "default": 1.05 } } diff --git a/resources/machines/ultimaker2plus_060.json b/resources/machines/ultimaker2plus_060.json index cfcc2ab4f2..a167907d9c 100644 --- a/resources/machines/ultimaker2plus_060.json +++ b/resources/machines/ultimaker2plus_060.json @@ -12,6 +12,10 @@ "variant": "0.6 mm", "overrides": { + "speed_wall": { "inherit_function": "round(speed_print / 1.333333, 0)" }, + "speed_wall_x": { "inherit_function": "speed_wall" }, + "speed_wall_0": { "inherit_function": "speed_wall - 10" }, + "speed_topbottom": { "inherit_function": "round(speed_print / 2, 0)" }, "machine_nozzle_size": { "default": 0.60 }, "machine_nozzle_tip_outer_diameter": { "default": 1.25 }, "coasting_volume": { "default": 1.36 } diff --git a/resources/machines/ultimaker2plus_080.json b/resources/machines/ultimaker2plus_080.json index 2f2cd2571c..b39da3f46b 100644 --- a/resources/machines/ultimaker2plus_080.json +++ b/resources/machines/ultimaker2plus_080.json @@ -12,6 +12,10 @@ "variant": "0.8 mm", "overrides": { + "speed_wall": { "inherit_function": "round(speed_print / 1.333333, 0)" }, + "speed_wall_x": { "inherit_function": "speed_wall" }, + "speed_wall_0": { "inherit_function": "speed_wall - 10" }, + "speed_topbottom": { "inherit_function": "round(speed_print / 2, 0)" }, "machine_nozzle_size": { "default": 0.80 }, "machine_nozzle_tip_outer_diameter": { "default": 1.35 }, "coasting_volume": { "default": 3.22 } From 7ce5c6c6bca4c8455b0c53c0bda131cbc81ae08d Mon Sep 17 00:00:00 2001 From: Tom Heijmans Date: Fri, 15 Apr 2016 14:36:13 +0200 Subject: [PATCH 037/424] Fixed inheritance issues --- resources/machines/ultimaker2plus.json | 1 + resources/machines/ultimaker2plus_025.json | 7 +++---- resources/machines/ultimaker2plus_040.json | 7 +++---- resources/machines/ultimaker2plus_060.json | 7 +++---- resources/machines/ultimaker2plus_080.json | 7 +++---- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index c1c581618f..0a344d4aa6 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -12,6 +12,7 @@ "overrides": { "speed_infill": { "inherit_function": "speed_print" }, + "speed_wall_x": { "inherit_function": "speed_wall" }, "layer_height_0": { "inherit_function": "round(machine_nozzle_size / 1.5, 2)" }, "retraction_min_travel": { "inherit_function": "machine_nozzle_size * 2" }, "line_width": { "inherit_function": "round(machine_nozzle_size * 0.875, 2)" }, diff --git a/resources/machines/ultimaker2plus_025.json b/resources/machines/ultimaker2plus_025.json index d3aea61e86..2c022f8448 100644 --- a/resources/machines/ultimaker2plus_025.json +++ b/resources/machines/ultimaker2plus_025.json @@ -12,10 +12,9 @@ "variant": "0.25 mm", "overrides": { - "speed_wall": { "inherit_function": "round(speed_print / 1.2, 0)" }, - "speed_wall_x": { "inherit_function": "speed_wall" }, - "speed_wall_0": { "inherit_function": "speed_wall - 5" }, - "speed_topbottom": { "inherit_function": "round(speed_print / 1.5, 0)" }, + "speed_wall": { "inherit_function": "round(speed_print / 1.2, 1)" }, + "speed_wall_0": { "inherit_function": "1 if speed_wall < 5 else (speed_wall - 5)" }, + "speed_topbottom": { "inherit_function": "round(speed_print / 1.5, 1)" }, "machine_nozzle_size": { "default": 0.25 }, "machine_nozzle_tip_outer_diameter": { "default": 0.8 }, "coasting_volume": { "default": 0.1 }, diff --git a/resources/machines/ultimaker2plus_040.json b/resources/machines/ultimaker2plus_040.json index ce7f8514fc..f5a0f5a710 100644 --- a/resources/machines/ultimaker2plus_040.json +++ b/resources/machines/ultimaker2plus_040.json @@ -12,10 +12,9 @@ "variant": "0.4 mm", "overrides": { - "speed_wall": { "inherit_function": "round(speed_print / 1.25, 0)" }, - "speed_wall_x": { "inherit_function": "speed_wall" }, - "speed_wall_0": { "inherit_function": "speed_wall - 10" }, - "speed_topbottom": { "inherit_function": "round(speed_print / 2.25, 0)" }, + "speed_wall": { "inherit_function": "round(speed_print / 1.25, 1)" }, + "speed_wall_0": { "inherit_function": "1 if speed_wall < 10 else (speed_wall - 10)" }, + "speed_topbottom": { "inherit_function": "round(speed_print / 2.25, 1)" }, "machine_nozzle_size": { "default": 0.40 }, "machine_nozzle_tip_outer_diameter": { "default": 1.05 } } diff --git a/resources/machines/ultimaker2plus_060.json b/resources/machines/ultimaker2plus_060.json index a167907d9c..89538f2fd0 100644 --- a/resources/machines/ultimaker2plus_060.json +++ b/resources/machines/ultimaker2plus_060.json @@ -12,10 +12,9 @@ "variant": "0.6 mm", "overrides": { - "speed_wall": { "inherit_function": "round(speed_print / 1.333333, 0)" }, - "speed_wall_x": { "inherit_function": "speed_wall" }, - "speed_wall_0": { "inherit_function": "speed_wall - 10" }, - "speed_topbottom": { "inherit_function": "round(speed_print / 2, 0)" }, + "speed_wall": { "inherit_function": "round(speed_print / 1.333333, 1)" }, + "speed_wall_0": { "inherit_function": "1 if speed_wall < 10 else (speed_wall - 10)" }, + "speed_topbottom": { "inherit_function": "round(speed_print / 2, 1)" }, "machine_nozzle_size": { "default": 0.60 }, "machine_nozzle_tip_outer_diameter": { "default": 1.25 }, "coasting_volume": { "default": 1.36 } diff --git a/resources/machines/ultimaker2plus_080.json b/resources/machines/ultimaker2plus_080.json index b39da3f46b..e231fbb9f5 100644 --- a/resources/machines/ultimaker2plus_080.json +++ b/resources/machines/ultimaker2plus_080.json @@ -12,10 +12,9 @@ "variant": "0.8 mm", "overrides": { - "speed_wall": { "inherit_function": "round(speed_print / 1.333333, 0)" }, - "speed_wall_x": { "inherit_function": "speed_wall" }, - "speed_wall_0": { "inherit_function": "speed_wall - 10" }, - "speed_topbottom": { "inherit_function": "round(speed_print / 2, 0)" }, + "speed_wall": { "inherit_function": "round(speed_print / 1.333333, 1)" }, + "speed_wall_0": { "inherit_function": "1 if speed_wall < 10 else (speed_wall - 10)" }, + "speed_topbottom": { "inherit_function": "round(speed_print / 2, 1)" }, "machine_nozzle_size": { "default": 0.80 }, "machine_nozzle_tip_outer_diameter": { "default": 1.35 }, "coasting_volume": { "default": 3.22 } From 8a94739de0af17866f533d15bd8467c4ac8cfdfd Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 15 Apr 2016 16:08:23 +0200 Subject: [PATCH 038/424] Raft line widths now inherit from line_width CURA-695 --- resources/machines/fdmprinter.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 9ce745e2b0..68f1a593ea 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1608,6 +1608,7 @@ "unit": "mm", "type": "float", "default": 1, + "inherit_function": "line_width", "min_value": "0.0001", "max_value_warning": "machine_nozzle_size * 2", "enabled": "adhesion_type == \"raft\"", @@ -1645,6 +1646,7 @@ "type": "float", "default": 1, "min_value": "0.0001", + "inherit_function": "line_width", "max_value_warning": "machine_nozzle_size * 2", "enabled": "adhesion_type == \"raft\"", "global_only": "True", From 94d3309a35dd1e4d6fa1302a086850cc77dea06b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 11:33:43 +0200 Subject: [PATCH 039/424] Removed duplicate bedTemperature declaration CURA-1339 --- cura/PrinterOutputDevice.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index fb4a851676..5509ae1b8c 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -100,11 +100,6 @@ class PrinterOutputDevice(OutputDevice, QObject): self._bed_temperature = temperature self.bedTemperatureChanged.emit() - ## Get the bed temperature if connected printer (if any) - @pyqtProperty(int, notify = bedTemperatureChanged) - def bedTemperature(self): - return self._bed_temperature - ## Get the target bed temperature if connected printer (if any) @pyqtProperty(int, notify = targetBedTemperatureChanged) def targetBedTemperature(self): From 0015d9d02732f8d29f19eb379a7a966bad0555ce Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 11:37:08 +0200 Subject: [PATCH 040/424] Documented signals CURA-1339 --- cura/PrinterOutputDevice.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 5509ae1b8c..d9c3a0d9f7 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -32,17 +32,28 @@ class PrinterOutputDevice(OutputDevice, QObject): def requestWrite(self, node, file_name = None, filter_by_machine = False): raise NotImplementedError("requestWrite needs to be implemented") - # Signals: + ## Signals + + # Signal to be emitted when bed temp is changed bedTemperatureChanged = pyqtSignal() + + # Signal to be emitted when target bed temp is changed targetBedTemperatureChanged = pyqtSignal() + # Signal when the progress is changed (usually when this output device is printing / sending lots of data) progressChanged = pyqtSignal() + # Signal to be emitted when hotend temp is changed hotendTemperaturesChanged = pyqtSignal() + + # Signal to be emitted when target hotend temp is changed targetHotendTemperaturesChanged = pyqtSignal() + # Signal to be emitted when head position is changed (x,y,z) headPositionChanged = pyqtSignal() + # Signal that is emitted every time connection state is changed. + # it also sends it's own device_id (for convenience sake) connectionStateChanged = pyqtSignal(str) ## Get the bed temperature of the bed (if any) From 6ad926b9b86ba2cd2ed52b33478daecaed8b53ca Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 11:38:57 +0200 Subject: [PATCH 041/424] connect & close are now pure virtual CURA-1339 --- cura/PrinterOutputDevice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index d9c3a0d9f7..6ab80f877e 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -152,11 +152,11 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Attempt to establish connection def connect(self): - pass + raise NotImplementedError("connect needs to be implemented") ## Attempt to close the connection def close(self): - pass + raise NotImplementedError("close needs to be implemented") @pyqtProperty(bool, notify = connectionStateChanged) def connectionState(self): From b31106a66635b5dcaafa4bcb1732d03b50a9ce5e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 11:45:14 +0200 Subject: [PATCH 042/424] Added missing (renamed) file CURA-1339 --- .../USBPrinterOutputDeviceManager.py | 247 ++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 plugins/USBPrinting/USBPrinterOutputDeviceManager.py diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py new file mode 100644 index 0000000000..1a0a0c1d33 --- /dev/null +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -0,0 +1,247 @@ +# Copyright (c) 2015 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +from UM.Signal import Signal, SignalEmitter +from . import USBPrinterOutputDevice +from UM.Application import Application +from UM.Resources import Resources +from UM.Logger import Logger +from UM.PluginRegistry import PluginRegistry +from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin +from cura.PrinterOutputDevice import ConnectionState +from UM.Qt.ListModel import ListModel +from UM.Message import Message + +from cura.CuraApplication import CuraApplication + +import threading +import platform +import glob +import time +import os.path +from UM.Extension import Extension + +from PyQt5.QtQml import QQmlComponent, QQmlContext +from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt +from UM.i18n import i18nCatalog +i18n_catalog = i18nCatalog("cura") + + +## Manager class that ensures that a usbPrinteroutput device is created for every connected USB printer. +class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): + def __init__(self, parent = None): + QObject.__init__(self, parent) + SignalEmitter.__init__(self) + OutputDevicePlugin.__init__(self) + Extension.__init__(self) + self._serial_port_list = [] + self._usb_output_devices = {} + self._usb_output_devices_model = None + self._update_thread = threading.Thread(target = self._updateThread) + self._update_thread.setDaemon(True) + + self._check_updates = True + self._firmware_view = None + + ## Add menu item to top menu of the application. + self.setMenuName(i18n_catalog.i18nc("@title:menu","Firmware")) + self.addMenuItem(i18n_catalog.i18nc("@item:inmenu", "Update Firmware"), self.updateAllFirmware) + + Application.getInstance().applicationShuttingDown.connect(self.stop) + self.addUSBOutputDeviceSignal.connect(self.addOutputDevice) #Because the model needs to be created in the same thread as the QMLEngine, we use a signal. + + addUSBOutputDeviceSignal = Signal() + connectionStateChanged = pyqtSignal() + + progressChanged = pyqtSignal() + + @pyqtProperty(float, notify = progressChanged) + def progress(self): + progress = 0 + for printer_name, device in self._usb_output_devices.items(): # TODO: @UnusedVariable "printer_name" + progress += device.progress + + return progress / len(self._usb_output_devices) + + def start(self): + self._check_updates = True + self._update_thread.start() + + def stop(self): + self._check_updates = False + try: + self._update_thread.join() + except RuntimeError: + pass + + def _updateThread(self): + while self._check_updates: + result = self.getSerialPortList(only_list_usb = True) + self._addRemovePorts(result) + time.sleep(5) + + ## Show firmware interface. + # This will create the view if its not already created. + def spawnFirmwareInterface(self, serial_port): + if self._firmware_view is None: + path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath("USBPrinting"), "FirmwareUpdateWindow.qml")) + component = QQmlComponent(Application.getInstance()._engine, path) + + self._firmware_context = QQmlContext(Application.getInstance()._engine.rootContext()) + self._firmware_context.setContextProperty("manager", self) + self._firmware_view = component.create(self._firmware_context) + + self._firmware_view.show() + + @pyqtSlot() + def updateAllFirmware(self): + if not self._usb_output_devices: + Message(i18n_catalog.i18nc("@info","Cannot update firmware, there were no connected printers found.")).show() + return + + self.spawnFirmwareInterface("") + for printer_connection in self._usb_output_devices: + try: + self._usb_output_devices[printer_connection].updateFirmware(Resources.getPath(CuraApplication.ResourceTypes.Firmware, self._getDefaultFirmwareName())) + except FileNotFoundError: + self._usb_output_devices[printer_connection].setProgress(100, 100) + Logger.log("w", "No firmware found for printer %s", printer_connection) + continue + + @pyqtSlot(str, result = bool) + def updateFirmwareBySerial(self, serial_port): + if serial_port in self._usb_output_devices: + self.spawnFirmwareInterface(self._usb_output_devices[serial_port].getSerialPort()) + try: + self._usb_output_devices[serial_port].updateFirmware(Resources.getPath(CuraApplication.ResourceTypes.Firmware, self._getDefaultFirmwareName())) + except FileNotFoundError: + self._firmware_view.close() + Logger.log("e", "Could not find firmware required for this machine") + return False + return True + return False + + ## Return the singleton instance of the USBPrinterManager + @classmethod + def getInstance(cls, engine = None, script_engine = None): + # Note: Explicit use of class name to prevent issues with inheritance. + if USBPrinterOutputDeviceManager._instance is None: + USBPrinterOutputDeviceManager._instance = cls() + + return USBPrinterOutputDeviceManager._instance + + def _getDefaultFirmwareName(self): + machine_instance = Application.getInstance().getMachineManager().getActiveMachineInstance() + machine_type = machine_instance.getMachineDefinition().getId() + if platform.system() == "Linux": + baudrate = 115200 + else: + baudrate = 250000 + + # NOTE: The keyword used here is the id of the machine. You can find the id of your machine in the *.json file, eg. + # https://github.com/Ultimaker/Cura/blob/master/resources/machines/ultimaker_original.json#L2 + # The *.hex files are stored at a seperate repository: + # https://github.com/Ultimaker/cura-binary-data/tree/master/cura/resources/firmware + machine_without_extras = {"bq_witbox" : "MarlinWitbox.hex", + "ultimaker_original" : "MarlinUltimaker-{baudrate}.hex", + "ultimaker_original_plus" : "MarlinUltimaker-UMOP-{baudrate}.hex", + "ultimaker2" : "MarlinUltimaker2.hex", + "ultimaker2_go" : "MarlinUltimaker2go.hex", + "ultimaker2plus" : "MarlinUltimaker2plus.hex", + "ultimaker2_extended" : "MarlinUltimaker2extended.hex", + "ultimaker2_extended_plus" : "MarlinUltimaker2extended-plus.hex", + } + machine_with_heated_bed = {"ultimaker_original" : "MarlinUltimaker-HBK-{baudrate}.hex", + } + + ##TODO: Add check for multiple extruders + hex_file = None + if machine_type in machine_without_extras.keys(): # The machine needs to be defined here! + if machine_type in machine_with_heated_bed.keys() and machine_instance.getMachineSettingValue("machine_heated_bed"): + Logger.log("d", "Choosing firmware with heated bed enabled for machine %s.", machine_type) + hex_file = machine_with_heated_bed[machine_type] # Return firmware with heated bed enabled + else: + Logger.log("d", "Choosing basic firmware for machine %s.", machine_type) + hex_file = machine_without_extras[machine_type] # Return "basic" firmware + else: + Logger.log("e", "There is no firmware for machine %s.", machine_type) + + if hex_file: + return hex_file.format(baudrate=baudrate) + else: + Logger.log("e", "Could not find any firmware for machine %s.", machine_type) + raise FileNotFoundError() + + ## Helper to identify serial ports (and scan for them) + def _addRemovePorts(self, serial_ports): + # First, find and add all new or changed keys + for serial_port in list(serial_ports): + if serial_port not in self._serial_port_list: + self.addUSBOutputDeviceSignal.emit(serial_port) # Hack to ensure its created in main thread + continue + self._serial_port_list = list(serial_ports) + + devices_to_remove = [] + for port, device in self._usb_output_devices.items(): + if port not in self._serial_port_list: + device.close() + devices_to_remove.append(port) + + for port in devices_to_remove: + del self._usb_output_devices[port] + + ## Because the model needs to be created in the same thread as the QMLEngine, we use a signal. + def addOutputDevice(self, serial_port): + device = USBPrinterOutputDevice.USBPrinterOutputDevice(serial_port) + device.connect() + device.connectionStateChanged.connect(self._onConnectionStateChanged) + device.progressChanged.connect(self.progressChanged) + self._usb_output_devices[serial_port] = device + + ## If one of the states of the connected devices change, we might need to add / remove them from the global list. + def _onConnectionStateChanged(self, serial_port): + try: + if self._usb_output_devices[serial_port].connectionState == ConnectionState.CONNECTED: + self.getOutputDeviceManager().addOutputDevice(self._usb_output_devices[serial_port]) + else: + self.getOutputDeviceManager().removeOutputDevice(serial_port) + self.connectionStateChanged.emit() + except KeyError: + pass # no output device by this device_id found in connection list. + + + @pyqtProperty(QObject , notify = connectionStateChanged) + def connectedPrinterList(self): + self._usb_output_devices_model = ListModel() + self._usb_output_devices_model.addRoleName(Qt.UserRole + 1, "name") + self._usb_output_devices_model.addRoleName(Qt.UserRole + 2, "printer") + for connection in self._usb_output_devices: + if self._usb_output_devices[connection].connectionState == ConnectionState.CONNECTED: + self._usb_output_devices_model.appendItem({"name": connection, "printer": self._usb_output_devices[connection]}) + return self._usb_output_devices_model + + ## Create a list of serial ports on the system. + # \param only_list_usb If true, only usb ports are listed + def getSerialPortList(self, only_list_usb = False): + base_list = [] + if platform.system() == "Windows": + import winreg + try: + key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,"HARDWARE\\DEVICEMAP\\SERIALCOMM") + i = 0 + while True: + values = winreg.EnumValue(key, i) + if not only_list_usb or "USBSER" in values[0]: + base_list += [values[1]] + i += 1 + except Exception as e: + pass + else: + if only_list_usb: + base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*") + base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list + else: + base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.*") + glob.glob("/dev/tty.usb*") + glob.glob("/dev/rfcomm*") + glob.glob("/dev/serial/by-id/*") + return list(base_list) + + _instance = None From 0939262ffee005d9c5269ee1c0c1de3603f52630 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 11:47:23 +0200 Subject: [PATCH 043/424] Removed stray debug code CURA-1339 --- plugins/USBPrinting/ControlWindow.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/USBPrinting/ControlWindow.qml b/plugins/USBPrinting/ControlWindow.qml index 5f6951bedc..0938e8e6d3 100644 --- a/plugins/USBPrinting/ControlWindow.qml +++ b/plugins/USBPrinting/ControlWindow.qml @@ -25,7 +25,6 @@ UM.Dialog Label { //: USB Printing dialog label, %1 is head temperature - Component.onCompleted: console.log(manager.hotendTemperatures) text: catalog.i18nc("@label","Extruder Temperature %1").arg(manager.hotendTemperatures[0]) } Label From 96e821cc3d4016c0e7cecfd9ebce36ef3b9e731d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 13:27:36 +0200 Subject: [PATCH 044/424] PrinterOutputDevice now uses safer super().__init CURA-1339 --- cura/PrinterOutputDevice.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 6ab80f877e..25ba91300e 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -15,8 +15,7 @@ from UM.Logger import Logger # For all other uses it should be used in the same way as a "regular" OutputDevice. class PrinterOutputDevice(OutputDevice, QObject): def __init__(self, device_id, parent = None): - QObject.__init__(self, parent) - OutputDevice.__init__(self, device_id) + super().__init__(device_id = device_id, parent = parent) self._target_bed_temperature = 0 self._bed_temperature = 0 From fb52d3993637cdcd5b9b1859998644f406408054 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 14:43:04 +0200 Subject: [PATCH 045/424] Changed enum values to lowerCamelCase CURA-1339 --- cura/PrinterOutputDevice.py | 9 +++++---- plugins/USBPrinting/USBPrinterOutputDevice.py | 20 +++++++++---------- .../USBPrinterOutputDeviceManager.py | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 25ba91300e..7b79ad4aa4 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -26,7 +26,7 @@ class PrinterOutputDevice(OutputDevice, QObject): self._head_x = 0 self._head_y = 0 self._head_z = 0 - self._connection_state = ConnectionState.CLOSED + self._connection_state = ConnectionState.closed def requestWrite(self, node, file_name = None, filter_by_machine = False): raise NotImplementedError("requestWrite needs to be implemented") @@ -301,8 +301,9 @@ class PrinterOutputDevice(OutputDevice, QObject): self._progress = progress self.progressChanged.emit() + ## The current processing state of the backend. class ConnectionState(IntEnum): - CLOSED = 0 - CONNECTING = 1 - CONNECTED = 2 \ No newline at end of file + closed = 0 + connecting = 1 + connected = 2 \ No newline at end of file diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index fbf9e376b6..68c4567450 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -134,7 +134,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): ## Start a print based on a g-code. # \param gcode_list List with gcode (strings). def printGCode(self, gcode_list): - if self._progress or self._connection_state != ConnectionState.CONNECTED: + if self._progress or self._connection_state != ConnectionState.connected: Logger.log("d", "Printer is busy or not connected, aborting print") self.writeError.emit(self) return @@ -169,7 +169,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def _updateFirmware(self): self.setProgress(0, 100) - if self._connection_state != ConnectionState.CLOSED: + if self._connection_state != ConnectionState.closed: self.close() hex_file = intelHex.readHex(self._firmware_file_name) @@ -225,14 +225,14 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._poll_endstop = False def _pollEndStop(self): - while self._connection_state == ConnectionState.CONNECTED and self._poll_endstop: + while self._connection_state == ConnectionState.connected and self._poll_endstop: self.sendCommand("M119") time.sleep(0.5) ## Private connect function run by thread. Can be started by calling connect. def _connect(self): Logger.log("d", "Attempting to connect to %s", self._serial_port) - self.setConnectionState(ConnectionState.CONNECTING) + self.setConnectionState(ConnectionState.connecting) programmer = stk500v2.Stk500v2() try: programmer.connect(self._serial_port) # Connect with the serial, if this succeeds, it's an arduino based usb device. @@ -265,7 +265,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): line = self._readline() if line is None: # Something went wrong with reading, could be that close was called. - self.setConnectionState(ConnectionState.CLOSED) + self.setConnectionState(ConnectionState.closed) return if b"T:" in line: @@ -273,7 +273,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): sucesfull_responses += 1 if sucesfull_responses >= self._required_responses_auto_baud: self._serial.timeout = 2 # Reset serial timeout - self.setConnectionState(ConnectionState.CONNECTED) + self.setConnectionState(ConnectionState.connected) self._listen_thread.start() # Start listening Logger.log("i", "Established printer connection on port %s" % self._serial_port) return @@ -282,7 +282,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): Logger.log("e", "Baud rate detection for %s failed", self._serial_port) self.close() # Unable to connect, wrap up. - self.setConnectionState(ConnectionState.CLOSED) + self.setConnectionState(ConnectionState.closed) ## Set the baud rate of the serial. This can cause exceptions, but we simply want to ignore those. def setBaudRate(self, baud_rate): @@ -305,7 +305,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._connect_thread = threading.Thread(target = self._connect) self._connect_thread.daemon = True - self.setConnectionState(ConnectionState.CLOSED) + self.setConnectionState(ConnectionState.closed) if self._serial is not None: try: self._listen_thread.join() @@ -365,7 +365,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def sendCommand(self, cmd): if self._progress: self._command_queue.put(cmd) - elif self._connection_state == ConnectionState.CONNECTED: + elif self._connection_state == ConnectionState.connected: self._sendCommand(cmd) ## Set the error state with a message. @@ -396,7 +396,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): Logger.log("i", "Printer connection listen thread started for %s" % self._serial_port) temperature_request_timeout = time.time() ok_timeout = time.time() - while self._connection_state == ConnectionState.CONNECTED: + while self._connection_state == ConnectionState.connected: line = self._readline() if line is None: break # None is only returned when something went wrong. Stop listening diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index 1a0a0c1d33..0b71de40e0 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -201,7 +201,7 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin, ## If one of the states of the connected devices change, we might need to add / remove them from the global list. def _onConnectionStateChanged(self, serial_port): try: - if self._usb_output_devices[serial_port].connectionState == ConnectionState.CONNECTED: + if self._usb_output_devices[serial_port].connectionState == ConnectionState.connected: self.getOutputDeviceManager().addOutputDevice(self._usb_output_devices[serial_port]) else: self.getOutputDeviceManager().removeOutputDevice(serial_port) @@ -216,7 +216,7 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin, self._usb_output_devices_model.addRoleName(Qt.UserRole + 1, "name") self._usb_output_devices_model.addRoleName(Qt.UserRole + 2, "printer") for connection in self._usb_output_devices: - if self._usb_output_devices[connection].connectionState == ConnectionState.CONNECTED: + if self._usb_output_devices[connection].connectionState == ConnectionState.connected: self._usb_output_devices_model.appendItem({"name": connection, "printer": self._usb_output_devices[connection]}) return self._usb_output_devices_model From a59c11388766ae4ad7781b357e6f0dc8d1271357 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 14:47:51 +0200 Subject: [PATCH 046/424] Added busy & error state to ConnectionState CURA-1339 --- cura/PrinterOutputDevice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 7b79ad4aa4..7bf992ea83 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -306,4 +306,6 @@ class PrinterOutputDevice(OutputDevice, QObject): class ConnectionState(IntEnum): closed = 0 connecting = 1 - connected = 2 \ No newline at end of file + connected = 2 + busy = 3 + error = 4 \ No newline at end of file From 8a47903374c19525fcf9779c25eea89955c3a23c Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 15:03:13 +0200 Subject: [PATCH 047/424] Changed namespace of usbprintermanager (QML) to Cura from UM CURA-1339 --- plugins/USBPrinting/USBPrinterOutputDeviceManager.py | 5 +---- plugins/USBPrinting/__init__.py | 2 +- resources/qml/WizardPages/Bedleveling.qml | 2 +- resources/qml/WizardPages/UltimakerCheckup.qml | 6 +++--- resources/qml/WizardPages/UpgradeFirmware.qml | 4 ++-- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index 0b71de40e0..6d85a4cceb 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -30,10 +30,7 @@ i18n_catalog = i18nCatalog("cura") ## Manager class that ensures that a usbPrinteroutput device is created for every connected USB printer. class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): def __init__(self, parent = None): - QObject.__init__(self, parent) - SignalEmitter.__init__(self) - OutputDevicePlugin.__init__(self) - Extension.__init__(self) + super().__init__(parent = parent) self._serial_port_list = [] self._usb_output_devices = {} self._usb_output_devices_model = None diff --git a/plugins/USBPrinting/__init__.py b/plugins/USBPrinting/__init__.py index 281aecd682..4e8e332173 100644 --- a/plugins/USBPrinting/__init__.py +++ b/plugins/USBPrinting/__init__.py @@ -19,5 +19,5 @@ def getMetaData(): } def register(app): - qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "UM", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance) + qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "Cura", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance) return {"extension":USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance(), "output_device": USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance()} diff --git a/resources/qml/WizardPages/Bedleveling.qml b/resources/qml/WizardPages/Bedleveling.qml index 256b858792..5ed3b0ae58 100644 --- a/resources/qml/WizardPages/Bedleveling.qml +++ b/resources/qml/WizardPages/Bedleveling.qml @@ -18,7 +18,7 @@ Item property int platform_width: UM.MachineManager.getSettingValue("machine_width") property int platform_height: UM.MachineManager.getSettingValue("machine_depth") anchors.fill: parent; - property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer + property variant printer_connection: Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer Component.onCompleted: { printer_connection.homeBed() diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index 2aaf4c7543..57f2146823 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -31,9 +31,9 @@ Item } property variant printer_connection: { - if (UM.USBPrinterManager.connectedPrinterList.rowCount() != 0){ + if (Cura.USBPrinterManager.connectedPrinterList.rowCount() != 0){ wizardPage.checkupProgress.connection = true - return UM.USBPrinterManager.connectedPrinterList.getItem(0).printer + return Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer } else { return null @@ -142,7 +142,7 @@ Item anchors.left: connectionLabel.right anchors.top: parent.top wrapMode: Text.WordWrap - text: UM.USBPrinterManager.connectedPrinterList.rowCount() > 0 || base.addOriginalProgress.checkUp[0] ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete") + text: Cura.USBPrinterManager.connectedPrinterList.rowCount() > 0 || base.addOriginalProgress.checkUp[0] ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete") } ////////////////////////////////////////////////////////// Label diff --git a/resources/qml/WizardPages/UpgradeFirmware.qml b/resources/qml/WizardPages/UpgradeFirmware.qml index 4bbb049f20..a9a252ffe4 100644 --- a/resources/qml/WizardPages/UpgradeFirmware.qml +++ b/resources/qml/WizardPages/UpgradeFirmware.qml @@ -14,7 +14,7 @@ Item SystemPalette{id: palette} UM.I18nCatalog { id: catalog; name:"cura"} - property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? UM.USBPrinterManager.connectedPrinterList.getItem(0).printer : null + property variant printer_connection: Cura.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer : null Label { id: pageTitle @@ -62,7 +62,7 @@ Item anchors.top: parent.top anchors.left: parent.left text: catalog.i18nc("@action:button","Upgrade to Marlin Firmware"); - onClicked: UM.USBPrinterManager.updateAllFirmware() + onClicked: Cura.USBPrinterManager.updateAllFirmware() } Button { id: skipUpgradeButton From 2c489ed054ef5eab52e4ce7a1e5bc450daf72df2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 15:05:21 +0200 Subject: [PATCH 048/424] Connection state signal is now connected before connect is called CURA-1339 --- plugins/USBPrinting/USBPrinterOutputDeviceManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index 6d85a4cceb..636a134f2f 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -190,8 +190,8 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin, ## Because the model needs to be created in the same thread as the QMLEngine, we use a signal. def addOutputDevice(self, serial_port): device = USBPrinterOutputDevice.USBPrinterOutputDevice(serial_port) - device.connect() device.connectionStateChanged.connect(self._onConnectionStateChanged) + device.connect() device.progressChanged.connect(self.progressChanged) self._usb_output_devices[serial_port] = device From 6abeac5c44dfeb9e57c65af466e630ec0398deeb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 15:26:24 +0200 Subject: [PATCH 049/424] Added comment about us violating the API CURA-1339 --- plugins/USBPrinting/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/USBPrinting/__init__.py b/plugins/USBPrinting/__init__.py index 4e8e332173..4fab439bad 100644 --- a/plugins/USBPrinting/__init__.py +++ b/plugins/USBPrinting/__init__.py @@ -19,5 +19,7 @@ def getMetaData(): } def register(app): + # We are violating the QT API here (as we use a factory, which is technically not allowed). + # but we don't really have another means for doing this (and it seems to you know -work-) qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "Cura", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance) return {"extension":USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance(), "output_device": USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance()} From 232e447a745b52b1b54660594265cdaadcac7dd6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 15:48:20 +0200 Subject: [PATCH 050/424] Added bq firmware (which caused merge issue) --- plugins/USBPrinting/USBPrinterOutputDeviceManager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index 636a134f2f..24e2148375 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -140,6 +140,7 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin, # The *.hex files are stored at a seperate repository: # https://github.com/Ultimaker/cura-binary-data/tree/master/cura/resources/firmware machine_without_extras = {"bq_witbox" : "MarlinWitbox.hex", + "bq_hephestos_2" : "MarlinHephestos2.hex", "ultimaker_original" : "MarlinUltimaker-{baudrate}.hex", "ultimaker_original_plus" : "MarlinUltimaker-UMOP-{baudrate}.hex", "ultimaker2" : "MarlinUltimaker2.hex", From 1ffcb8419a971f7739006d47b2942d014bd5e4ad Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 18 Apr 2016 16:49:02 +0200 Subject: [PATCH 051/424] JSON: Enable Combing ==> Combing Mode (CURA-694) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 68f1a593ea..dc851770cf 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1001,7 +1001,7 @@ "icon": "category_travel", "settings": { "retraction_combing": { - "label": "Enable Combing", + "label": "Combing Mode", "description": "Combing keeps the nozzle within already printed areas when traveling. This results in slightly longer travel moves but reduces the need for retractions. If combing is off, the material will retract and the nozzle moves in a straight line to the next point. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only.", "type": "enum", "options": { From 919e2f55e91618f0f3fcd6681ffe4e6f67805790 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 18 Apr 2016 17:39:28 +0200 Subject: [PATCH 052/424] Replace "notice" icon with an icon that is less jarring and differs more in shape with the "reset" icon Contributes to CURA-1176 --- resources/themes/cura/icons/notice.svg | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/resources/themes/cura/icons/notice.svg b/resources/themes/cura/icons/notice.svg index 92790ad8ac..67595b326c 100644 --- a/resources/themes/cura/icons/notice.svg +++ b/resources/themes/cura/icons/notice.svg @@ -2,16 +2,12 @@ - + width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> + + From df8207747a0fa9f00a90f515de31a3946b83eab9 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Mon, 18 Apr 2016 14:41:50 -0400 Subject: [PATCH 053/424] Force PYTHONPATH to be in the top of the sys.path list. This fixes https://github.com/Ultimaker/Cura/issues/704 --- cura_app.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cura_app.py b/cura_app.py index 853edabd5e..796ecd96a9 100755 --- a/cura_app.py +++ b/cura_app.py @@ -5,6 +5,15 @@ import sys +# It looks like setuptools creates a .pth file in +# the default /usr/lib which causes the default site-packages +# to be inserted into sys.path before PYTHONPATH. +# This can cause issues such as having libsip loaded from +# the system instead of the one provided with Cura, which causes +# incompatibility issues with libArcus +sys.path.insert(1, os.environ.get('PYTHONPATH', '')) + + def exceptHook(hook_type, value, traceback): import cura.CrashHandler cura.CrashHandler.show(hook_type, value, traceback) From d33a75906a80d320c8d56d8a77dc86b62a84c217 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 19 Apr 2016 12:04:22 +0200 Subject: [PATCH 054/424] Progress is now only emitted if it changed CURA-1339 --- cura/PrinterOutputDevice.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 7bf992ea83..9bc46ea532 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -298,8 +298,9 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Set the progress of any currently active process # /param progress Progress of the process. def setProgress(self, progress): - self._progress = progress - self.progressChanged.emit() + if self._progress != progress: + self._progress = progress + self.progressChanged.emit() ## The current processing state of the backend. From 02e02a8f98961a154403ea892024a9b0e0c008e4 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 19 Apr 2016 15:30:34 +0200 Subject: [PATCH 055/424] Added way to update the head position CURA-1339 --- cura/PrinterOutputDevice.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 9bc46ea532..7025646294 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -190,6 +190,22 @@ class PrinterOutputDevice(OutputDevice, QObject): def headZ(self): return self._head_z + ## Update the saved position of the head + # This function should be called when a new position for the head is recieved. + def _updateHeadPosition(self, x, y ,z): + position_changed = False + if self._head_x != x: + self._head_x = x + position_changed = True + if self._head_y != y: + self._head_y = y + position_changed = True + if self._head_z != z: + self._head_z = z + position_changed = True + if position_changed: + self.headPositionChanged.emit() + ## Set the position of the head. # In some machines it's actually the bed that moves. For convenience sake we simply see it all as head movements. # This function is "final" (do not re-implement) From c329c2e12d4d419fce4386d5e8da5c188d84204b Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 19 Apr 2016 16:52:22 +0200 Subject: [PATCH 056/424] Do not try to recreate the socket when we are shutting down anyway This prevents issues where closing the socket triggers socket creation and then a deadlock occurs. Contributes to CURA-1391 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 59a802045a..7a5d332d9e 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -200,8 +200,10 @@ class CuraEngineBackend(Backend): self._onChanged() def _onSocketError(self, error): - super()._onSocketError(error) + if Application.getInstance().isShuttingDown(): + return + super()._onSocketError(error) self._terminate() if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]: From e7e4512fd094963c5dd8048de6d3289909c294be Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 19 Apr 2016 17:39:30 +0200 Subject: [PATCH 057/424] JSON: fix: moved line distance computation from engine to frontend (CURA-1317) --- resources/machines/fdmprinter.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index dc851770cf..1db6182601 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -552,7 +552,7 @@ "default": 2, "min_value": "0", "visible": false, - "inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density" + "inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" } } }, @@ -1237,7 +1237,7 @@ "default": 2.66, "visible": false, "enabled": "support_enable", - "inherit_function": "(support_line_width * 100) / parent_value", + "inherit_function": "(support_line_width * 100) / parent_value * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", "global_only": true } } @@ -1372,7 +1372,7 @@ "default": 0.4, "min_value": "0", "visible": false, - "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value", + "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", "enabled": "support_roof_enable", "global_only": true } From c2ac0e8217b997528cf72a916ccd348f92ed94c6 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 19 Apr 2016 18:11:11 +0200 Subject: [PATCH 058/424] Fix resource paths after Uranium API change Contributes to CURA-1390 --- cura/CuraApplication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 8579ce7e09..c83da0c071 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -66,9 +66,9 @@ class CuraApplication(QtApplication): Q_ENUMS(ResourceTypes) def __init__(self): - Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura")) + Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura", "resources")) if not hasattr(sys, "frozen"): - Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) + Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")) self._open_file_queue = [] # Files to open when plug-ins are loaded. From a8e13f13ba2b837f7e39e2a69383e80559741f8c Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Tue, 19 Apr 2016 18:56:58 +0200 Subject: [PATCH 059/424] Add missing import of 'os' --- cura_app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura_app.py b/cura_app.py index 796ecd96a9..2b24b2c664 100755 --- a/cura_app.py +++ b/cura_app.py @@ -3,6 +3,7 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. +import os import sys # It looks like setuptools creates a .pth file in From 839bc1fec8b78188494ae9174218a20d10e4dbd2 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Tue, 19 Apr 2016 19:11:14 +0200 Subject: [PATCH 060/424] Making PR #708 more concrete Now a check is made whether PYTHONPATH is set at all. So 'normal' installations will pass that section. After that sys.path is checked whether the last element is PYTHONPATH. If it is PYTHONPATH will be moved before entry at sys.path[1], because sys.path[0] is os.curdir. Inserting PYTHONPATH in front of it might be unsave. --- cura_app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index 2b24b2c664..aa09f22446 100755 --- a/cura_app.py +++ b/cura_app.py @@ -6,13 +6,17 @@ import os import sys +# WORKAROUND: GITHUB-704 GITHUB-708 # It looks like setuptools creates a .pth file in # the default /usr/lib which causes the default site-packages # to be inserted into sys.path before PYTHONPATH. # This can cause issues such as having libsip loaded from # the system instead of the one provided with Cura, which causes # incompatibility issues with libArcus -sys.path.insert(1, os.environ.get('PYTHONPATH', '')) +if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used + if sys.path[-1] == os.environ["PYTHONPATH"]: # .. check whether PYTHONPATH is placed incorrectly at the end of sys.path. + sys.path.pop(-1) # If so remove that element.. + sys.path.insert(1, os.environ['PYTHONPATH']) # and add it at the correct place again. def exceptHook(hook_type, value, traceback): From e040029a410624a4e239ead892304c92a82b8bd4 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Tue, 19 Apr 2016 19:18:05 +0200 Subject: [PATCH 061/424] Just a little typo --- cura_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index aa09f22446..afa3eb95df 100755 --- a/cura_app.py +++ b/cura_app.py @@ -15,7 +15,7 @@ import sys # incompatibility issues with libArcus if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used if sys.path[-1] == os.environ["PYTHONPATH"]: # .. check whether PYTHONPATH is placed incorrectly at the end of sys.path. - sys.path.pop(-1) # If so remove that element.. + sys.path.pop(-1) # If so, remove that element.. sys.path.insert(1, os.environ['PYTHONPATH']) # and add it at the correct place again. From 102e13b152e678ab94db0adaa664796346d65010 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Tue, 19 Apr 2016 19:35:31 +0200 Subject: [PATCH 062/424] Doing the check the other way round.. --- cura_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura_app.py b/cura_app.py index aa09f22446..54d5d69b63 100755 --- a/cura_app.py +++ b/cura_app.py @@ -14,8 +14,8 @@ import sys # the system instead of the one provided with Cura, which causes # incompatibility issues with libArcus if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used - if sys.path[-1] == os.environ["PYTHONPATH"]: # .. check whether PYTHONPATH is placed incorrectly at the end of sys.path. - sys.path.pop(-1) # If so remove that element.. + if sys.path[1] != os.environ["PYTHONPATH"]: # .. check whether PYTHONPATH is placed incorrectly. + sys.path.remove(os.environ["PYTHONPATH"]) # If so remove that element.. sys.path.insert(1, os.environ['PYTHONPATH']) # and add it at the correct place again. From 98c84798c62cc94d29133f8935cbece4232f0071 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Tue, 19 Apr 2016 20:17:20 +0200 Subject: [PATCH 063/424] Making sure we got the realpath when using an absolute path --- cura_app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cura_app.py b/cura_app.py index a2b29c92af..3561a3b06e 100755 --- a/cura_app.py +++ b/cura_app.py @@ -14,9 +14,10 @@ import sys # the system instead of the one provided with Cura, which causes # incompatibility issues with libArcus if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used - if sys.path[1] != os.environ["PYTHONPATH"]: # .. check whether PYTHONPATH is placed incorrectly. - sys.path.remove(os.environ["PYTHONPATH"]) # If so, remove that element.. - sys.path.insert(1, os.environ['PYTHONPATH']) # and add it at the correct place again. + PYTHONPATH_real = os.path.realpath(os.environ["PYTHONPATH"]) + if sys.path[1] != PYTHONPATH_real: # .. check whether PYTHONPATH is placed incorrectly. + sys.path.remove(PYTHONPATH_real) # If so, remove that element.. + sys.path.insert(1, PYTHONPATH_real) # and add it at the correct place again. def exceptHook(hook_type, value, traceback): From 286673e812dc67a7311e6beffa146981ae2afb6a Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Tue, 19 Apr 2016 20:18:07 +0200 Subject: [PATCH 064/424] Making WORKAROUND a true marker --- cura_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index 3561a3b06e..060abd5520 100755 --- a/cura_app.py +++ b/cura_app.py @@ -6,7 +6,7 @@ import os import sys -# WORKAROUND: GITHUB-704 GITHUB-708 +#WORKAROUND: GITHUB-704 GITHUB-708 # It looks like setuptools creates a .pth file in # the default /usr/lib which causes the default site-packages # to be inserted into sys.path before PYTHONPATH. From 37ba88351a449ae538d0906ab9c42283dd1d78d1 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Tue, 19 Apr 2016 20:24:56 +0200 Subject: [PATCH 065/424] Adding marker for the Nvidia workaround --- cura/CuraApplication.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index c83da0c071..2a22b624a9 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -46,6 +46,7 @@ import numpy import copy numpy.seterr(all="ignore") +#WORKAROUND: GITHUB-88 GITHUB-385 GITHUB-612 if platform.system() == "Linux": # Needed for platform.linux_distribution, which is not available on Windows and OSX # For Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826 if platform.linux_distribution()[0] in ("Ubuntu", ): # TODO: Needs a "if X11_GFX == 'nvidia'" here. The workaround is only needed on Ubuntu+NVidia drivers. Other drivers are not affected, but fine with this fix. From 6799a76a7c9aa6911dea9250432b80f9f559f435 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 20 Apr 2016 15:25:23 +0200 Subject: [PATCH 066/424] JSON fix: combing mode default enum value (CURA-694) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 1db6182601..15351c4624 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1009,7 +1009,7 @@ "all": "All", "noskin": "No Skin" }, - "default": true, + "default": "all", "visible": false, "global_only": true }, From 134867f833bef6e6970e120be71add5b7c3ee3a5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 20 Apr 2016 17:18:10 +0200 Subject: [PATCH 067/424] Fix indenting tabs -> spaces Contributes to issue CURA-695. --- resources/machines/fdmprinter.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 15351c4624..11843cac0f 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1608,7 +1608,7 @@ "unit": "mm", "type": "float", "default": 1, - "inherit_function": "line_width", + "inherit_function": "line_width", "min_value": "0.0001", "max_value_warning": "machine_nozzle_size * 2", "enabled": "adhesion_type == \"raft\"", @@ -1646,7 +1646,7 @@ "type": "float", "default": 1, "min_value": "0.0001", - "inherit_function": "line_width", + "inherit_function": "line_width", "max_value_warning": "machine_nozzle_size * 2", "enabled": "adhesion_type == \"raft\"", "global_only": "True", From 61069e9a71c57a65eded4d9a9dc1213fd92e1d88 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Thu, 21 Apr 2016 17:34:33 +0200 Subject: [PATCH 068/424] Making the fix working with a list of PATHS seperated by os.pathsep Needs testing but should work. (fingers crossed) --- cura_app.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index 060abd5520..6c20910907 100755 --- a/cura_app.py +++ b/cura_app.py @@ -14,7 +14,13 @@ import sys # the system instead of the one provided with Cura, which causes # incompatibility issues with libArcus if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used - PYTHONPATH_real = os.path.realpath(os.environ["PYTHONPATH"]) + PYTHONPATH = os.environ["PYTHONPATH"] + PYTHONPATH = PYTHONPATH.split(os.pathsep) + PYTHONPATH_real = os.path.realpath(PYTHONPATH[0]) + PYTHONPATH = PYTHONPATH[1:] + while PYTHONPATH: + PYTHONPATH_real += ":%s" %(os.path.realpath(PYTHONPATH[0])) + PYTHONPATH = PYTHONPATH[1:] if sys.path[1] != PYTHONPATH_real: # .. check whether PYTHONPATH is placed incorrectly. sys.path.remove(PYTHONPATH_real) # If so, remove that element.. sys.path.insert(1, PYTHONPATH_real) # and add it at the correct place again. From 1a5245416512441097b90104cecc8bf84e4b81b6 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Thu, 21 Apr 2016 19:09:15 +0200 Subject: [PATCH 069/424] This should be fine now.. --- cura_app.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/cura_app.py b/cura_app.py index 6c20910907..bd820337f2 100755 --- a/cura_app.py +++ b/cura_app.py @@ -13,18 +13,14 @@ import sys # This can cause issues such as having libsip loaded from # the system instead of the one provided with Cura, which causes # incompatibility issues with libArcus -if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used - PYTHONPATH = os.environ["PYTHONPATH"] - PYTHONPATH = PYTHONPATH.split(os.pathsep) - PYTHONPATH_real = os.path.realpath(PYTHONPATH[0]) - PYTHONPATH = PYTHONPATH[1:] - while PYTHONPATH: - PYTHONPATH_real += ":%s" %(os.path.realpath(PYTHONPATH[0])) - PYTHONPATH = PYTHONPATH[1:] - if sys.path[1] != PYTHONPATH_real: # .. check whether PYTHONPATH is placed incorrectly. - sys.path.remove(PYTHONPATH_real) # If so, remove that element.. - sys.path.insert(1, PYTHONPATH_real) # and add it at the correct place again. - +if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used + PYTHONPATH = os.environ["PYTHONPATH"].split(os.pathsep) # Get the value, split it.. + PYTHONPATH = PYTHONPATH.reverse() # and reverse it, because we always insert at 1 + for PATH in PYTHONPATH: # Now beginning with the last PATH + PATH_real = os.path.realpath(PATH) # Making the the path "real" + if PATH_real in sys.path: # This should always work, but keep it to be sure.. + sys.path.remove(PATH_real) + sys.path.insert(1, PATH_real) # Insert it at 1 before os.curdir, which is 0. def exceptHook(hook_type, value, traceback): import cura.CrashHandler From 3a61cf31523dc124a41c94802e7adc890f41db73 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Thu, 21 Apr 2016 19:41:10 +0200 Subject: [PATCH 070/424] Little typo --- cura_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index bd820337f2..f7b03e273a 100755 --- a/cura_app.py +++ b/cura_app.py @@ -20,7 +20,7 @@ if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is u PATH_real = os.path.realpath(PATH) # Making the the path "real" if PATH_real in sys.path: # This should always work, but keep it to be sure.. sys.path.remove(PATH_real) - sys.path.insert(1, PATH_real) # Insert it at 1 before os.curdir, which is 0. + sys.path.insert(1, PATH_real) # Insert it at 1 after os.curdir, which is 0. def exceptHook(hook_type, value, traceback): import cura.CrashHandler From 7d2b329e78491c4bd8ab8ad84965de494906f55f Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Thu, 21 Apr 2016 20:23:07 +0200 Subject: [PATCH 071/424] Just a stupid mistake .reverse() does not return anything (None) --- cura_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index f7b03e273a..dc748435f9 100755 --- a/cura_app.py +++ b/cura_app.py @@ -15,7 +15,7 @@ import sys # incompatibility issues with libArcus if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used PYTHONPATH = os.environ["PYTHONPATH"].split(os.pathsep) # Get the value, split it.. - PYTHONPATH = PYTHONPATH.reverse() # and reverse it, because we always insert at 1 + PYTHONPATH.reverse() # and reverse it, because we always insert at 1 for PATH in PYTHONPATH: # Now beginning with the last PATH PATH_real = os.path.realpath(PATH) # Making the the path "real" if PATH_real in sys.path: # This should always work, but keep it to be sure.. From cde23edfed1341e4d1a8313c73cf835aae66e754 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 25 Apr 2016 13:51:22 +0200 Subject: [PATCH 072/424] Prevent wizard pages from closing when they are "accepted" by pressing return. Also removes some code replication in wizard pages. CURA-1354 --- resources/qml/WizardPages/AddMachine.qml | 22 ++--------------- resources/qml/WizardPages/Bedleveling.qml | 24 +------------------ .../qml/WizardPages/UltimakerCheckup.qml | 4 +--- resources/qml/WizardPages/UpgradeFirmware.qml | 4 +--- 4 files changed, 5 insertions(+), 49 deletions(-) diff --git a/resources/qml/WizardPages/AddMachine.qml b/resources/qml/WizardPages/AddMachine.qml index 0c235320db..e4d40d7723 100644 --- a/resources/qml/WizardPages/AddMachine.qml +++ b/resources/qml/WizardPages/AddMachine.qml @@ -34,25 +34,10 @@ Item target: base.wizard onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element { - var name = machineName.text - - var old_page_count = base.wizard.getPageCount() - // Delete old pages (if any) - for (var i = old_page_count - 1; i > 0; i--) - { - base.wizard.removePage(i) - } + base.wizard.resetPages() saveMachine() } - onBackClicked: - { - var old_page_count = base.wizard.getPageCount() - // Delete old pages (if any) - for (var i = old_page_count - 1; i > 0; i--) - { - base.wizard.removePage(i) - } - } + onBackClicked: base.wizard.resetPages() } Label @@ -249,9 +234,6 @@ Item break; } } - if(base.wizard.lastPage == true){ - base.wizard.visible = false - } } } diff --git a/resources/qml/WizardPages/Bedleveling.qml b/resources/qml/WizardPages/Bedleveling.qml index 1721f0fd4a..77d956f29b 100644 --- a/resources/qml/WizardPages/Bedleveling.qml +++ b/resources/qml/WizardPages/Bedleveling.qml @@ -28,17 +28,6 @@ Item UM.I18nCatalog { id: catalog; name:"cura"} property variant wizard: null; - Connections - { - target: wizardPage.wizard - onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element - { - if(wizardPage.wizard.lastPage == true){ - wizardPage.wizard.visible = false - } - } - } - Label { id: pageTitle @@ -120,18 +109,7 @@ Item anchors.left: parent.width < wizardPage.width ? bedlevelingButton.right : parent.left anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 text: catalog.i18nc("@action:button","Skip Bedleveling"); - onClicked: { - if(wizardPage.wizard.lastPage == true){ - var old_page_count = wizardPage.wizard.getPageCount() - // Delete old pages (if any) - for (var i = old_page_count - 1; i > 0; i--) - { - wizardPage.wizard.removePage(i) - } - wizardPage.wizard.currentPage = 0 - wizardPage.wizard.visible = false - } - } + onClicked: base.nextPage() } } diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index b8c8aebe12..aafbce79f9 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -114,9 +114,7 @@ Item anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 //enabled: !alreadyTested text: catalog.i18nc("@action:button","Skip Printer Check"); - onClicked: { - base.currentPage += 1 - } + onClicked: base.nextPage() } } diff --git a/resources/qml/WizardPages/UpgradeFirmware.qml b/resources/qml/WizardPages/UpgradeFirmware.qml index 4bbb049f20..467e947e35 100644 --- a/resources/qml/WizardPages/UpgradeFirmware.qml +++ b/resources/qml/WizardPages/UpgradeFirmware.qml @@ -71,9 +71,7 @@ Item anchors.left: parent.width < wizardPage.width ? upgradeButton.right : parent.left anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 text: catalog.i18nc("@action:button","Skip Upgrade"); - onClicked: { - base.currentPage += 1 - } + onClicked: base.nextPage() } } ExclusiveGroup { id: printerGroup; } From f92ff3e864c209e33ed7987f6701a51732c06410 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Mon, 25 Apr 2016 15:53:02 +0200 Subject: [PATCH 073/424] Only talk to the CuraEngine socket from the same (Main) thread, and be a lot more careful about handling the StartSliceJob when restarting CuraEngine. Fixes CURA-1434 --- .../CuraEngineBackend/CuraEngineBackend.py | 22 ++- plugins/CuraEngineBackend/StartSliceJob.py | 128 +++++++++--------- 2 files changed, 83 insertions(+), 67 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index f61e3fde81..09817aa995 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -74,6 +74,7 @@ class CuraEngineBackend(Backend): self._message_handlers["cura.proto.SlicingFinished"] = self._onSlicingFinishedMessage self._slicing = False + self._start_slice_job = None self._restart = False self._enabled = True self._always_restart = True @@ -153,14 +154,19 @@ class CuraEngineBackend(Backend): self._slicing = True self.slicingStarted.emit() - job = StartSliceJob.StartSliceJob(self._profile, self._socket) - job.start() - job.finished.connect(self._onStartSliceCompleted) + slice_message = self._socket.createMessage("cura.proto.Slice") + settings_message = self._socket.createMessage("cura.proto.SettingList"); + self._start_slice_job = StartSliceJob.StartSliceJob(self._profile, slice_message, settings_message) + self._start_slice_job.start() + self._start_slice_job.finished.connect(self._onStartSliceCompleted) def _terminate(self): self._slicing = False self._restart = True self._stored_layer_data = [] + if self._start_slice_job is not None: + self._start_slice_job.cancel() + self.slicingCancelled.emit() self.processingProgress.emit(0) Logger.log("d", "Attempting to kill the engine process") @@ -174,13 +180,19 @@ class CuraEngineBackend(Backend): except Exception as e: # terminating a process that is already terminating causes an exception, silently ignore this. Logger.log("d", "Exception occured while trying to kill the engine %s", str(e)) - def _onStartSliceCompleted(self, job): - if job.getError() or job.getResult() != True: + # Note that cancelled slice jobs can still call this method. + if self._start_slice_job is job: + self._start_slice_job = None + if job.isCancelled() or job.getError() or job.getResult() != True: if self._message: self._message.hide() self._message = None return + else: + # Preparation completed, send it to the backend. + self._socket.sendMessage(job.getSettingsMessage()) + self._socket.sendMessage(job.getSliceMessage()) def _onSceneChanged(self, source): if type(source) is not SceneNode: diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index c1d7932302..f4f096f54c 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -27,87 +27,94 @@ class GcodeStartEndFormatter(Formatter): Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end gcode", key) return "{" + str(key) + "}" -## Job class that handles sending the current scene data to CuraEngine +## Job class that builds up the message of scene data to send to CuraEngine. class StartSliceJob(Job): - def __init__(self, profile, socket): + def __init__(self, profile, sliceMessage, settingsMessage): super().__init__() self._scene = Application.getInstance().getController().getScene() self._profile = profile - self._socket = socket + self._slice_message = sliceMessage + self._settings_message = settingsMessage + self._is_cancelled = False + + def getSettingsMessage(self): + return self._settings_message + + def getSliceMessage(self): + return self._slice_message def run(self): - self._scene.acquireLock() + with self._scene.getSceneLock(): + for node in DepthFirstIterator(self._scene.getRoot()): + if node.callDecoration("getLayerData"): + node.getParent().removeChild(node) + break - for node in DepthFirstIterator(self._scene.getRoot()): - if node.callDecoration("getLayerData"): - node.getParent().removeChild(node) - break + object_groups = [] + if self._profile.getSettingValue("print_sequence") == "one_at_a_time": + for node in OneAtATimeIterator(self._scene.getRoot()): + temp_list = [] - object_groups = [] - if self._profile.getSettingValue("print_sequence") == "one_at_a_time": - for node in OneAtATimeIterator(self._scene.getRoot()): + if getattr(node, "_outside_buildarea", False): + continue + + children = node.getAllChildren() + children.append(node) + for child_node in children: + if type(child_node) is SceneNode and child_node.getMeshData() and child_node.getMeshData().getVertices() is not None: + temp_list.append(child_node) + + if temp_list: + object_groups.append(temp_list) + Job.yieldThread() + if len(object_groups) == 0: + Logger.log("w", "No objects suitable for one at a time found, or no correct order found") + else: temp_list = [] - - if getattr(node, "_outside_buildarea", False): - continue - - children = node.getAllChildren() - children.append(node) - for child_node in children: - if type(child_node) is SceneNode and child_node.getMeshData() and child_node.getMeshData().getVertices() is not None: - temp_list.append(child_node) + for node in DepthFirstIterator(self._scene.getRoot()): + if type(node) is SceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None: + if not getattr(node, "_outside_buildarea", False): + temp_list.append(node) + Job.yieldThread() if temp_list: object_groups.append(temp_list) - Job.yieldThread() - if len(object_groups) == 0: - Logger.log("w", "No objects suitable for one at a time found, or no correct order found") - else: - temp_list = [] - for node in DepthFirstIterator(self._scene.getRoot()): - if type(node) is SceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None: - if not getattr(node, "_outside_buildarea", False): - temp_list.append(node) - Job.yieldThread() - if temp_list: - object_groups.append(temp_list) + if not object_groups: + return - self._scene.releaseLock() + self._buildSettingsMessage(self._profile) - if not object_groups: - return + for group in object_groups: + group_message = self._slice_message.addRepeatedMessage("object_lists") + if group[0].getParent().callDecoration("isGroup"): + self._handlePerObjectSettings(group[0].getParent(), group_message) + for object in group: + mesh_data = object.getMeshData().getTransformed(object.getWorldTransformation()) - self._sendSettings(self._profile) + obj = group_message.addRepeatedMessage("objects") + obj.id = id(object) - slice_message = self._socket.createMessage("cura.proto.Slice") + verts = numpy.array(mesh_data.getVertices()) + verts[:,[1,2]] = verts[:,[2,1]] + verts[:,1] *= -1 - for group in object_groups: - group_message = slice_message.addRepeatedMessage("object_lists") - if group[0].getParent().callDecoration("isGroup"): - self._handlePerObjectSettings(group[0].getParent(), group_message) - for object in group: - mesh_data = object.getMeshData().getTransformed(object.getWorldTransformation()) + obj.vertices = verts - obj = group_message.addRepeatedMessage("objects") - obj.id = id(object) + self._handlePerObjectSettings(object, obj) - verts = numpy.array(mesh_data.getVertices()) - verts[:,[1,2]] = verts[:,[2,1]] - verts[:,1] *= -1 + Job.yieldThread() - obj.vertices = verts - - self._handlePerObjectSettings(object, obj) - - Job.yieldThread() - - Logger.log("d", "Sending data to engine for slicing.") - self._socket.sendMessage(slice_message) - Logger.log("d", "Sending data to engine is completed") self.setResult(True) + def cancel(self): + super().cancel() + self._is_cancelled = True + + def isCancelled(self): + return self._is_cancelled + def _expandGcodeTokens(self, key, value, settings): try: # any setting can be used as a token @@ -117,22 +124,19 @@ class StartSliceJob(Job): Logger.log("w", "Unabled to do token replacement on start/end gcode %s", traceback.format_exc()) return str(value).encode("utf-8") - def _sendSettings(self, profile): - msg = self._socket.createMessage("cura.proto.SettingList"); + def _buildSettingsMessage(self, profile): settings = profile.getAllSettingValues(include_machine = True) start_gcode = settings["machine_start_gcode"] settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode settings["material_print_temp_prepend"] = "{material_print_temperature}" not in start_gcode for key, value in settings.items(): - s = msg.addRepeatedMessage("settings") + s = self._settings_message.addRepeatedMessage("settings") s.name = key if key == "machine_start_gcode" or key == "machine_end_gcode": s.value = self._expandGcodeTokens(key, value, settings) else: s.value = str(value).encode("utf-8") - self._socket.sendMessage(msg) - def _handlePerObjectSettings(self, node, message): profile = node.callDecoration("getProfile") if profile: From 4548c38af6759433c6267030473651cefada8e61 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Apr 2016 13:29:49 +0200 Subject: [PATCH 074/424] Structure gitignore --- .gitignore | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 7a67e625c9..06236c2f8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,17 @@ -*.pyc -*kdev* -*.kate-swp -__pycache__ -docs/html -*.lprof -*.log -*~ +# Compiled and generated things. build -*.qm +*.pyc +__pycache__ *.mo +docs/html +*.log resources/i18n/en resources/i18n/x-test + +# Editors and IDEs. +*kdev* +*.kate-swp +*.lprof +*~ +*.qm + From ceb9df8c5da5cce889e457c5b05d562b380e4300 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Apr 2016 13:30:37 +0200 Subject: [PATCH 075/424] Ignore PyCharm IDE files --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 06236c2f8e..72ba4bf565 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,4 @@ resources/i18n/x-test *.lprof *~ *.qm - +.idea From 43dff1296cfa332bba699f5adcc1ae8ae3e6934c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Apr 2016 13:58:01 +0200 Subject: [PATCH 076/424] Move retraction distance to material settings I've discussed this with Tom, Kristel, Diana, Marvin and Oscar. This setting should really be dependent on material since the material influences the speed it can handle the most. Contributes to issue CURA-346. --- resources/machines/RigidBot.json | 1 - resources/machines/RigidBotBig.json | 1 - resources/machines/bq_hephestos.json | 1 - resources/machines/bq_hephestos_2.json | 1 - resources/machines/bq_hephestos_xl.json | 1 - resources/machines/bq_witbox.json | 1 - resources/machines/bq_witbox_2.json | 1 - resources/machines/fdmprinter.json | 2 +- resources/machines/innovo-inventor.json | 1 - resources/machines/ultimaker2plus.json | 1 - resources/profiles/materials/abs.cfg | 2 -- resources/profiles/materials/cpe.cfg | 3 +-- resources/profiles/materials/pla.cfg | 3 +-- 13 files changed, 3 insertions(+), 16 deletions(-) diff --git a/resources/machines/RigidBot.json b/resources/machines/RigidBot.json index 9b19c0871e..61f0289f2a 100644 --- a/resources/machines/RigidBot.json +++ b/resources/machines/RigidBot.json @@ -44,7 +44,6 @@ "material_diameter": { "default": 1.75, "visible": true }, "retraction_enable": { "default": true, "always_visible": true }, "retraction_speed": { "default": 50.0, "visible": false }, - "retraction_amount": { "default": 0.8, "visible": false }, "retraction_hop": { "default": 0.075, "visible": false }, "speed_print": { "default": 60.0, "visible": true }, "speed_infill": { "default": 100.0, "visible": true }, diff --git a/resources/machines/RigidBotBig.json b/resources/machines/RigidBotBig.json index 20b1ea2982..2f6afc104d 100644 --- a/resources/machines/RigidBotBig.json +++ b/resources/machines/RigidBotBig.json @@ -42,7 +42,6 @@ "material_diameter": { "default": 1.75, "visible": true }, "retraction_enable": { "default": true, "always_visible": true}, "retraction_speed": { "default": 50.0, "visible": false }, - "retraction_amount": { "default": 0.8, "visible": false }, "retraction_hop": { "default": 0.075, "visible": false }, "speed_print": { "default": 60.0, "visible": true}, "speed_infill": { "default": 100.0, "visible": true }, diff --git a/resources/machines/bq_hephestos.json b/resources/machines/bq_hephestos.json index 01aac77f0d..de33e792e5 100644 --- a/resources/machines/bq_hephestos.json +++ b/resources/machines/bq_hephestos.json @@ -51,7 +51,6 @@ "speed_travel": { "default": 120.0 }, "speed_layer_0": { "default": 20.0, "visible": false }, "retraction_speed": { "default": 30.0, "visible": false}, - "retraction_amount": { "default": 2.0, "visible": false }, "retraction_hop": { "default": 0.075, "visible": false }, "support_enable": { "default": true } } diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json index cc87057cc5..ae4eee9c0d 100644 --- a/resources/machines/bq_hephestos_2.json +++ b/resources/machines/bq_hephestos_2.json @@ -54,7 +54,6 @@ "speed_infill": { "default": 80.0, "visible": true }, "speed_topbottom": { "default": 35.0, "visible": false }, "skirt_speed": { "default": 35.0, "visible": false }, - "retraction_amount": { "default": 2.0, "visible": false }, "retraction_speed": { "default": 45.0, "visible": false }, "skirt_line_count": { "default": 4 }, "skirt_minimal_length": { "default": 30.0, "visible": false }, diff --git a/resources/machines/bq_hephestos_xl.json b/resources/machines/bq_hephestos_xl.json index 8a8ad162ce..056b0881c2 100644 --- a/resources/machines/bq_hephestos_xl.json +++ b/resources/machines/bq_hephestos_xl.json @@ -51,7 +51,6 @@ "speed_travel": { "default": 120.0 }, "speed_layer_0": { "default": 20.0, "visible": false }, "retraction_speed": { "default": 30.0, "visible": false}, - "retraction_amount": { "default": 2.0, "visible": false }, "retraction_hop": { "default": 0.075, "visible": false }, "support_enable": { "default": true } } diff --git a/resources/machines/bq_witbox.json b/resources/machines/bq_witbox.json index e12c812fc0..af41ae66ea 100644 --- a/resources/machines/bq_witbox.json +++ b/resources/machines/bq_witbox.json @@ -51,7 +51,6 @@ "speed_travel": { "default": 120.0 }, "speed_layer_0": { "default": 20.0, "visible": false }, "retraction_speed": { "default": 30.0, "visible": false}, - "retraction_amount": { "default": 2.0, "visible": false }, "retraction_hop": { "default": 0.075, "visible": false }, "support_enable": { "default": true } } diff --git a/resources/machines/bq_witbox_2.json b/resources/machines/bq_witbox_2.json index 4eb9b67d99..5377d594b5 100644 --- a/resources/machines/bq_witbox_2.json +++ b/resources/machines/bq_witbox_2.json @@ -54,7 +54,6 @@ "speed_infill": { "default": 80.0, "visible": true }, "speed_topbottom": { "default": 35.0, "visible": false }, "skirt_speed": { "default": 35.0, "visible": false }, - "retraction_amount": { "default": 2.0, "visible": false }, "retraction_speed": { "default": 45.0, "visible": false }, "skirt_line_count": { "default": 4 }, "skirt_minimal_length": { "default": 30.0, "visible": false }, diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 11843cac0f..f0be309eaa 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -718,7 +718,7 @@ "description": "The length of material retracted during a retraction move.", "unit": "mm", "type": "float", - "default": 4.5, + "default": 6.5, "min_value_warning": "-0.0001", "max_value_warning": "10.0", "visible": false, diff --git a/resources/machines/innovo-inventor.json b/resources/machines/innovo-inventor.json index 7ba8b9a48c..df5a0ccb66 100644 --- a/resources/machines/innovo-inventor.json +++ b/resources/machines/innovo-inventor.json @@ -36,7 +36,6 @@ "material_diameter": { "default": 1.75, "visible": true}, "retraction_enable": { "default": true, "always_visible": true}, "retraction_speed": { "default": 50.0, "visible": false }, - "retraction_amount": { "default": 2.5, "visible": false }, "retraction_hop": { "default": 0.075, "visible": false }, "speed_print": { "default": 60.0, "visible": true}, "speed_infill": { "default": 100.0, "visible": true }, diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index 0a344d4aa6..296cd99a06 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -45,7 +45,6 @@ ] ] }, - "retraction_amount": { "default": 6.0 }, "machine_disallowed_areas": { "default": [ [[-115.0, 112.5], [ -78.0, 112.5], [ -80.0, 102.5], [-115.0, 102.5]], [[ 115.0, 112.5], [ 115.0, 102.5], [ 105.0, 102.5], [ 103.0, 112.5]], diff --git a/resources/profiles/materials/abs.cfg b/resources/profiles/materials/abs.cfg index d5fe2cc199..67abc32810 100644 --- a/resources/profiles/materials/abs.cfg +++ b/resources/profiles/materials/abs.cfg @@ -7,5 +7,3 @@ name = ABS material_print_temperature = 250 material_bed_temperature = 80 material_flow = 107 -retraction_amount = 6.5 - diff --git a/resources/profiles/materials/cpe.cfg b/resources/profiles/materials/cpe.cfg index e389bdb23a..0621260745 100644 --- a/resources/profiles/materials/cpe.cfg +++ b/resources/profiles/materials/cpe.cfg @@ -5,5 +5,4 @@ name = CPE [settings] material_print_temperature = 250 -material_bed_temperature = 70 -retraction_amount = 6.5 +material_bed_temperature = 70 \ No newline at end of file diff --git a/resources/profiles/materials/pla.cfg b/resources/profiles/materials/pla.cfg index 216f2bfb66..b5af61b9b6 100644 --- a/resources/profiles/materials/pla.cfg +++ b/resources/profiles/materials/pla.cfg @@ -4,5 +4,4 @@ type = material name = PLA [settings] -material_bed_temperature = 60 -retraction_amount = 6.5 +material_bed_temperature = 60 \ No newline at end of file From b5f00ffd80b5bce0c8fe78a11a604c8e9cc152e9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Apr 2016 16:01:45 +0200 Subject: [PATCH 077/424] Removed superfluous override from UM2+ definition The default is line_width * 2 but this defined it as machine_nozzle_size * 2. I talked it over with Tom (who added that line) and he said it was only copied from Paul's profiles. It should've been line width. Makes more sense. It's line_width * 2 so that it can go from an outer wall to the infill without retracting. Contributes to issue CURA-346. --- resources/machines/ultimaker2plus.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index 296cd99a06..cc86bd8ce3 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -14,7 +14,6 @@ "speed_infill": { "inherit_function": "speed_print" }, "speed_wall_x": { "inherit_function": "speed_wall" }, "layer_height_0": { "inherit_function": "round(machine_nozzle_size / 1.5, 2)" }, - "retraction_min_travel": { "inherit_function": "machine_nozzle_size * 2" }, "line_width": { "inherit_function": "round(machine_nozzle_size * 0.875, 2)" }, "speed_layer_0": { "default": "20" }, "speed_support": { "inherit_function": "speed_wall_0" }, From 58d08f2b8d701ec903f8edcbe2ce892c8357ab60 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Apr 2016 16:04:42 +0200 Subject: [PATCH 078/424] Change default retraction for nozzle switch This should get overridden by the heat zone length anyway. Contributes to issue CURA-346. --- resources/machines/dual_extrusion_printer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json index f85cce9081..bdf8f9d34d 100644 --- a/resources/machines/dual_extrusion_printer.json +++ b/resources/machines/dual_extrusion_printer.json @@ -258,7 +258,7 @@ "description": "The amount of retraction: Set at 0 for no retraction at all. This should generally be the same as the length of the heat zone.", "unit": "mm", "type": "float", - "default": 16, + "default": 20, "min_value_warning": "0", "max_value_warning": "100", "visible": false, From c67ae0f1c962604e247a2627b6f57d5e62ff84d3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Apr 2016 16:20:12 +0200 Subject: [PATCH 079/424] Remove retraction settings from machine definitions These should be different per material, not per machine. Contributes to issue CURA-346. --- resources/machines/RigidBot.json | 3 --- resources/machines/RigidBotBig.json | 3 --- resources/machines/bq_hephestos.json | 2 -- resources/machines/bq_hephestos_2.json | 1 - resources/machines/bq_hephestos_xl.json | 2 -- resources/machines/bq_witbox.json | 2 -- resources/machines/bq_witbox_2.json | 1 - resources/machines/innovo-inventor.json | 3 --- resources/machines/maker_starter.json | 1 - 9 files changed, 18 deletions(-) diff --git a/resources/machines/RigidBot.json b/resources/machines/RigidBot.json index 61f0289f2a..efd5a6e72c 100644 --- a/resources/machines/RigidBot.json +++ b/resources/machines/RigidBot.json @@ -42,9 +42,6 @@ "material_print_temperature": { "default": 195, "visible": true }, "material_bed_temperature": { "default": 60, "visible": true }, "material_diameter": { "default": 1.75, "visible": true }, - "retraction_enable": { "default": true, "always_visible": true }, - "retraction_speed": { "default": 50.0, "visible": false }, - "retraction_hop": { "default": 0.075, "visible": false }, "speed_print": { "default": 60.0, "visible": true }, "speed_infill": { "default": 100.0, "visible": true }, "speed_topbottom": { "default": 15.0, "visible": true }, diff --git a/resources/machines/RigidBotBig.json b/resources/machines/RigidBotBig.json index 2f6afc104d..0f8fdb1481 100644 --- a/resources/machines/RigidBotBig.json +++ b/resources/machines/RigidBotBig.json @@ -40,9 +40,6 @@ "material_print_temperature": { "default": 195, "visible": true }, "material_bed_temperature": { "default": 60, "visible": true }, "material_diameter": { "default": 1.75, "visible": true }, - "retraction_enable": { "default": true, "always_visible": true}, - "retraction_speed": { "default": 50.0, "visible": false }, - "retraction_hop": { "default": 0.075, "visible": false }, "speed_print": { "default": 60.0, "visible": true}, "speed_infill": { "default": 100.0, "visible": true }, "speed_topbottom": { "default": 15.0, "visible": true }, diff --git a/resources/machines/bq_hephestos.json b/resources/machines/bq_hephestos.json index de33e792e5..e3aa354b75 100644 --- a/resources/machines/bq_hephestos.json +++ b/resources/machines/bq_hephestos.json @@ -50,8 +50,6 @@ "speed_topbottom": { "default": 35.0, "visible": true }, "speed_travel": { "default": 120.0 }, "speed_layer_0": { "default": 20.0, "visible": false }, - "retraction_speed": { "default": 30.0, "visible": false}, - "retraction_hop": { "default": 0.075, "visible": false }, "support_enable": { "default": true } } } diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json index ae4eee9c0d..8b1ed34caa 100644 --- a/resources/machines/bq_hephestos_2.json +++ b/resources/machines/bq_hephestos_2.json @@ -54,7 +54,6 @@ "speed_infill": { "default": 80.0, "visible": true }, "speed_topbottom": { "default": 35.0, "visible": false }, "skirt_speed": { "default": 35.0, "visible": false }, - "retraction_speed": { "default": 45.0, "visible": false }, "skirt_line_count": { "default": 4 }, "skirt_minimal_length": { "default": 30.0, "visible": false }, "skirt_gap": { "default": 6.0 }, diff --git a/resources/machines/bq_hephestos_xl.json b/resources/machines/bq_hephestos_xl.json index 056b0881c2..5ce1dc3a7f 100644 --- a/resources/machines/bq_hephestos_xl.json +++ b/resources/machines/bq_hephestos_xl.json @@ -50,8 +50,6 @@ "speed_topbottom": { "default": 35.0, "visible": true }, "speed_travel": { "default": 120.0 }, "speed_layer_0": { "default": 20.0, "visible": false }, - "retraction_speed": { "default": 30.0, "visible": false}, - "retraction_hop": { "default": 0.075, "visible": false }, "support_enable": { "default": true } } } diff --git a/resources/machines/bq_witbox.json b/resources/machines/bq_witbox.json index af41ae66ea..83ac707ff6 100644 --- a/resources/machines/bq_witbox.json +++ b/resources/machines/bq_witbox.json @@ -50,8 +50,6 @@ "speed_topbottom": { "default": 35.0, "visible": true }, "speed_travel": { "default": 120.0 }, "speed_layer_0": { "default": 20.0, "visible": false }, - "retraction_speed": { "default": 30.0, "visible": false}, - "retraction_hop": { "default": 0.075, "visible": false }, "support_enable": { "default": true } } } diff --git a/resources/machines/bq_witbox_2.json b/resources/machines/bq_witbox_2.json index 5377d594b5..61ce18a161 100644 --- a/resources/machines/bq_witbox_2.json +++ b/resources/machines/bq_witbox_2.json @@ -54,7 +54,6 @@ "speed_infill": { "default": 80.0, "visible": true }, "speed_topbottom": { "default": 35.0, "visible": false }, "skirt_speed": { "default": 35.0, "visible": false }, - "retraction_speed": { "default": 45.0, "visible": false }, "skirt_line_count": { "default": 4 }, "skirt_minimal_length": { "default": 30.0, "visible": false }, "skirt_gap": { "default": 6.0 }, diff --git a/resources/machines/innovo-inventor.json b/resources/machines/innovo-inventor.json index df5a0ccb66..a37143a8d7 100644 --- a/resources/machines/innovo-inventor.json +++ b/resources/machines/innovo-inventor.json @@ -34,9 +34,6 @@ "material_print_temperature": { "default": 215, "visible": true}, "material_bed_temperature": { "default": 60, "visible": true}, "material_diameter": { "default": 1.75, "visible": true}, - "retraction_enable": { "default": true, "always_visible": true}, - "retraction_speed": { "default": 50.0, "visible": false }, - "retraction_hop": { "default": 0.075, "visible": false }, "speed_print": { "default": 60.0, "visible": true}, "speed_infill": { "default": 100.0, "visible": true }, "speed_topbottom": { "default": 30.0, "visible": true }, diff --git a/resources/machines/maker_starter.json b/resources/machines/maker_starter.json index fa0613ac1b..1d6dfa6a18 100644 --- a/resources/machines/maker_starter.json +++ b/resources/machines/maker_starter.json @@ -41,7 +41,6 @@ "material_bed_temperature": { "visible": false }, "material_diameter": { "default": 1.75, "visible": false }, "material_flow": { "visible": false }, - "retraction_hop": { "default": 0.2 }, "speed_print": { "default": 50.0 }, "speed_wall": { "default": 30.0 }, "speed_wall_0": { "default": 30.0 }, From 27aef006a88c58a9a7414b5965362c9ccaa41791 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Apr 2016 16:21:27 +0200 Subject: [PATCH 080/424] Remove retraction settings from ulti-profile Paul agreed, this should not be dependent on the quality. It was meant to allow a bit slower prints due to the time it takes to do a retraction, but that is not the bottleneck here. Material hardness is the bottleneck. Grinding is. Contributes to issue CURA-346. --- resources/profiles/ultimaker2+/pla_0.4_ulti.curaprofile | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/profiles/ultimaker2+/pla_0.4_ulti.curaprofile b/resources/profiles/ultimaker2+/pla_0.4_ulti.curaprofile index 5cb807de01..db091d8e8d 100644 --- a/resources/profiles/ultimaker2+/pla_0.4_ulti.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.4_ulti.curaprofile @@ -13,8 +13,6 @@ layer_height_0 = 0.26 wall_thickness = 1.4 top_bottom_thickness = 1.12 infill_sparse_density = 25 -retraction_amount = 5.5 -retraction_extrusion_window = 6 speed_print = 30 speed_infill = 50 speed_wall_x = 40 From a2ff775c084c9145a6e09c24daf307d4c96bc3a5 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 26 Apr 2016 11:19:56 +0200 Subject: [PATCH 081/424] Limit the max_value for extruders to the number of extruders CuraEngine would crash if instructed to use an extruder that it knows nothing about. Extruders start counting at 0, so max_value is set to machine_extruder_count - 1. Fixes the crash outlined in CURA-965 --- resources/machines/dual_extrusion_printer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json index bdf8f9d34d..2977345bcb 100644 --- a/resources/machines/dual_extrusion_printer.json +++ b/resources/machines/dual_extrusion_printer.json @@ -79,7 +79,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "always_visible": true }, "adhesion_extruder_nr": { @@ -88,7 +88,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "global_only": true }, "support_extruder_nr": { @@ -97,7 +97,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "global_only": true, "children": { "support_infill_extruder_nr": { @@ -106,7 +106,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "global_only": true }, "support_extruder_nr_layer_0": { @@ -115,7 +115,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "global_only": true }, "support_roof_extruder_nr": { @@ -124,7 +124,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "enabled": "support_roof_enable", "global_only": true } From 4d11bdd366fe2dc56ac078df60fce0aa22ffcc79 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 26 Apr 2016 12:09:11 +0200 Subject: [PATCH 082/424] Changed height CURA-1429 --- resources/machines/ultimaker2_extended_plus.json | 2 +- resources/machines/ultimaker2plus.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/machines/ultimaker2_extended_plus.json b/resources/machines/ultimaker2_extended_plus.json index 318361a894..34a1f894bb 100644 --- a/resources/machines/ultimaker2_extended_plus.json +++ b/resources/machines/ultimaker2_extended_plus.json @@ -11,7 +11,7 @@ "inherits": "ultimaker2plus.json", "machine_settings": { - "machine_height": { "default": 313 }, + "machine_height": { "default": 305}, "machine_show_variants": { "default": true }, "machine_nozzle_head_distance": { "default": 5 }, "machine_nozzle_expansion_angle": { "default": 45 } diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index 0a344d4aa6..ce9ea57f26 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -18,7 +18,6 @@ "line_width": { "inherit_function": "round(machine_nozzle_size * 0.875, 2)" }, "speed_layer_0": { "default": "20" }, "speed_support": { "inherit_function": "speed_wall_0" }, - "machine_height": { "default": 203 }, "machine_show_variants": { "default": true }, "gantry_height": { "default": 52 }, "machine_nozzle_head_distance": { "default": 5 }, From dff976f1975b066a6fa39aa25b37210258c3f664 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Tue, 26 Apr 2016 15:20:29 +0200 Subject: [PATCH 083/424] Minor code style fix. Contributes to CURA-1434 --- plugins/CuraEngineBackend/StartSliceJob.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index f4f096f54c..597a7c7da4 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -29,13 +29,13 @@ class GcodeStartEndFormatter(Formatter): ## Job class that builds up the message of scene data to send to CuraEngine. class StartSliceJob(Job): - def __init__(self, profile, sliceMessage, settingsMessage): + def __init__(self, profile, slice_message, settings_message): super().__init__() self._scene = Application.getInstance().getController().getScene() self._profile = profile - self._slice_message = sliceMessage - self._settings_message = settingsMessage + self._slice_message = slice_message + self._settings_message = settings_message self._is_cancelled = False def getSettingsMessage(self): From 75f4a91800542897a223e4b548fd7de539689ba1 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 26 Apr 2016 17:18:40 +0200 Subject: [PATCH 084/424] Tweak button icon size to make the icons look a bit less "chunky" --- resources/themes/cura/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index df678e83c9..67df41ef7c 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -189,7 +189,7 @@ "standard_arrow": [0.8, 0.8], "button": [4, 4], - "button_icon": [3, 3], + "button_icon": [2.5, 2.5], "button_lining": [0, 0], "button_tooltip": [1.0, 1.3], From 3c7ff49be304e33792c2a5b9569e744f3cb02650 Mon Sep 17 00:00:00 2001 From: zerr0 Date: Wed, 27 Apr 2016 13:19:36 +0500 Subject: [PATCH 085/424] Uniqbot by Unimatech machine profile --- resources/machines/uniqbot_one.json | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 resources/machines/uniqbot_one.json diff --git a/resources/machines/uniqbot_one.json b/resources/machines/uniqbot_one.json new file mode 100644 index 0000000000..8f38039a19 --- /dev/null +++ b/resources/machines/uniqbot_one.json @@ -0,0 +1,35 @@ +{ + "id": "uniqbot_one", + "version": 1, + "name": "Uniqbot", + "manufacturer": "Unimatech", + "author": "Unimatech", + "icon": "icon_ultimaker2.png", + "file_formats": "text/x-gcode", + "inherits": "fdmprinter.json", + + "overrides": { + "machine_heated_bed": { "default": false }, + "machine_width": { "default": 140 }, + "machine_height": { "default": 120 }, + "machine_depth": { "default": 160 }, + "machine_center_is_zero": { "default": false }, + "machine_nozzle_size": { "default": 0.5 }, + "material_diameter": { "default": 1.75 }, + "machine_nozzle_heat_up_speed": { "default": 2.0 }, + "machine_nozzle_cool_down_speed": { "default": 2.0 }, + "machine_head_shape_min_x": { "default": 75 }, + "machine_head_shape_min_y": { "default": 18 }, + "machine_head_shape_max_x": { "default": 18 }, + "machine_head_shape_max_y": { "default": 35 }, + "machine_nozzle_gantry_distance": { "default": 55 }, + "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, + + "machine_start_gcode": { + "default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + }, + "machine_end_gcode": { + "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + } + } +} From 6907c8921e02c7dd44ffda90c23c077d0c4af3c0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 27 Apr 2016 10:20:11 +0200 Subject: [PATCH 086/424] Add (non-functional) extruder selection dropdown to simplemode for multi-extrusion printers CURA-790 --- resources/qml/SidebarSimple.qml | 72 ++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index c3d2db9f3d..db965d3aab 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -269,9 +269,79 @@ Item } } + function populateExtruderModel() + { + extruderModel.clear() + var extruder_count = UM.MachineManager.getSettingValue("machine_extruder_count"); + for(var extruder = 0; extruder < extruder_count ; extruder++) { + extruderModel.append({ + name: catalog.i18nc("@label", "Extruder %1").arg(extruder), + text: catalog.i18nc("@label", "Extruder %1").arg(extruder), + value: extruder + }) + } + } + + Rectangle { + id: multiExtrusionCell + anchors.top: helpersCellRight.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.left: parent.left + width: parent.width + height: childrenRect.height + // Use both UM.ActiveProfile and UM.MachineManager to force UM.MachineManager.getSettingValue() to be reevaluated + visible: UM.ActiveProfile.settingValues.getValue("machine_extruder_count") || (UM.MachineManager.getSettingValue("machine_extruder_count") > 1) + + Label { + id: mainExtruderLabel + text: catalog.i18nc("@label:listbox","Print object with:") + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + width: base.width/100* 35 - 2*UM.Theme.getSize("default_margin").width + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.verticalCenter: mainExtruderCombobox.verticalCenter + } + ComboBox { + id: mainExtruderCombobox + model: extruderModel + anchors.top: parent.top + anchors.left: supportExtruderLabel.right + } + + Label { + id: supportExtruderLabel + text: catalog.i18nc("@label:listbox","Print support with:") + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + width: base.width/100* 35 - 2*UM.Theme.getSize("default_margin").width + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.verticalCenter: supportExtruderCombobox.verticalCenter + } + ComboBox { + id: supportExtruderCombobox + model: extruderModel + anchors.top: mainExtruderCombobox.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.left: supportExtruderLabel.right + } + + ListModel { + id: extruderModel + Component.onCompleted: populateExtruderModel() + } + Connections + { + id: machineChange + target: UM.MachineManager + onActiveMachineInstanceChanged: populateExtruderModel() + } + } + Rectangle { id: tipsCell - anchors.top: helpersCellRight.bottom + anchors.top: multiExtrusionCell.visible? multiExtrusionCell.bottom : helpersCellRight.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left width: parent.width From 4a2b1af9f5b5bc0b0b98f258082c3b713a433f6b Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 27 Apr 2016 10:28:58 +0200 Subject: [PATCH 087/424] Add reusable style for comboboxes to the theme CURA-790 --- resources/qml/SidebarSimple.qml | 2 ++ resources/themes/cura/styles.qml | 46 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index db965d3aab..620b8e29ca 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -307,6 +307,7 @@ Item model: extruderModel anchors.top: parent.top anchors.left: supportExtruderLabel.right + style: UM.Theme.styles.combobox } Label { @@ -325,6 +326,7 @@ Item anchors.top: mainExtruderCombobox.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: supportExtruderLabel.right + style: UM.Theme.styles.combobox } ListModel { diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 5c88645330..e536c38ba7 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -309,6 +309,52 @@ QtObject { unitFont: Theme.getFont("default"); } + property Component combobox: Component { + ComboBoxStyle { + background: Rectangle { + implicitHeight: UM.Theme.getSize("setting_control").height; + implicitWidth: UM.Theme.getSize("setting_control").width; + + color: control.hovered ? Theme.getColor("setting_control_highlight") : Theme.getColor("setting_control"); + Behavior on color { ColorAnimation { duration: 50; } } + + border.width: Theme.getSize("default_lining").width; + border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border"); + } + label: Item { + Label { + anchors.left: parent.left; + anchors.leftMargin: Theme.getSize("default_lining").width + anchors.right: downArrow.left; + anchors.rightMargin: Theme.getSize("default_lining").width; + anchors.verticalCenter: parent.verticalCenter; + + text: control.currentText; + font: UM.Theme.getFont("default"); + color: !enabled ? Theme.getColor("setting_control_disabled_text") : Theme.getColor("setting_control_text"); + + elide: Text.ElideRight; + verticalAlignment: Text.AlignVCenter; + } + + UM.RecolorImage { + id: downArrow + anchors.right: parent.right; + anchors.rightMargin: Theme.getSize("default_lining").width * 2; + anchors.verticalCenter: parent.verticalCenter; + + source: UM.Theme.getIcon("arrow_bottom") + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + 5 + sourceSize.height: width + 5 + + color: Theme.getColor("setting_control_text"); + } + } + } + } + property Component checkbox: Component { CheckBoxStyle { background: Item { } From d34c28543b6539e2d799482933b99b3982f21686 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 27 Apr 2016 11:49:25 +0200 Subject: [PATCH 088/424] Connect extruder comboboxes with their settings CURA-790 --- resources/qml/SidebarSimple.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 620b8e29ca..9387872276 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -308,6 +308,10 @@ Item anchors.top: parent.top anchors.left: supportExtruderLabel.right style: UM.Theme.styles.combobox + currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("extruder_nr") : 0 + onActivated: { + UM.MachineManager.setSettingValue("extruder_nr", index) + } } Label { @@ -327,6 +331,10 @@ Item anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: supportExtruderLabel.right style: UM.Theme.styles.combobox + currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_extruder_nr") : 0 + onActivated: { + UM.MachineManager.setSettingValue("support_extruder_nr", index) + } } ListModel { From d7aa8e71bf1711fc9d4237d7b55b6a229aa2e779 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 27 Apr 2016 20:29:21 +0200 Subject: [PATCH 089/424] Rearrange nozzle/material selection into one line In preparation for CURA-330, where we will need multiple instances of the nozzle/material combo. --- resources/qml/SidebarHeader.qml | 166 +++++++++++++++----------------- 1 file changed, 78 insertions(+), 88 deletions(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index adc29a3daf..b5fcc880f6 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -97,127 +97,117 @@ Item Rectangle { id: variantRow anchors.top: machineSelectionRow.bottom - anchors.topMargin: UM.MachineManager.hasVariants ? UM.Theme.getSize("default_margin").height : 0 + anchors.topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 width: base.width - height: UM.MachineManager.hasVariants ? UM.Theme.getSize("sidebar_setup").height : 0 - visible: UM.MachineManager.hasVariants + height: visible ? UM.Theme.getSize("sidebar_setup").height : 0 + visible: UM.MachineManager.hasVariants || UM.MachineManager.hasMaterials Label{ id: variantLabel - text: catalog.i18nc("@label","Nozzle:"); + text: (UM.MachineManager.hasVariants && UM.MachineManager.hasMaterials) ? catalog.i18nc("@label","Nozzle & Material:"): + UM.MachineManager.hasVariants ? catalog.i18nc("@label","Nozzle:") : catalog.i18nc("@label","Material:"); anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width; + anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter width: parent.width/100*45 font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); } - ToolButton { - id: variantSelection - text: UM.MachineManager.activeMachineVariant - width: parent.width/100*55 - height: UM.Theme.getSize("setting_control").height - tooltip: UM.MachineManager.activeMachineVariant; + Rectangle { anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter - style: UM.Theme.styles.sidebar_header_button - menu: Menu - { - id: variantsSelectionMenu - Instantiator + width: parent.width/100*55 + height: UM.Theme.getSize("setting_control").height + + ToolButton { + id: variantSelection + text: UM.MachineManager.activeMachineVariant + tooltip: UM.MachineManager.activeMachineVariant; + visible: UM.MachineManager.hasVariants + + height: UM.Theme.getSize("setting_control").height + width: materialSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width + anchors.left: parent.left + style: UM.Theme.styles.sidebar_header_button + + menu: Menu { - id: variantSelectionInstantiator - model: UM.MachineVariantsModel { id: variantsModel } - MenuItem + id: variantsSelectionMenu + Instantiator { - text: model.name; - checkable: true; - checked: model.active; - exclusiveGroup: variantSelectionMenuGroup; - onTriggered: + id: variantSelectionInstantiator + model: UM.MachineVariantsModel { id: variantsModel } + MenuItem { - UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name); - if (typeof(model) !== "undefined" && !model.active) { - //Selecting a variant was canceled; undo menu selection - variantSelectionInstantiator.model.setProperty(index, "active", false); - var activeMachineVariantName = UM.MachineManager.activeMachineVariant; - var activeMachineVariantIndex = variantSelectionInstantiator.model.find("name", activeMachineVariantName); - variantSelectionInstantiator.model.setProperty(activeMachineVariantIndex, "active", true); + text: model.name; + checkable: true; + checked: model.active; + exclusiveGroup: variantSelectionMenuGroup; + onTriggered: + { + UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name); + if (typeof(model) !== "undefined" && !model.active) { + //Selecting a variant was canceled; undo menu selection + variantSelectionInstantiator.model.setProperty(index, "active", false); + var activeMachineVariantName = UM.MachineManager.activeMachineVariant; + var activeMachineVariantIndex = variantSelectionInstantiator.model.find("name", activeMachineVariantName); + variantSelectionInstantiator.model.setProperty(activeMachineVariantIndex, "active", true); + } } } + onObjectAdded: variantsSelectionMenu.insertItem(index, object) + onObjectRemoved: variantsSelectionMenu.removeItem(object) } - onObjectAdded: variantsSelectionMenu.insertItem(index, object) - onObjectRemoved: variantsSelectionMenu.removeItem(object) - } - ExclusiveGroup { id: variantSelectionMenuGroup; } + ExclusiveGroup { id: variantSelectionMenuGroup; } + } } - } - } - Rectangle { - id: materialSelectionRow - anchors.top: variantRow.bottom - anchors.topMargin: UM.MachineManager.hasMaterials ? UM.Theme.getSize("default_margin").height : 0 - width: base.width - height: UM.MachineManager.hasMaterials ? UM.Theme.getSize("sidebar_setup").height : 0 - visible: UM.MachineManager.hasMaterials + ToolButton { + id: materialSelection + text: UM.MachineManager.activeMaterial + tooltip: UM.MachineManager.activeMaterial + visible: UM.MachineManager.hasMaterials - Label{ - id: materialSelectionLabel - text: catalog.i18nc("@label","Material:"); - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width; - anchors.verticalCenter: parent.verticalCenter - width: parent.width/100*45 - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); - } + height: UM.Theme.getSize("setting_control").height + width: variantSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width + anchors.right: parent.right + style: UM.Theme.styles.sidebar_header_button - ToolButton { - id: materialSelection - text: UM.MachineManager.activeMaterial - width: parent.width/100*55 - height: UM.Theme.getSize("setting_control").height - tooltip: UM.MachineManager.activeMaterial; - anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: parent.verticalCenter - style: UM.Theme.styles.sidebar_header_button - - menu: Menu - { - id: materialSelectionMenu - Instantiator + menu: Menu { - id: materialSelectionInstantiator - model: UM.MachineMaterialsModel { id: machineMaterialsModel } - MenuItem + id: materialSelectionMenu + Instantiator { - text: model.name; - checkable: true; - checked: model.active; - exclusiveGroup: materialSelectionMenuGroup; - onTriggered: + id: materialSelectionInstantiator + model: UM.MachineMaterialsModel { id: machineMaterialsModel } + MenuItem { - UM.MachineManager.setActiveMaterial(machineMaterialsModel.getItem(index).name); - if (typeof(model) !== "undefined" && !model.active) { - //Selecting a material was canceled; undo menu selection - materialSelectionInstantiator.model.setProperty(index, "active", false); - var activeMaterialName = UM.MachineManager.activeMaterial; - var activeMaterialIndex = materialSelectionInstantiator.model.find("name", activeMaterialName); - materialSelectionInstantiator.model.setProperty(activeMaterialIndex, "active", true); + text: model.name; + checkable: true; + checked: model.active; + exclusiveGroup: materialSelectionMenuGroup; + onTriggered: + { + UM.MachineManager.setActiveMaterial(machineMaterialsModel.getItem(index).name); + if (typeof(model) !== "undefined" && !model.active) { + //Selecting a material was canceled; undo menu selection + materialSelectionInstantiator.model.setProperty(index, "active", false); + var activeMaterialName = UM.MachineManager.activeMaterial; + var activeMaterialIndex = materialSelectionInstantiator.model.find("name", activeMaterialName); + materialSelectionInstantiator.model.setProperty(activeMaterialIndex, "active", true); + } } } + onObjectAdded: materialSelectionMenu.insertItem(index, object) + onObjectRemoved: materialSelectionMenu.removeItem(object) } - onObjectAdded: materialSelectionMenu.insertItem(index, object) - onObjectRemoved: materialSelectionMenu.removeItem(object) - } - ExclusiveGroup { id: materialSelectionMenuGroup; } + ExclusiveGroup { id: materialSelectionMenuGroup; } + } } } } From f6ce963b7385fef18fb0a33c849349e6b0fa3df0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 28 Apr 2016 10:29:51 +0200 Subject: [PATCH 090/424] Add "Update Current Profile" and "Reset Current Profile" menu items to profile dropdowns CURA-970 --- resources/qml/Actions.qml | 20 ++++++++++++++++++-- resources/qml/Cura.qml | 11 +++++++++-- resources/qml/ProfileSetup.qml | 11 ++++++++++- resources/qml/Sidebar.qml | 6 +++++- 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index c363dd4a55..34cf0ad7a7 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -21,7 +21,7 @@ Item property alias unGroupObjects:unGroupObjectsAction; property alias mergeObjects: mergeObjectsAction; //property alias unMergeObjects: unMergeObjectsAction; - + property alias multiplyObject: multiplyObjectAction; property alias deleteAll: deleteAllAction; @@ -32,6 +32,8 @@ Item property alias addMachine: addMachineAction; property alias configureMachines: settingsAction; property alias addProfile: addProfileAction; + property alias updateProfile: updateProfileAction; + property alias resetProfile: resetProfileAction; property alias manageProfiles: manageProfilesAction; property alias preferences: preferencesAction; @@ -96,11 +98,25 @@ Item iconName: "configure"; } + Action + { + id: updateProfileAction; + enabled: UM.ActiveProfile.valid && !UM.ActiveProfile.readOnly && UM.ActiveProfile.hasCustomisedValues + text: catalog.i18nc("@action:inmenu menubar:profile","&Update Current Profile"); + } + + Action + { + id: resetProfileAction; + enabled: UM.ActiveProfile.valid && !UM.ActiveProfile.readOnly && UM.ActiveProfile.hasCustomisedValues + text: catalog.i18nc("@action:inmenu menubar:profile","&Reset Current Profile"); + } + Action { id: addProfileAction; enabled: UM.ActiveProfile.valid - text: catalog.i18nc("@action:inmenu menubar:profile","&Add Profile..."); + text: catalog.i18nc("@action:inmenu menubar:profile","&Create New Profile..."); } Action diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 776e83cb60..7a8d131239 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -229,7 +229,7 @@ UM.MainWindow //Insert a separator between readonly and custom profiles if(separatorIndex < 0 && index > 0) { if(model.getItem(index-1).readOnly != model.getItem(index).readOnly) { - profileMenu.addSeparator(); + profileMenu.insertSeparator(index); separatorIndex = index; } } @@ -277,7 +277,10 @@ UM.MainWindow MenuSeparator { id: profileMenuSeparator } + MenuItem { action: actions.updateProfile; } + MenuItem { action: actions.resetProfile; } MenuItem { action: actions.addProfile; } + MenuSeparator { } MenuItem { action: actions.manageProfiles; } } @@ -287,7 +290,7 @@ UM.MainWindow //: Extensions menu title: catalog.i18nc("@title:menu menubar:toplevel","E&xtensions"); - Instantiator + Instantiator { model: UM.Models.extensionModel @@ -513,6 +516,8 @@ UM.MainWindow addMachineAction: actions.addMachine; configureMachinesAction: actions.configureMachines; addProfileAction: actions.addProfile; + updateProfileAction: actions.updateProfile; + resetProfileAction: actions.resetProfile; manageProfilesAction: actions.manageProfiles; configureSettingsAction: Action @@ -623,6 +628,8 @@ UM.MainWindow addMachine.onTriggered: addMachineWizard.visible = true; addProfile.onTriggered: { UM.MachineManager.createProfile(); preferences.visible = true; preferences.setPage(4); } + updateProfile.onTriggered: { UM.ActiveProfile.updateProfile() } + resetProfile.onTriggered: { UM.ActiveProfile.discardChanges() } preferences.onTriggered: { preferences.visible = true; } configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(3); } diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index 1e6c3f9996..d6ff042a44 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -14,6 +14,8 @@ Item{ property int totalHeightProfileSetup: childrenRect.height property Action manageProfilesAction property Action addProfileAction + property Action updateProfileAction + property Action resetProfileAction signal showTooltip(Item item, point location, string text) signal hideTooltip() @@ -67,7 +69,7 @@ Item{ //Insert a separator between readonly and custom profiles if(separatorIndex < 0 && index > 0) { if(model.getItem(index-1).readOnly != model.getItem(index).readOnly) { - profileSelectionMenu.addSeparator(); + profileSelectionMenu.insertSeparator(index); separatorIndex = index; } } @@ -113,9 +115,16 @@ Item{ } MenuSeparator { } + MenuItem { + action: base.updateProfileAction; + } + MenuItem { + action: base.resetProfileAction; + } MenuItem { action: base.addProfileAction; } + MenuSeparator { } MenuItem { action: base.manageProfilesAction; } diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index f7292cf190..5426125194 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -15,6 +15,8 @@ Rectangle property Action addMachineAction; property Action configureMachinesAction; property Action addProfileAction; + property Action updateProfileAction; + property Action resetProfileAction; property Action manageProfilesAction; property Action configureSettingsAction; property int currentModeIndex; @@ -60,12 +62,14 @@ Rectangle height: UM.Theme.getSize("sidebar_lining").height color: UM.Theme.getColor("sidebar_lining") anchors.top: header.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.topMargin: UM.Theme.getSize("default_margin").height } ProfileSetup { id: profileItem addProfileAction: base.addProfileAction + updateProfileAction: base.updateProfileAction + resetProfileAction: base.resetProfileAction manageProfilesAction: base.manageProfilesAction anchors.top: settingsModeSelection.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height From adb2c4c72e1d71c1f42a4ffecedc44ab21b5eba7 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 28 Apr 2016 10:38:29 +0200 Subject: [PATCH 091/424] Make "Reset Current Profile" enabled for readonly profiles CURA-970 --- resources/qml/Actions.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 34cf0ad7a7..c4ce4c9ae4 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -108,7 +108,7 @@ Item Action { id: resetProfileAction; - enabled: UM.ActiveProfile.valid && !UM.ActiveProfile.readOnly && UM.ActiveProfile.hasCustomisedValues + enabled: UM.ActiveProfile.valid && UM.ActiveProfile.hasCustomisedValues text: catalog.i18nc("@action:inmenu menubar:profile","&Reset Current Profile"); } From bc350cfe281d1b220cd2be3ed62d415b9d65a0f2 Mon Sep 17 00:00:00 2001 From: zerr0 Date: Thu, 28 Apr 2016 14:16:37 +0500 Subject: [PATCH 092/424] machine_head_shape_* removed --- resources/machines/uniqbot_one.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/resources/machines/uniqbot_one.json b/resources/machines/uniqbot_one.json index 8f38039a19..f07dae9b24 100644 --- a/resources/machines/uniqbot_one.json +++ b/resources/machines/uniqbot_one.json @@ -18,10 +18,6 @@ "material_diameter": { "default": 1.75 }, "machine_nozzle_heat_up_speed": { "default": 2.0 }, "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_head_shape_min_x": { "default": 75 }, - "machine_head_shape_min_y": { "default": 18 }, - "machine_head_shape_max_x": { "default": 18 }, - "machine_head_shape_max_y": { "default": 35 }, "machine_nozzle_gantry_distance": { "default": 55 }, "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, From a176c6a977d099e9e92034008e7a522c5a465cc4 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 28 Apr 2016 12:30:03 +0200 Subject: [PATCH 093/424] JSON: fix for support roof vs infill speed visiblity --- resources/machines/fdmprinter.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index f0be309eaa..2751c69db2 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -912,7 +912,7 @@ "default": 60, "visible": false, "inherit_function": "speed_print", - "enabled": "support_enable", + "enabled": "support_roof_enable", "children": { "speed_support_infill": { "label": "Support Infill Speed", @@ -925,7 +925,7 @@ "max_value_warning": "150", "visible": false, "inherit": true, - "enabled": "support_roof_enable", + "enabled": "support_enable", "global_only": true }, "speed_support_roof": { From c810c22eb5687308145b1617b0d75e83cb9bab38 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Thu, 28 Apr 2016 13:05:59 +0200 Subject: [PATCH 094/424] Set the default number of layers and current layer to 0. Now the layer view slider is empty while the initial slicing process is running. Fixes CURA-1273 Layer number doesn't fit --- plugins/LayerView/LayerView.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/LayerView/LayerView.py b/plugins/LayerView/LayerView.py index 97a2a0ab30..a98fab5c8a 100644 --- a/plugins/LayerView/LayerView.py +++ b/plugins/LayerView/LayerView.py @@ -34,8 +34,8 @@ class LayerView(View): self._layer_percentage = 0 # what percentage of layers need to be shown (SLider gives value between 0 - 100) self._proxy = LayerViewProxy.LayerViewProxy() self._controller.getScene().getRoot().childrenChanged.connect(self._onSceneChanged) - self._max_layers = 10 - self._current_layer_num = 10 + self._max_layers = 0 + self._current_layer_num = 0 self._current_layer_mesh = None self._current_layer_jumps = None self._top_layers_job = None From 4939b935d213bfc9464233c290c61914735d0766 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 28 Apr 2016 14:36:29 +0200 Subject: [PATCH 095/424] Show profile name dialog after creating a profile CURA-970 --- resources/qml/Cura.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 7a8d131239..cfce4a5297 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -627,7 +627,7 @@ UM.MainWindow reloadAll.onTriggered: Printer.reloadAll() addMachine.onTriggered: addMachineWizard.visible = true; - addProfile.onTriggered: { UM.MachineManager.createProfile(); preferences.visible = true; preferences.setPage(4); } + addProfile.onTriggered: { UM.MachineManager.createProfile(); preferences.setPage(4); preferences.visible = true; preferences.show(); preferences.getCurrentItem().showProfileNameDialog() } updateProfile.onTriggered: { UM.ActiveProfile.updateProfile() } resetProfile.onTriggered: { UM.ActiveProfile.discardChanges() } From 4e722d61ce35c6e48b76aa41db824df4c24bf886 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 28 Apr 2016 15:28:50 +0200 Subject: [PATCH 096/424] Removed unused code --- cura/ConvexHullNode.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/cura/ConvexHullNode.py b/cura/ConvexHullNode.py index 46c64b7590..905aeb16d4 100644 --- a/cura/ConvexHullNode.py +++ b/cura/ConvexHullNode.py @@ -23,9 +23,6 @@ class ConvexHullNode(SceneNode): self._original_parent = parent - self._inherit_orientation = False - self._inherit_scale = False - # Color of the drawn convex hull self._color = Color(35, 35, 35, 128) From efd14421cc4cf72ac7ac453b257fc794851c768f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 28 Apr 2016 15:56:25 +0200 Subject: [PATCH 097/424] Codestyle & Documentation CURA 537 --- plugins/CuraEngineBackend/ProcessSlicedLayersJob.py | 10 +++++----- plugins/CuraEngineBackend/StartSliceJob.py | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py index 96a477031e..6a947866d3 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py @@ -19,6 +19,7 @@ import numpy catalog = i18nCatalog("cura") + class ProcessSlicedLayersJob(Job): def __init__(self, layers): super().__init__() @@ -48,7 +49,6 @@ class ProcessSlicedLayersJob(Job): Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged) - object_id_map = {} new_node = SceneNode() ## Remove old layer data (if any) @@ -88,8 +88,8 @@ class ProcessSlicedLayersJob(Job): for p in range(layer.repeatedMessageCount("polygons")): polygon = layer.getRepeatedMessage("polygons", p) - points = numpy.fromstring(polygon.points, dtype="i8") # Convert bytearray to numpy array - points = points.reshape((-1,2)) # We get a linear list of pairs that make up the points, so make numpy interpret them correctly. + points = numpy.fromstring(polygon.points, dtype="i8") # Convert bytearray to numpy array + points = points.reshape((-1,2)) # We get a linear list of pairs that make up the points, so make numpy interpret them correctly. # Create a new 3D-array, copy the 2D points over and insert the right height. # This uses manual array creation + copy rather than numpy.insert since this is @@ -124,13 +124,13 @@ class ProcessSlicedLayersJob(Job): self._progress.hide() return - #Add layerdata decorator to scene node to indicate that the node has layerdata + # Add LayerDataDecorator to scene node to indicate that the node has layer data decorator = LayerDataDecorator.LayerDataDecorator() decorator.setLayerData(layer_data) new_node.addDecorator(decorator) new_node.setMeshData(mesh) - new_node.setParent(self._scene.getRoot()) #Note: After this we can no longer abort! + new_node.setParent(self._scene.getRoot()) # Note: After this we can no longer abort! if not settings.getSettingValue("machine_center_is_zero"): new_node.setPosition(Vector(-settings.getSettingValue("machine_width") / 2, 0.0, settings.getSettingValue("machine_depth") / 2)) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index ccd5d32eb3..f51cff5d93 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -14,9 +14,10 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from cura.OneAtATimeIterator import OneAtATimeIterator + ## Formatter class that handles token expansion in start/end gcod class GcodeStartEndFormatter(Formatter): - def get_value(self, key, args, kwargs): # [CodeStyle: get_value is an overridden function from the Formatter class] + def get_value(self, key, args, kwargs): # [CodeStyle: get_value is an overridden function from the Formatter class] if isinstance(key, str): try: return kwargs[key] @@ -27,7 +28,8 @@ class GcodeStartEndFormatter(Formatter): Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end gcode", key) return "{" + str(key) + "}" -## Job class that handles sending the current scene data to CuraEngine + +## Job that handles sending the current scene data to CuraEngine class StartSliceJob(Job): def __init__(self, profile, socket): super().__init__() @@ -49,6 +51,7 @@ class StartSliceJob(Job): for node in OneAtATimeIterator(self._scene.getRoot()): temp_list = [] + ## Node can't be printed, so don't bother sending it. if getattr(node, "_outside_buildarea", False): continue @@ -118,7 +121,7 @@ class StartSliceJob(Job): return str(value).encode("utf-8") def _sendSettings(self, profile): - msg = self._socket.createMessage("cura.proto.SettingList"); + msg = self._socket.createMessage("cura.proto.SettingList") settings = profile.getAllSettingValues(include_machine = True) start_gcode = settings["machine_start_gcode"] settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode From 9009fb9d3de9e0223d500702f603d2145e6b0f1f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 28 Apr 2016 16:01:54 +0200 Subject: [PATCH 098/424] Codestyle & documentation CURA-537 --- .../CuraProfileReader/CuraProfileReader.py | 10 ++++---- .../CuraProfileWriter/CuraProfileWriter.py | 3 ++- .../GCodeProfileReader/GCodeProfileReader.py | 22 ++++++++++------- plugins/GCodeWriter/GCodeWriter.py | 24 +++++++++++-------- 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py index e3001da6ae..1d27649498 100644 --- a/plugins/CuraProfileReader/CuraProfileReader.py +++ b/plugins/CuraProfileReader/CuraProfileReader.py @@ -6,13 +6,13 @@ from UM.Logger import Logger from UM.Settings.Profile import Profile from UM.Settings.ProfileReader import ProfileReader + ## A plugin that reads profile data from Cura profile files. # # It reads a profile from a .curaprofile file, and returns it as a profile # instance. class CuraProfileReader(ProfileReader): ## Initialises the cura profile reader. - # # This does nothing since the only other function is basically stateless. def __init__(self): super().__init__() @@ -24,10 +24,11 @@ class CuraProfileReader(ProfileReader): # not be read or didn't contain a valid profile, \code None \endcode is # returned. def read(self, file_name): - profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False) #Create an empty profile. + # Create an empty profile. + profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False) serialised = "" try: - with open(file_name) as f: #Open file for reading. + with open(file_name) as f: # Open file for reading. serialised = f.read() except IOError as e: Logger.log("e", "Unable to open file %s for reading: %s", file_name, str(e)) @@ -35,6 +36,7 @@ class CuraProfileReader(ProfileReader): try: profile.unserialise(serialised) - except Exception as e: #Parsing error. This is not a (valid) Cura profile then. + except Exception as e: # Parsing error. This is not a (valid) Cura profile then. + Logger.log("e", "Error while trying to parse profile: %s", str(e)) return None return profile \ No newline at end of file diff --git a/plugins/CuraProfileWriter/CuraProfileWriter.py b/plugins/CuraProfileWriter/CuraProfileWriter.py index 1ac206e54a..82df446b8a 100644 --- a/plugins/CuraProfileWriter/CuraProfileWriter.py +++ b/plugins/CuraProfileWriter/CuraProfileWriter.py @@ -6,6 +6,7 @@ from UM.Logger import Logger from UM.SaveFile import SaveFile from UM.Settings.ProfileWriter import ProfileWriter + ## Writes profiles to Cura's own profile format with config files. class CuraProfileWriter(ProfileWriter): ## Writes a profile to the specified file path. @@ -17,7 +18,7 @@ class CuraProfileWriter(ProfileWriter): def write(self, path, profile): serialised = profile.serialise() try: - with SaveFile(path, "wt", -1, "utf-8") as f: #Open the specified file. + with SaveFile(path, "wt", -1, "utf-8") as f: # Open the specified file. f.write(serialised) except Exception as e: Logger.log("e", "Failed to write profile to %s: %s", path, str(e)) diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py index 50048d831b..11cc249657 100644 --- a/plugins/GCodeProfileReader/GCodeProfileReader.py +++ b/plugins/GCodeProfileReader/GCodeProfileReader.py @@ -7,6 +7,7 @@ from UM.Settings.ProfileReader import ProfileReader from UM.Logger import Logger import re #Regular expressions for parsing escape characters in the settings. + ## A class that reads profile data from g-code files. # # It reads the profile data from g-code files and stores it in a new profile. @@ -47,29 +48,34 @@ class GCodeProfileReader(ProfileReader): prefix = ";SETTING_" + str(GCodeProfileReader.version) + " " prefix_length = len(prefix) - #Loading all settings from the file. They are all at the end, but Python has no reverse seek any more since Python3. TODO: Consider moving settings to the start? - serialised = "" #Will be filled with the serialised profile. + # Loading all settings from the file. + # They are all at the end, but Python has no reverse seek any more since Python3. + # TODO: Consider moving settings to the start? + serialised = "" # Will be filled with the serialised profile. try: with open(file_name) as f: for line in f: if line.startswith(prefix): - serialised += line[prefix_length : -1] #Remove the prefix and the newline from the line, and add it to the rest. + # Remove the prefix and the newline from the line and add it to the rest. + serialised += line[prefix_length : -1] except IOError as e: Logger.log("e", "Unable to open file %s for reading: %s", file_name, str(e)) return None - #Unescape the serialised profile. + # Un-escape the serialised profile. pattern = re.compile("|".join(GCodeProfileReader.escape_characters.keys())) - serialised = pattern.sub(lambda m: GCodeProfileReader.escape_characters[re.escape(m.group(0))], serialised) #Perform the replacement with a regular expression. - #Apply the changes to the current profile. + # Perform the replacement with a regular expression. + serialised = pattern.sub(lambda m: GCodeProfileReader.escape_characters[re.escape(m.group(0))], serialised) + + # Apply the changes to the current profile. profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False) try: profile.unserialise(serialised) - profile.setType(None) #Force type to none so it's correctly added. + profile.setType(None) # Force type to none so it's correctly added. profile.setReadOnly(False) profile.setDirty(True) - except Exception as e: #Not a valid g-code file. + except Exception as e: # Not a valid g-code file. Logger.log("e", "Unable to serialise the profile: %s", str(e)) return None return profile \ No newline at end of file diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index e481e4c187..ee766ef221 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -22,9 +22,9 @@ class GCodeWriter(MeshWriter): # Note that the keys of this dictionary are regex strings. The values are # not. escape_characters = { - re.escape("\\"): "\\\\", #The escape character. - re.escape("\n"): "\\n", #Newlines. They break off the comment. - re.escape("\r"): "\\r" #Carriage return. Windows users may need this for visualisation in their editors. + re.escape("\\"): "\\\\", # The escape character. + re.escape("\n"): "\\n", # Newlines. They break off the comment. + re.escape("\r"): "\\r" # Carriage return. Windows users may need this for visualisation in their editors. } def __init__(self): @@ -40,7 +40,8 @@ class GCodeWriter(MeshWriter): if gcode_list: for gcode in gcode_list: stream.write(gcode) - profile = self._serialiseProfile(Application.getInstance().getMachineManager().getWorkingProfile()) #Serialise the profile and put them at the end of the file. + # Serialise the profile and put them at the end of the file. + profile = self._serialiseProfile(Application.getInstance().getMachineManager().getWorkingProfile()) stream.write(profile) return True @@ -54,19 +55,22 @@ class GCodeWriter(MeshWriter): # \param profile The profile to serialise. # \return A serialised string of the profile. def _serialiseProfile(self, profile): - prefix = ";SETTING_" + str(GCodeWriter.version) + " " #The prefix to put before each line. + prefix = ";SETTING_" + str(GCodeWriter.version) + " " # The prefix to put before each line. prefix_length = len(prefix) - #Serialise a deepcopy to remove the defaults from the profile + # Serialise a deepcopy to remove the defaults from the profile serialised = copy.deepcopy(profile).serialise() - #Escape characters that have a special meaning in g-code comments. + # Escape characters that have a special meaning in g-code comments. pattern = re.compile("|".join(GCodeWriter.escape_characters.keys())) - serialised = pattern.sub(lambda m: GCodeWriter.escape_characters[re.escape(m.group(0))], serialised) #Perform the replacement with a regular expression. + # Perform the replacement with a regular expression. + serialised = pattern.sub(lambda m: GCodeWriter.escape_characters[re.escape(m.group(0))], serialised) - #Introduce line breaks so that each comment is no longer than 80 characters. Prepend each line with the prefix. + # Introduce line breaks so that each comment is no longer than 80 characters. Prepend each line with the prefix. result = "" - for pos in range(0, len(serialised), 80 - prefix_length): #Lines have 80 characters, so the payload of each line is 80 - prefix. + + # Lines have 80 characters, so the payload of each line is 80 - prefix. + for pos in range(0, len(serialised), 80 - prefix_length): result += prefix + serialised[pos : pos + 80 - prefix_length] + "\n" serialised = result From b0f55058edc044daf36460181714ac1cacf2fea0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 28 Apr 2016 16:59:58 +0200 Subject: [PATCH 099/424] Fix showing the rename profile dialog when creating a new profile --- resources/qml/Cura.qml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index cfce4a5297..127f74f2e5 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -627,7 +627,14 @@ UM.MainWindow reloadAll.onTriggered: Printer.reloadAll() addMachine.onTriggered: addMachineWizard.visible = true; - addProfile.onTriggered: { UM.MachineManager.createProfile(); preferences.setPage(4); preferences.visible = true; preferences.show(); preferences.getCurrentItem().showProfileNameDialog() } + addProfile.onTriggered: { + UM.MachineManager.createProfile(); + preferences.setPage(4); + preferences.show(); + + // Show the renameDialog after a very short delay so the preference page has time to initiate + showProfileNameDialogTimer.start(); + } updateProfile.onTriggered: { UM.ActiveProfile.updateProfile() } resetProfile.onTriggered: { UM.ActiveProfile.discardChanges() } @@ -642,6 +649,14 @@ UM.MainWindow toggleFullScreen.onTriggered: base.toggleFullscreen() } + Timer { + id: showProfileNameDialogTimer + repeat: false + interval: 1 + + onTriggered: preferences.getCurrentItem().showProfileNameDialog() + } + Menu { id: objectContextMenu; From 614726a574ff49c16a8877ddcffe0af8df4b4732 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 2 May 2016 09:39:55 +0200 Subject: [PATCH 100/424] Fix codestyle CURA-970 --- resources/qml/Cura.qml | 66 ++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 127f74f2e5..1759eabfc6 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -144,10 +144,10 @@ UM.MainWindow { title: catalog.i18nc("@title:menu menubar:toplevel","&View"); id: top_view_menu - Instantiator + Instantiator { model: UM.ViewModel { } - MenuItem + MenuItem { text: model.name; checkable: true; @@ -547,7 +547,7 @@ UM.MainWindow insertPage(1, catalog.i18nc("@title:tab","View"), Qt.resolvedUrl("ViewPage.qml")); //Force refresh - setPage(0) + setPage(0); } onVisibleChanged: @@ -576,7 +576,7 @@ UM.MainWindow deleteSelection.onTriggered: { - Printer.deleteSelection() + Printer.deleteSelection(); } deleteObject.onTriggered: @@ -605,29 +605,30 @@ UM.MainWindow objectContextMenu.objectId = 0; } } - + groupObjects.onTriggered: { - Printer.groupSelected() + Printer.groupSelected(); } - + unGroupObjects.onTriggered: { - Printer.ungroupSelected() + Printer.ungroupSelected(); } - + mergeObjects.onTriggered: { - Printer.mergeSelected() + Printer.mergeSelected(); } - deleteAll.onTriggered: Printer.deleteAll() - resetAllTranslation.onTriggered: Printer.resetAllTranslation() - resetAll.onTriggered: Printer.resetAll() - reloadAll.onTriggered: Printer.reloadAll() + deleteAll.onTriggered: Printer.deleteAll(); + resetAllTranslation.onTriggered: Printer.resetAllTranslation(); + resetAll.onTriggered: Printer.resetAll(); + reloadAll.onTriggered: Printer.reloadAll(); addMachine.onTriggered: addMachineWizard.visible = true; - addProfile.onTriggered: { + addProfile.onTriggered: + { UM.MachineManager.createProfile(); preferences.setPage(4); preferences.show(); @@ -635,21 +636,30 @@ UM.MainWindow // Show the renameDialog after a very short delay so the preference page has time to initiate showProfileNameDialogTimer.start(); } - updateProfile.onTriggered: { UM.ActiveProfile.updateProfile() } - resetProfile.onTriggered: { UM.ActiveProfile.discardChanges() } + updateProfile.onTriggered: UM.ActiveProfile.updateProfile(); + resetProfile.onTriggered: UM.ActiveProfile.discardChanges(); - preferences.onTriggered: { preferences.visible = true; } - configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(3); } - manageProfiles.onTriggered: { preferences.visible = true; preferences.setPage(4); } + preferences.onTriggered: preferences.visible = true; + configureMachines.onTriggered: + { + preferences.visible = true; + preferences.setPage(3); + } + manageProfiles.onTriggered: + { + preferences.visible = true; + preferences.setPage(4); + } documentation.onTriggered: CuraActions.openDocumentation(); reportBug.onTriggered: CuraActions.openBugReportPage(); showEngineLog.onTriggered: engineLog.visible = true; about.onTriggered: aboutDialog.visible = true; - toggleFullScreen.onTriggered: base.toggleFullscreen() + toggleFullScreen.onTriggered: base.toggleFullscreen(); } - Timer { + Timer + { id: showProfileNameDialogTimer repeat: false interval: 1 @@ -670,9 +680,9 @@ UM.MainWindow MenuItem { action: actions.reloadAll; } MenuItem { action: actions.resetAllTranslation; } MenuItem { action: actions.resetAll; } - MenuItem { action: actions.groupObjects;} - MenuItem { action: actions.mergeObjects;} - MenuItem { action: actions.unGroupObjects;} + MenuItem { action: actions.groupObjects; } + MenuItem { action: actions.mergeObjects; } + MenuItem { action: actions.unGroupObjects; } } Menu @@ -682,9 +692,9 @@ UM.MainWindow MenuItem { action: actions.reloadAll; } MenuItem { action: actions.resetAllTranslation; } MenuItem { action: actions.resetAll; } - MenuItem { action: actions.groupObjects;} - MenuItem { action: actions.mergeObjects;} - MenuItem { action: actions.unGroupObjects;} + MenuItem { action: actions.groupObjects; } + MenuItem { action: actions.mergeObjects; } + MenuItem { action: actions.unGroupObjects; } } Connections From c73bdc3fb095d2e365f7d58ef8702f4d5c573757 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 2 May 2016 09:58:48 +0200 Subject: [PATCH 101/424] Clarify wording The profile is not being altered; instead the current settings are set to a clean copy of the stored profile. CURA-970 --- resources/qml/Actions.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index c4ce4c9ae4..003a3ceeec 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -109,7 +109,7 @@ Item { id: resetProfileAction; enabled: UM.ActiveProfile.valid && UM.ActiveProfile.hasCustomisedValues - text: catalog.i18nc("@action:inmenu menubar:profile","&Reset Current Profile"); + text: catalog.i18nc("@action:inmenu menubar:profile","&Reload Current Profile"); } Action From 704fd215186934684066570e2894b4914069dd56 Mon Sep 17 00:00:00 2001 From: Aldo Hoeben Date: Mon, 2 May 2016 10:34:30 +0200 Subject: [PATCH 102/424] Update README.md Fix link to ultimaker_original.json --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09651e5334..e6425ec8e9 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Third party plugins Making profiles for other printers ---------------------------------- -There are two ways of doing it. You can either use the generator [here](http://quillford.github.io/CuraProfileMaker/) or you can use [this](https://github.com/Ultimaker/Cura/blob/master/resources/settings/ultimaker_original.json) as a template. +There are two ways of doing it. You can either use the generator [here](http://quillford.github.io/CuraProfileMaker/) or you can use [this](https://github.com/Ultimaker/Cura/blob/master/resources/machines/ultimaker_original.json) as a template. * Change the machine ID to something unique * Change the machine_name to your printer's name @@ -57,4 +57,4 @@ There are two ways of doing it. You can either use the generator [here](http://q * Set the start and end gcode in machine_start_gcode and machine_end_gcode * If your printer has a heated bed, set visible to true under material_bed_temperature -Once you are done, put the profile you have made into resources/settings. +Once you are done, put the profile you have made into resources/machines, or in machines in your cura profile folder. From d8c53f7a1f0d59ed3663329c6891d3c1462b7c21 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 2 May 2016 11:48:08 +0200 Subject: [PATCH 103/424] Fix manufacturer for uniqbot These have to be Other for Ultimaker's marketing team. --- resources/machines/uniqbot_one.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/uniqbot_one.json b/resources/machines/uniqbot_one.json index f07dae9b24..d1343e6c54 100644 --- a/resources/machines/uniqbot_one.json +++ b/resources/machines/uniqbot_one.json @@ -2,7 +2,7 @@ "id": "uniqbot_one", "version": 1, "name": "Uniqbot", - "manufacturer": "Unimatech", + "manufacturer": "Other", "author": "Unimatech", "icon": "icon_ultimaker2.png", "file_formats": "text/x-gcode", From b4b24822bb4660b96a7e0661eecd58092570862e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 2 May 2016 16:44:02 +0200 Subject: [PATCH 104/424] First stub of reworked FDM printer CURA-1278 --- resources/machines/fdmprinter.def.json | 2452 ++++++++++++++++++++++++ 1 file changed, 2452 insertions(+) create mode 100644 resources/machines/fdmprinter.def.json diff --git a/resources/machines/fdmprinter.def.json b/resources/machines/fdmprinter.def.json new file mode 100644 index 0000000000..3d39e8a652 --- /dev/null +++ b/resources/machines/fdmprinter.def.json @@ -0,0 +1,2452 @@ +{ + "id": "fdmprinter", + "version": 2, + "metadata": + { + "category": "Ultimaker", + "manufacturer": "Ultimaker", + "visible": false + }, + "name": "FDM Printer Base Description", + "author": "Ultimaker B.V.", + "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", + + "settings": + { + "machine_settings": + { + "label": "Machine", + "type": "category", + "description": "Machine specific settings", + "children": + { + "machine_show_variants": { + "description": "Whether to show the different variants of this machine, which are described in separate json files.", + "default_value": false, + "type": "bool", + "label": "Show machine variants" + }, + "machine_start_gcode": { + "description": "Gcode commands to be executed at the very start - separated by \\n.", + "default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0", + "label": "Start GCode", + "global_only": true, + "type": "str" + }, + "machine_end_gcode": { + "description": "Gcode commands to be executed at the very end - separated by \\n.", + "default_value": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84", + "label": "End GCode", + "global_only": true, + "type": "str" + }, + "material_bed_temp_wait": { + "description": "Whether to insert a command to wait until the bed temperature is reached at the start.", + "label": "Wait for bed heatup", + "default_value": true, + "global_only": true, + "type": "bool" + }, + "material_print_temp_prepend": { + "description": "Whether to include nozzle temperature commands at the start of the gcode. When the start_gcode already contains nozzle temperature commands Cura frontend will automatically disable this setting.", + "default_value": true, + "global_only": true, + "type": "bool", + "label": "Wait for material heatup" + }, + "machine_width": { + "description": "The width (X-direction) of the printable area.", + "default_value": 100, + "global_only": true, + "type": "float", + "label": "Machine width" + }, + "machine_depth": { + "description": "The depth (Y-direction) of the printable area.", + "default_value": 100, + "global_only": true, + "type": "float", + "label": "Machine depth" + }, + "machine_height": { + "description": "The height (Z-direction) of the printable area.", + "default_value": 100, + "global_only": true, + "type": "float", + "label": "Machine height" + }, + "machine_heated_bed": { + "description": "Whether the machine has a heated bed present.", + "default_value": false, + "global_only": true, + "label": "Has heated bed", + "type": "bool" + }, + "machine_center_is_zero": { + "description": "Whether the X/Y coordinates of the zero position of the printer is at the center of the printable area.", + "default_value": false, + "global_only": true, + "type": "bool", + "label": "Is center origin" + }, + "machine_extruder_count": { + "description": "Number of extruder trains. An extruder train is the combination of a feeder, bowden tube, and nozzle.", + "default_value": 1, + "global_only": true, + "type": "bool", + "label": "Number extruders" + }, + "machine_nozzle_tip_outer_diameter": { + "description": "The outer diameter of the tip of the nozzle.", + "label": "Outer nozzle diameter", + "default_value": 1, + "global_only": true, + "type": "float" + }, + "machine_nozzle_head_distance": { + "description": "The height difference between the tip of the nozzle and the lowest part of the print head.", + "default_value": 3, + "global_only": true, + "type": "float", + "label": "Nozzle length" + }, + "machine_nozzle_expansion_angle": { + "description": "The angle between the horizontal plane and the conical part right above the tip of the nozzle.", + "default_value": 45, + "global_only": true, + "type": "int", + "label": "Nozzle angle" + }, + "machine_heat_zone_length": { + "description": "The distance from the tip of the nozzle in which heat from the nozzle is transfered to the filament.", + "default_value": 16, + "global_only": true, + "type": "float", + "label": "Heat zone length" + }, + "machine_nozzle_heat_up_speed": { + "description": "The speed (°C/s) by which the nozzle heats up averaged over the window of normal printing temperatures and the standby temperature.", + "default_value": 2.0, + "global_only": true, + "type": "float", + "label": "Heat up speed" + }, + "machine_nozzle_cool_down_speed": { + "description": "The speed (°C/s) by which the nozzle cools down averaged over the window of normal printing temperatures and the standby temperature.", + "default_value": 2.0, + "global_only": true, + "type": "float", + "label": "Cool down speed" + }, + "machine_gcode_flavor": { + "description": "The type of gcode to be generated.", + "default_value": "RepRap", + "global_only": true, + "type": "str", + "label": "Gcode flavour" + }, + "machine_disallowed_areas": { + "description": "A list of polygons with areas the print head is not allowed to enter.", + "type": "polygons", + "default_value": [], + "global_only": true, + "label": "Disallowed areas" + }, + "machine_head_polygon": { + "description": "A 2D silhouette of the print head (fan caps excluded).", + "type": "polygon", + "default_value": [ + [ + -1, + 1 + ], + [ + -1, + -1 + ], + [ + 1, + -1 + ], + [ + 1, + 1 + ] + ], + "global_only": true, + "label": "Machine head polygon" + }, + "machine_head_with_fans_polygon": { + "description": "A 2D silhouette of the print head (fan caps included).", + "type": "polygon", + "default_value": [ + [ + -20, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -20, + -10 + ] + ], + "global_only": true, + "label": "Machine head & Fan polygon" + }, + "gantry_height": { + "description": "The height difference between the tip of the nozzle and the gantry system (X and Y axes).", + "default_value": 99999999999, + "global_only": true, + "label": "Gantry height", + "type": "float" + }, + "machine_nozzle_size": { + "label": "Nozzle Diameter", + "description": "The inner diameter of the nozzle. Change this setting when using a non-standard nozzle size.", + "unit": "mm", + "type": "float", + "default_value": 0.4, + "minimum_value": "0.001", + "maximum_value_warning": "10", + "visible": false + } + } + }, + "resolution": + { + "label": "Quality", + "type": "category", + "icon": "category_layer_height", + "description": "All settings that influence the resolution of the print. These settings have a large impact on the quality (and print time)", + "children": + { + "layer_height": + { + "label": "Layer Height", + "description": "The height of each layer in mm. Higher values produce faster prints in lower resolution, lower values produce slower prints in higher resolution.", + "unit": "mm", + "type": "float", + "default_value": 0.1, + "minimum_value": "0.001", + "minimum_value_warning": "0.04", + "maximum_value_warning": "0.8 * machine_nozzle_size", + "global_only": "True" + }, + "layer_height_0": + { + "label": "Initial Layer Height", + "description": "The height of the initial layer in mm. A thicker initial layer makes adhesion to the build plate easier.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0.001", + "minimum_value_warning": "0.04", + "maximum_value_warning": "0.8 * machine_nozzle_size", + "global_only": "True" + }, + "line_width": + { + "label": "Line Width", + "description": "Width of a single line. Generally, the width of each line should correspond to the width of the nozzle. However, slightly reducing this value could produce better prints.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "2 * machine_nozzle_size", + "default_value": 0.4, + "type": "float", + "inherit_function": "machine_nozzle_size", + "children": + { + "wall_line_width": + { + "label": "Wall Line Width", + "description": "Width of a single wall line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float", + "children": + { + "wall_line_width_0": + { + "label": "Outer Wall Line Width", + "description": "Width of the outermost wall line. By lowering this value, higher levels of detail can be printed.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float" + }, + "wall_line_width_x": + { + "label": "Inner Wall(s) Line Width", + "description": "Width of a single wall line for all wall lines except the outermost one.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float" + } + } + }, + "skin_line_width": + { + "label": "Top/bottom Line Width", + "description": "Width of a single top/bottom line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float" + }, + "infill_line_width": + { + "label": "Infill Line Width", + "description": "Width of a single infill line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float" + }, + "skirt_line_width": + { + "label": "Skirt Line Width", + "description": "Width of a single skirt line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float", + "global_only": true + }, + "support_line_width": + { + "label": "Support Line Width", + "description": "Width of a single support structure line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float", + "enabled": "support_enable", + "global_only": true + }, + "support_roof_line_width": + { + "label": "Support Roof Line Width", + "description": "Width of a single support roof line.", + "unit": "mm", + "default_value": 0.4, + "minimum_value": "0.0001", + "maximum_value_warning": "machine_nozzle_size * 2", + "type": "float", + "enabled": "support_roof_enable", + "global_only": true + } + } + } + } + }, + "shell": + { + "label": "Shell", + "visible": true, + "icon": "category_shell", + "description": "Shell", + "type": "category", + "children": + { + "wall_thickness": + { + "label": "Wall Thickness", + "description": "The thickness of the outside walls in the horizontal direction. This value divided by the wall line width defines the number of walls.", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "0", + "minimum_value_warning": "line_width", + "maximum_value_warning": "5 * line_width", + "type": "float", + "children": + { + "wall_line_count": + { + "label": "Wall Line Count", + "description": "The number of walls. When calculated by the wall thickness, this value is rounded to a whole number.", + "default_value": 2, + "minimum_value": "0", + "type": "int", + "inherit_function": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" + } + } + }, + "top_bottom_thickness": + { + "label": "Top/Bottom Thickness", + "description": "The thickness of the top/bottom layers in the print. This value divided by the layer height defines the number of top/bottom layers.", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "0", + "maximum_value": "5", + "minimum_value_warning": "0.6", + "type": "float", + "children": + { + "top_thickness": + { + "label": "Top Thickness", + "description": "The thickness of the top layers in the print. This value divided by the layer height defines the number of top layers.", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "float", + "children": + { + "top_layers": + { + "label": "Top Layers", + "description": "The number of top layers. When calculated by the top thickness, this value is rounded to a whole number.", + "default_value": 8, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "int", + "inherit_function": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + } + } + }, + "bottom_thickness": + { + "label": "Bottom Thickness", + "description": "The thickness of the bottom layers in the print. This value divided by the layer height defines the number of bottom layers.", + "unit": "mm", + "default_value": 0.6, + "minimum_value": "0", + "type": "float", + "children": + { + "bottom_layers": + { + "label": "Bottom Layers", + "description": "The number of bottom layers. When calculated by the bottom thickness, this value is rounded to a whole number.", + "minimum_value": "0", + "default_value": 6, + "type": "int", + "inherit_function": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + } + } + } + } + }, + "top_bottom_pattern": + { + "label": "Top/Bottom Pattern", + "description": "The pattern of the top/bottom layers.", + "type": "enum", + "options": + { + "lines": "Lines", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "lines" + }, + "wall_0_inset": + { + "label": "Outer Wall Inset", + "description": "Inset applied to the path of the outer wall. If the outer wall is smaller than the nozzle, and printed after the inner walls, use this offset to get the hole in the nozzle to overlap with the inner walls instead of the outside of the object.", + "unit": "mm", + "type": "float", + "default_value": 0.0, + "inherit_function": "(machine_nozzle_size - wall_line_width_0) / 2 if wall_line_width_0 < machine_nozzle_size else 0", + "minimum_value_warning": "0", + "maximum_value_warning": "machine_nozzle_size" + }, + "alternate_extra_perimeter": + { + "label": "Alternate Extra Wall", + "description": "Prints an extra wall at every other layer. This way infill gets caught between these extra walls, resulting in stronger prints.", + "type": "bool", + "default_value": false, + "inherit": false + }, + "remove_overlapping_walls_enabled": + { + "label": "Remove Overlapping Wall Parts", + "description": "Remove parts of a wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin parts and sharp corners in models.", + "type": "bool", + "default_value": false, + "enabled": "False", + "children": + { + "remove_overlapping_walls_0_enabled": + { + "label": "Remove Overlapping Outer Wall Parts", + "description": "Remove parts of an outer wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin pieces in a model and sharp corners.", + "type": "bool", + "default_value": false, + "inherit": true, + "enabled": "False" + }, + "remove_overlapping_walls_x_enabled": + { + "label": "Remove Overlapping Inner Wall Parts", + "description": "Remove parts of an inner wall that would otherwise overlap and cause over-extrusion. These overlaps occur in thin pieces in a model and sharp corners.", + "type": "bool", + "default_value": true, + "inherit": false + } + } + }, + "fill_perimeter_gaps": + { + "label": "Fill Gaps Between Walls", + "description": "Fills the gaps between walls when overlapping inner wall parts are removed.", + "type": "enum", + "options": + { + "nowhere": "Nowhere", + "everywhere": "Everywhere", + "skin": "Skin" + }, + "default_value": "everywhere", + "enabled": "remove_overlapping_walls_x_enabled" + }, + "travel_compensate_overlapping_walls_enabled": + { + "label": "Compensate Wall Overlaps", + "description": "Compensate the flow for parts of a wall being printed where there is already a wall in place.", + "type": "bool", + "default_value": true + }, + "xy_offset": + { + "label": "Horizontal Expansion", + "description": "Amount of offset applied to all polygons in each layer. Positive values can compensate for too big holes; negative values can compensate for too small holes.", + "unit": "mm", + "type": "float", + "minimum_value_warning": "-10", + "maximum_value_warning": "10", + "default_value": 0 + }, + "z_seam_type": + { + "label": "Z Seam Alignment", + "description": "Starting point of each path in a layer. When paths in consecutive layers start at the same point a vertical seam may show on the print. When aligning these at the back, the seam is easiest to remove. When placed randomly the inaccuracies at the paths' start will be less noticeable. When taking the shortest path the print will be quicker.", + "type": "enum", + "options": + { + "back": "Back", + "shortest": "Shortest", + "random": "Random" + }, + "default_value": "shortest" + }, + "skin_no_small_gaps_heuristic": + { + "label": "Ignore Small Z Gaps", + "description": "When the model has small vertical gaps, about 5% extra computation time can be spent on generating top and bottom skin in these narrow spaces. In such case, disable the setting.", + "type": "bool", + "default_value": true + } + } + }, + "infill": + { + "label": "Infill", + "icon": "category_infill", + "description": "Infill", + "type": "category", + "children": + { + "infill_sparse_density": + { + "label": "Infill Density", + "description": "Adjusts the density of infill of the print.", + "unit": "%", + "type": "float", + "default_value": 20, + "minimum_value": "0", + "maximum_value_warning": "100", + "children": + { + "infill_line_distance": + { + "label": "Infill Line Distance", + "description": "Distance between the printed infill lines. This setting is calculated by the infill density and the infill line width.", + "unit": "mm", + "type": "float", + "default_value": 2, + "minimum_value": "0", + "inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" + } + } + }, + "infill_pattern": + { + "label": "Infill Pattern", + "description": "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, triangle and concentric patterns are fully printed every layer.", + "type": "enum", + "options": + { + "grid": "Grid", + "lines": "Lines", + "triangles": "Triangles", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "grid", + "inherit_function": "'lines' if infill_sparse_density > 25 else 'grid'" + }, + "infill_overlap": + { + "label": "Infill Overlap Percentage", + "description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.", + "unit": "%", + "type": "float", + "default_value": 10, + "inherit_function": "10 if infill_sparse_density < 95 else 0", + "minimum_value_warning": "-50", + "maximum_value_warning": "100", + "children": + { + "infill_overlap_mm": + { + "label": "Infill Overlap", + "description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.", + "unit": "mm", + "type": "float", + "default_value": 0.04, + "minimum_value_warning": "-0.5 * machine_nozzle_size", + "maximum_value_warning": "machine_nozzle_size", + "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 else 0" + } + } + }, + "infill_wipe_dist": + { + "label": "Infill Wipe Distance", + "description": "Distance of a travel move inserted after every infill line, to make the infill stick to the walls better. This option is similar to infill overlap, but without extrusion and only on one end of the infill line.", + "unit": "mm", + "type": "float", + "default_value": 0.04, + "inherit_function": "wall_line_width_0 / 4 if wall_line_count == 1 else wall_line_width_x / 4", + "minimum_value_warning": "0", + "maximum_value_warning": "machine_nozzle_size" + }, + "infill_sparse_thickness": + { + "label": "Infill Layer Thickness", + "description": "The thickness per layer of infill material. This value should always be a multiple of the layer height and is otherwise rounded.", + "unit": "mm", + "type": "float", + "default_value": 0.1, + "minimum_value": "0.0001", + "maximum_value_warning": "0.32", + "maximum_value": "layer_height * 8", + "inherit_function": "layer_height" + }, + "infill_before_walls": + { + "label": "Infill Before Walls", + "description": "Print the infill before printing the walls. Printing the walls first may lead to more accurate walls, but overhangs print worse. Printing the infill first leads to sturdier walls, but the infill pattern might sometimes show through the surface.", + "type": "bool", + "default_value": true + } + } + }, + "material": + { + "label": "Material", + "icon": "category_material", + "description": "Material", + "type": "category", + "children": + { + "material_flow_dependent_temperature": { + "label": "Auto Temperature", + "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", + "type": "bool", + "default_value": false, + "visible": false, + "enabled": "False", + "global_only": true + }, + "material_print_temperature": { + "label": "Printing Temperature", + "description": "The temperature used for printing. Set at 0 to pre-heat the printer manually.", + "unit": "°C", + "type": "float", + "default_value": 210, + "minimum_value": "0", + "maximum_value_warning": "260", + "enabled": "not (material_flow_dependent_temperature)" + }, + "material_flow_temp_graph": { + "label": "Flow Temperature Graph", + "description": "Data linking material flow (in mm3 per second) to temperature (degrees Celsius).", + "unit": "", + "type": "str", + "default_value": "[[3.5,200],[7.0,240]]", + "enabled": "False", + "enabled_before_removal": "material_flow_dependent_temperature", + "global_only": true + }, + "material_extrusion_cool_down_speed": { + "label": "Extrusion Cool Down Speed Modifier", + "description": "The extra speed by which the nozzle cools while extruding. The same value is used to signify the heat up speed lost when heating up while extruding.", + "unit": "°C/s", + "type": "float", + "default_value": 0.5, + "minimum_value": "0", + "maximum_value_warning": "10.0", + "global_only": "True", + "enabled": "False", + "enabled_before_removal": "material_flow_dependent_temperature or machine_extruder_count > 1", + "visible": false + }, + "material_bed_temperature": { + "label": "Bed Temperature", + "description": "The temperature used for the heated bed. Set at 0 to pre-heat the printer manually.", + "unit": "°C", + "type": "float", + "default_value": 60, + "minimum_value": "0", + "maximum_value_warning": "260", + "enabled": "machine_heated_bed", + "global_only": "True" + }, + "material_diameter": { + "label": "Diameter", + "description": "Adjusts the diameter of the filament used. Match this value with the diameter of the used filament.", + "unit": "mm", + "type": "float", + "default_value": 2.85, + "minimum_value": "0.0001", + "minimum_value_warning": "0.4", + "maximum_value_warning": "3.5", + "global_only": "True" + }, + "material_flow": { + "label": "Flow", + "description": "Flow compensation: the amount of material extruded is multiplied by this value.", + "unit": "%", + "default_value": 100, + "type": "float", + "minimum_value": "5", + "minimum_value_warning": "50", + "maximum_value_warning": "150" + }, + "retraction_enable": { + "label": "Enable Retraction", + "description": "Retract the filament when the nozzle is moving over a non-printed area. ", + "type": "bool", + "default_value": true, + "visible": true + }, + "retraction_amount": { + "label": "Retraction Distance", + "description": "The length of material retracted during a retraction move.", + "unit": "mm", + "type": "float", + "default_value": 6.5, + "minimum_value_warning": "-0.0001", + "maximum_value_warning": "10.0", + "visible": false, + "inherit": false, + "enabled": "retraction_enable" + }, + "retraction_speed": { + "label": "Retraction Speed", + "description": "The speed at which the filament is retracted and primed during a retraction move.", + "unit": "mm/s", + "type": "float", + "default_value": 25, + "minimum_value": "0", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "visible": false, + "inherit": false, + "enabled": "retraction_enable", + "children": { + "retraction_retract_speed": { + "label": "Retraction Retract Speed", + "description": "The speed at which the filament is retracted during a retraction move.", + "unit": "mm/s", + "type": "float", + "default_value": 25, + "minimum_value": "0", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "visible": false, + "enabled": "retraction_enable" + }, + "retraction_prime_speed": { + "label": "Retraction Prime Speed", + "description": "The speed at which the filament is primed during a retraction move.", + "unit": "mm/s", + "type": "float", + "default_value": 25, + "minimum_value": "0", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "visible": false, + "enabled": "retraction_enable" + } + } + }, + "retraction_extra_prime_amount": { + "label": "Retraction Extra Prime Amount", + "description": "Some material can ooze away during a travel move, which can be compensated for here.", + "unit": "mm³", + "type": "float", + "default_value": 0, + "minimum_value_warning": "-0.0001", + "maximum_value_warning": "5.0", + "visible": false, + "inherit": false, + "enabled": "retraction_enable" + }, + "retraction_min_travel": { + "label": "Retraction Minimum Travel", + "description": "The minimum distance of travel needed for a retraction to happen at all. This helps to get fewer retractions in a small area.", + "unit": "mm", + "type": "float", + "default_value": 1.5, + "inherit_function": "line_width * 2", + "minimum_value": "0", + "maximum_value_warning": "10", + "visible": false, + "inherit": false, + "enabled": "retraction_enable" + }, + "retraction_count_max": { + "label": "Maximum Retraction Count", + "description": "This setting limits the number of retractions occurring within the minimum extrusion distance window. Further retractions within this window will be ignored. This avoids retracting repeatedly on the same piece of filament, as that can flatten the filament and cause grinding issues.", + "default_value": 45, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "int", + "visible": false, + "inherit": false, + "enabled": "retraction_enable" + }, + "retraction_extrusion_window": { + "label": "Minimum Extrusion Distance Window", + "description": "The window in which the maximum retraction count is enforced. This value should be approximately the same as the retraction distance, so that effectively the number of times a retraction passes the same patch of material is limited.", + "unit": "mm", + "type": "float", + "default_value": 4.5, + "minimum_value": "0", + "maximum_value_warning": "retraction_amount * 2", + "visible": false, + "inherit_function": "retraction_amount", + "enabled": "retraction_enable" + }, + "retraction_hop": { + "label": "Z Hop when Retracting", + "description": "Whenever a retraction is done, the build plate is lowered to create clearance between the nozzle and the print. It prevents the nozzle from hitting the print during travel moves, reducing the chance to knock the print from the build plate.", + "unit": "mm", + "type": "float", + "default_value": 0, + "minimum_value_warning": "-0.0001", + "maximum_value_warning": "10", + "inherit": false, + "enabled": "retraction_enable" + } + } + }, + "speed": + { + "label": "Speed", + "icon": "category_speed", + "description": "Speed", + "type": "category", + "children": + { + "speed_print": + { + "label": "Print Speed", + "description": "The speed at which printing happens.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value_warning": "150", + "maximum_value": "299792458000", + "default_value": 60, + "children": + { + "speed_infill": + { + "label": "Infill Speed", + "description": "The speed at which infill is printed.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 60 + }, + "speed_wall": + { + "label": "Wall Speed", + "description": "The speed at which the walls are printed.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 30, + "visible": false, + "inherit_function": "parent_value / 2", + "children": + { + "speed_wall_0": + { + "label": "Outer Wall Speed", + "description": "The speed at which the outermost walls are printed. Printing the outer wall at a lower speed improves the final skin quality. However, having a large difference between the inner wall speed and the outer wall speed will effect quality in a negative way.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 30 + }, + "speed_wall_x": + { + "label": "Inner Wall Speed", + "description": "The speed at which all inner walls are printed Printing the inner wall faster than the outer wall will reduce printing time. It works well to set this in between the outer wall speed and the infill speed.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 60, + "inherit_function": "parent_value * 2" + } + } + }, + "speed_topbottom": + { + "label": "Top/Bottom Speed", + "description": "The speed at which top/bottom layers are printed.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 30, + "inherit_function": "parent_value / 2" + }, + "speed_support": + { + "label": "Support Speed", + "description": "The speed at which the support structure is printed. Printing support at higher speeds can greatly reduce printing time. The surface quality of the support structure is not important since it is removed after printing.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 60, + "inherit_function": "speed_print", + "enabled": "support_roof_enable", + "children": + { + "speed_support_infill": + { + "label": "Support Infill Speed", + "description": "The speed at which the infill of support is printed. Printing the infill at lower speeds improves stability.", + "unit": "mm/s", + "type": "float", + "default_value": 60, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "inherit": true, + "enabled": "support_enable", + "global_only": true + }, + "speed_support_roof": + { + "label": "Support Roof Speed", + "description": "The speed at which the roofs of support are printed. Printing the support roof at lower speeds can improve overhang quality.", + "unit": "mm/s", + "type": "float", + "default_value": 40, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "enabled": "support_roof_enable", + "inherit_function": "parent_value / 1.5", + "global_only": true + } + } + } + } + }, + "speed_travel": + { + "label": "Travel Speed", + "description": "The speed at which travel moves are made.", + "unit": "mm/s", + "type": "float", + "default_value": 120, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "300", + "inherit_function": "speed_print if magic_spiralize else 120", + "global_only": true + }, + "speed_layer_0": { + "label": "Initial Layer Speed", + "description": "The print speed for the initial layer. A lower value is advised to improve adhesion to the build plate.", + "unit": "mm/s", + "type": "float", + "default_value": 30, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "300" + }, + "skirt_speed": { + "label": "Skirt Speed", + "description": "The speed at which the skirt and brim are printed. Normally this is done at the initial layer speed, but sometimes you might want to print the skirt at a different speed.", + "unit": "mm/s", + "type": "float", + "default_value": 30, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "300", + "inherit_function": "speed_layer_0", + "global_only": true + }, + "speed_slowdown_layers": + { + "label": "Number of Slower Layers", + "description": "The first few layers are printed slower than the rest of the object, to get better adhesion to the build plate and improve the overall success rate of prints. The speed is gradually increased over these layers.", + "type": "int", + "default_value": 2, + "minimum_value": "0", + "maximum_value": "299792458000", + "maximum_value_warning": "300", + "global_only": true + } + } + }, + "travel": + { + "label": "Travel", + "icon": "category_travel", + "description": "travel", + "type": "category", + "children": + { + "retraction_combing": + { + "label": "Combing Mode", + "description": "Combing keeps the nozzle within already printed areas when traveling. This results in slightly longer travel moves but reduces the need for retractions. If combing is off, the material will retract and the nozzle moves in a straight line to the next point. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only.", + "type": "enum", + "options": + { + "off": "Off", + "all": "All", + "noskin": "No Skin" + }, + "default_value": "all", + "global_only": true + }, + "travel_avoid_other_parts": + { + "label": "Avoid Printed Parts when Traveling", + "description": "The nozzle avoids already printed parts when traveling. This option is only available when combing is enabled.", + "type": "bool", + "default_value": true, + "enabled": "retraction_combing != \"off\"", + "global_only": "True" + }, + "travel_avoid_distance": + { + "label": "Travel Avoid Distance", + "description": "The distance between the nozzle and already printed parts when avoiding during travel moves.", + "unit": "mm", + "type": "float", + "default_value": 1.5, + "inherit_function": "machine_nozzle_tip_outer_diameter / 2 * 1.25", + "minimum_value": "0", + "maximum_value_warning": "machine_nozzle_tip_outer_diameter * 5", + "inherit": false, + "enabled": "retraction_combing != \"off\" and travel_avoid_other_parts", + "global_only": "True" + } + } + }, + "cooling": + { + "label": "Cooling", + "icon": "category_cool", + "description": "Cooling", + "type": "category", + "children": + { + "cool_fan_enabled": + { + "label": "Enable Cooling Fans", + "description": "Enables the cooling fans while printing. The fans improve print quality on layers with short layer times and bridging / overhangs.", + "type": "bool", + "default_value": true, + "global_only": "True" + }, + "cool_fan_speed": + { + "label": "Fan Speed", + "description": "The speed at which the cooling fans spin.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "inherit_function": "100.0 if cool_fan_enabled else 0.0", + "enabled": "cool_fan_enabled", + "global_only": "True", + "children": + { + "cool_fan_speed_min": + { + "label": "Regular Fan Speed", + "description": "The speed at which the fans spin before hitting the threshold. When a layer prints faster than the threshold, the fan speed gradually inclines towards the maximum fan speed.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "inherit_function": "parent_value", + "default_value": 100, + "visible": false, + "enabled": "cool_fan_enabled", + "global_only": "True" + }, + "cool_fan_speed_max": + { + "label": "Maximum Fan Speed", + "description": "The speed at which the fans spin on the minimum layer time. The fan speed gradually increases between the regular fan speed and maximum fan speed when the threshold is hit.", + "unit": "%", + "type": "float", + "minimum_value": "max(0, cool_fan_speed_min)", + "maximum_value": "100", + "default_value": 100, + "enabled": "cool_fan_enabled", + "global_only": "True" + } + } + }, + "cool_min_layer_time_fan_speed_max": + { + "label": "Regular/Maximum Fan Speed Threshold", + "description": "The layer time which sets the threshold between regular fan speed and maximum fan speed. Layers that print slower than this time use regular fan speed. For faster layers the fan speed gradually increases towards the maximum fan speed.", + "unit": "sec", + "type": "float", + "default_value": 10, + "minimum_value": "cool_min_layer_time", + "maximum_value_warning": "600", + "global_only": "True" + }, + "cool_fan_full_at_height": + { + "label": "Regular Fan Speed at Height", + "description": "The height at which the fans spin on regular fan speed. At the layers below the fan speed gradually increases from zero to regular fan speed.", + "unit": "mm", + "type": "float", + "default_value": 0.5, + "inherit_function": "layer_height_0", + "minimum_value": "0", + "maximum_value_warning": "10.0", + "global_only": "True", + "children": + { + "cool_fan_full_layer": + { + "label": "Regular Fan Speed at Layer", + "description": "The layer at which the fans spin on regular fan speed. If regular fan speed at height is set, this value is calculated and rounded to a whole number.", + "type": "int", + "default_value": 1, + "minimum_value": "0", + "maximum_value_warning": "100", + "inherit_function": "int((parent_value - layer_height_0 + 0.001) / layer_height) + 1", + "global_only": "True" + } + } + }, + "cool_min_layer_time": + { + "label": "Minimum Layer Time", + "description": "The minimum time spent in a layer. This forces the printer to slow down, to at least spend the time set here in one layer. This allows the printed material to cool down properly before printing the next layer.", + "unit": "sec", + "type": "float", + "default_value": 5, + "minimum_value": "0", + "maximum_value_warning": "600", + "global_only": "True" + }, + "cool_min_speed": + { + "label": "Minimum Speed", + "description": "The minimum print speed, despite slowing down due to the minimum layer time. When the printer would slow down too much, the pressure in the nozzle would be too low and result in bad print quality.", + "unit": "mm/s", + "type": "float", + "default_value": 10, + "minimum_value": "0", + "maximum_value_warning": "100", + "global_only": "True" + }, + "cool_lift_head": + { + "label": "Lift Head", + "description": "When the minimum speed is hit because of minimum layer time, lift the head away from the print and wait the extra time until the minimum layer time is reached.", + "type": "bool", + "default_value": false, + "global_only": "True" + } + } + }, + "support": + { + "label": "Support", + "type": "category", + "icon": "category_support", + "description": "Support", + "children": + { + "support_enable": + { + "label": "Enable Support", + "description": "Enable support structures. These structures support parts of the model with severe overhangs.", + "type": "bool", + "default_value": false + }, + "support_type": + { + "label": "Support Placement", + "description": "Adjusts the placement of the support structures. The placement can be set to touching build plate or everywhere. When set to everywhere the support structures will also be printed on the model.", + "type": "enum", + "options": + { + "buildplate": "Touching Buildplate", + "everywhere": "Everywhere" + }, + "default_value": "everywhere", + "enabled": "support_enable" + }, + "support_angle": + { + "label": "Support Overhang Angle", + "description": "The minimum angle of overhangs for which support is added. At a value of 0° all overhangs are supported, 90° will not provide any support.", + "unit": "°", + "type": "float", + "minimum_value": "0", + "maximum_value": "90", + "default_value": 50, + "enabled": "support_enable" + }, + "support_pattern": + { + "label": "Support Pattern", + "description": "The pattern of the support structures of the print. The different options available result in sturdy or easy to remove support.", + "type": "enum", + "options": + { + "lines": "Lines", + "grid": "Grid", + "triangles": "Triangles", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "zigzag", + "enabled": "support_enable", + "global_only": true + }, + "support_connect_zigzags": + { + "label": "Connect Support ZigZags", + "description": "Connect the ZigZags. This will increase the strength of the zig zag support structure.", + "type": "bool", + "default_value": true, + "enabled": "support_enable and (support_pattern == \"zigzag\")", + "global_only": true + }, + "support_infill_rate": + { + "label": "Support Density", + "description": "Adjusts the density of the support structure. A higher value results in better overhangs, but the supports are harder to remove.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "100", + "default_value": 15, + "enabled": "support_enable", + "global_only": true, + "children": { + "support_line_distance": + { + "label": "Support Line Distance", + "description": "Distance between the printed support structure lines. This setting is calculated by the support density.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "default_value": 2.66, + "enabled": "support_enable", + "inherit_function": "(support_line_width * 100) / parent_value * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", + "global_only": true + } + } + }, + "support_xy_distance": + { + "label": "Support X/Y Distance", + "description": "Distance of the support structure from the print in the X/Y directions.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "10", + "default_value": 0.7, + "enabled": "support_enable" + }, + "support_z_distance": + { + "label": "Support Z Distance", + "description": "Distance from the top/bottom of the support structure to the print. This gap provides clearance to remove the supports after the model is printed. This value is rounded down to a multiple of the layer height.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "10", + "default_value": 0.15, + "enabled": "support_enable", + + "children": + { + "support_top_distance": + { + "label": "Support Top Distance", + "description": "Distance from the top of the support to the print.", + "unit": "mm", + "minimum_value": "0", + "maximum_value_warning": "10", + "default_value": 0.15, + "type": "float", + "enabled": "support_enable" + }, + "support_bottom_distance": + { + "label": "Support Bottom Distance", + "description": "Distance from the print to the bottom of the support.", + "unit": "mm", + "minimum_value": "0", + "maximum_value_warning": "10", + "default_value": 0.1, + "inherit_function": "0.1 if support_type == 'everywhere' else 0", + "type": "float", + "enabled": "support_enable and support_type == 'everywhere'" + } + } + }, + "support_bottom_stair_step_height": + { + "label": "Support Stair Step Height", + "description": "The height of the steps of the stair-like bottom of support resting on the model. A low value makes the support harder to remove, but too high values can lead to unstable support structures.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0", + "maximum_value_warning": "1.0", + "enabled": "support_enable" + }, + "support_join_distance": + { + "label": "Support Join Distance", + "description": "The maximum distance between support structures in the X/Y directions. When seperate structures are closer together than this value, the structures merge into one.", + "unit": "mm", + "type": "float", + "default_value": 2.0, + "minimum_value_warning": "0", + "maximum_value_warning": "10", + "enabled": "support_enable" + }, + "support_offset": + { + "label": "Support Horizontal Expansion", + "description": "Amount of offset applied to all support polygons in each layer. Positive values can smooth out the support areas and result in more sturdy support.", + "unit": "mm", + "type": "float", + "default_value": 0.2, + "minimum_value_warning": "-0.5", + "maximum_value_warning": "5.0", + "enabled": "support_enable" + }, + "support_area_smoothing": + { + "label": "Support Area Smoothing", + "description": "Maximum distance in the X/Y directions of a line segment which is to be smoothed out. Ragged lines are introduced by the join distance and support bridge, which cause the machine to resonate. Smoothing the support areas won't cause them to break with the constraints, except it might change the overhang.", + "unit": "mm", + "type": "float", + "default_value": 0.6, + "minimum_value": "0", + "maximum_value_warning": "1.0", + "enabled": "support_enable" + }, + "support_roof_enable": + { + "label": "Enable Support Roof", + "description": "Generate a dense top skin at the top of the support on which the model is printed.", + "type": "bool", + "default_value": false, + "visible": true, + "enabled": "support_enable" + }, + "support_roof_height": + { + "label": "Support Roof Thickness", + "description": "The thickness of the support roofs.", + "unit": "mm", + "type": "float", + "default_value": 1, + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "support_roof_enable" + }, + "support_roof_density": + { + "label": "Support Roof Density", + "description": "Adjusts the density of the roof of the support structure. A higher value results in better overhangs, but the supports are harder to remove.", + "unit": "%", + "type": "float", + "default_value": 100, + "minimum_value": "0", + "maximum_value_warning": "100", + "enabled":"support_roof_enable", + "global_only": true, + "children": + { + "support_roof_line_distance": + { + "label": "Support Roof Line Distance", + "description": "Distance between the printed support roof lines. This setting is calculated by the support roof Density, but can be adjusted separately.", + "unit": "mm", + "type": "float", + "default_value": 0.4, + "minimum_value": "0", + "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", + "enabled": "support_roof_enable", + "global_only": true + } + } + }, + "support_roof_pattern": + { + "label": "Support Roof Pattern", + "description": "The pattern with which the top of the support is printed.", + "type": "enum", + "options": + { + "lines": "Lines", + "grid": "Grid", + "triangles": "Triangles", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "concentric", + "enabled": "support_roof_enable", + "global_only": true + }, + "support_use_towers": + { + "label": "Use Towers", + "description": "Use specialized towers to support tiny overhang areas. These towers have a larger diameter than the region they support. Near the overhang the towers' diameter decreases, forming a roof.", + "type": "bool", + "default_value": true, + "enabled": "support_enable" + }, + "support_tower_diameter": + { + "label": "Tower Diameter", + "description": "The diameter of a special tower.", + "unit": "mm", + "type": "float", + "default_value": 3.0, + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "support_enable and support_use_towers" + }, + "support_minimal_diameter": + { + "label": "Minimum Diameter", + "description": "Minimum diameter in the X/Y directions of a small area which is to be supported by a specialized support tower.", + "unit": "mm", + "type": "float", + "default_value": 3.0, + "minimum_value": "0", + "maximum_value_warning": "10", + "maximum_value": "support_tower_diameter", + "inherit": true, + "enabled": "support_enable and support_use_towers" + }, + "support_tower_roof_angle": + { + "label": "Tower Roof Angle", + "description": "The angle of a rooftop of a tower. A higher value results in pointed tower roofs, a lower value results in flattened tower roofs.", + "unit": "°", + "type": "int", + "minimum_value": "0", + "maximum_value": "90", + "default_value": 65, + "enabled": "support_enable and support_use_towers" + } + } + }, + "platform_adhesion": + { + "label": "Platform Adhesion", + "type": "category", + "icon": "category_adhesion", + "description": "Adhesion", + "children": + { + "adhesion_type": + { + "label": "Platform Adhesion Type", + "description": "Different options that help to improve both priming your extrusion and adhesion to the build plate. Brim adds a single layer flat area around the base of your object to prevent warping. Raft adds a thick grid with a roof below the object. Skirt is a line printed around the object, but not connected to the model.", + "type": "enum", + "options": + { + "skirt": "Skirt", + "brim": "Brim", + "raft": "Raft" + }, + "default_value": "brim", + "global_only": "True" + }, + "skirt_line_count": + { + "label": "Skirt Line Count", + "description": "Multiple skirt lines help to prime your extrusion better for small objects. Setting this to 0 will disable the skirt.", + "type": "int", + "default_value": 1, + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "adhesion_type == \"skirt\"", + "global_only": "True" + }, + "skirt_gap": + { + "label": "Skirt Distance", + "description": "The horizontal distance between the skirt and the first layer of the print.\nThis is the minimum distance, multiple skirt lines will extend outwards from this distance.", + "unit": "mm", + "type": "float", + "default_value": 3, + "minimum_value_warning": "0", + "maximum_value_warning": "100", + "enabled": "adhesion_type == \"skirt\"", + "global_only": "True" + }, + "skirt_minimal_length": + { + "label": "Skirt Minimum Length", + "description": "The minimum length of the skirt. If this length is not reached by the skirt line count, more skirt lines will be added until the minimum length is reached. Note: If the line count is set to 0 this is ignored.", + "unit": "mm", + "type": "float", + "default_value": 250, + "minimum_value": "0", + "minimum_value_warning": "25", + "maximum_value_warning": "2500", + "enabled": "adhesion_type == \"skirt\"", + "global_only": "True" + }, + "brim_width": + { + "label": "Brim Width", + "description": "The distance from the model to the outermost brim line. A larger brim enhances adhesion to the build plate, but also reduces the effective print area.", + "type": "float", + "unit": "mm", + "default_value": 8.0, + "minimum_value": "0.0", + "maximum_value_warning": "100.0", + "enabled": "adhesion_type == \"brim\"", + "global_only": "True", + "children": + { + "brim_line_count": + { + "label": "Brim Line Count", + "description": "The number of lines used for a brim. More brim lines enhance adhesion to the build plate, but also reduces the effective print area.", + "type": "int", + "default_value": 20, + "minimum_value": "0", + "maximum_value_warning": "300", + "inherit_function": "math.ceil(parent_value / skirt_line_width)", + "enabled": "adhesion_type == \"brim\"", + "global_only": "True" + } + } + }, + "raft_margin": + { + "label": "Raft Extra Margin", + "description": "If the raft is enabled, this is the extra raft area around the object which is also given a raft. Increasing this margin will create a stronger raft while using more material and leaving less area for your print.", + "unit": "mm", + "type": "float", + "default_value": 5, + "minimum_value_warning": "0", + "maximum_value_warning": "10", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_airgap": + { + "label": "Raft Air Gap", + "description": "The gap between the final raft layer and the first layer of the object. Only the first layer is raised by this amount to lower the bonding between the raft layer and the object. Makes it easier to peel off the raft.", + "unit": "mm", + "type": "float", + "default_value": 0.35, + "minimum_value": "0", + "maximum_value_warning": "1.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_surface_layers": + { + "label": "Raft Top Layers", + "description": "The number of top layers on top of the 2nd raft layer. These are fully filled layers that the object sits on. 2 layers result in a smoother top surface than 1.", + "type": "int", + "default_value": 2, + "minimum_value": "0", + "maximum_value_warning": "20", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_surface_thickness": + { + "label": "Raft Top Layer Thickness", + "description": "Layer thickness of the top raft layers.", + "unit": "mm", + "type": "float", + "default_value": 0.1, + "minimum_value": "0", + "maximum_value_warning": "2.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_surface_line_width": + { + "label": "Raft Top Line Width", + "description": "Width of the lines in the top surface of the raft. These can be thin lines so that the top of the raft becomes smooth.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0.0001", + "maximum_value_warning": "machine_nozzle_size * 2", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_surface_line_spacing": + { + "label": "Raft Top Spacing", + "description": "The distance between the raft lines for the top raft layers. The spacing should be equal to the line width, so that the surface is solid.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0.0001", + "maximum_value_warning": "5.0", + "enabled": "adhesion_type == \"raft\"", + "inherit_function": "raft_surface_line_width", + "global_only": "True" + }, + "raft_interface_thickness": + { + "label": "Raft Middle Thickness", + "description": "Layer thickness of the middle raft layer.", + "unit": "mm", + "type": "float", + "default_value": 0.27, + "minimum_value": "0", + "maximum_value_warning": "5.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_interface_line_width": + { + "label": "Raft Middle Line Width", + "description": "Width of the lines in the middle raft layer. Making the second layer extrude more causes the lines to stick to the bed.", + "unit": "mm", + "type": "float", + "default_value": 1, + "inherit_function": "line_width", + "minimum_value": "0.0001", + "maximum_value_warning": "machine_nozzle_size * 2", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_interface_line_spacing": + { + "label": "Raft Middle Spacing", + "description": "The distance between the raft lines for the middle raft layer. The spacing of the middle should be quite wide, while being dense enough to support the top raft layers.", + "unit": "mm", + "type": "float", + "default_value": 1.0, + "minimum_value": "0", + "maximum_value_warning": "15.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_base_thickness": + { + "label": "Raft Base Thickness", + "description": "Layer thickness of the base raft layer. This should be a thick layer which sticks firmly to the printer bed.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0", + "maximum_value_warning": "5.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_base_line_width": + { + "label": "Raft Base Line Width", + "description": "Width of the lines in the base raft layer. These should be thick lines to assist in bed adhesion.", + "unit": "mm", + "type": "float", + "default_value": 1, + "minimum_value": "0.0001", + "inherit_function": "line_width", + "maximum_value_warning": "machine_nozzle_size * 2", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_base_line_spacing": + { + "label": "Raft Line Spacing", + "description": "The distance between the raft lines for the base raft layer. Wide spacing makes for easy removal of the raft from the build plate.", + "unit": "mm", + "type": "float", + "default_value": 3.0, + "minimum_value": "0.0001", + "maximum_value_warning": "100", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_speed": + { + "label": "Raft Print Speed", + "description": "The speed at which the raft is printed.", + "unit": "mm/s", + "type": "float", + "default_value": 30, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "200", + "enabled": "adhesion_type == \"raft\"", + "inherit_function": "speed_print / 60 * 30", + "global_only": "True", + "children": + { + "raft_surface_speed": + { + "label": "Raft Surface Print Speed", + "description": "The speed at which the surface raft layers are printed. These should be printed a bit slower, so that the nozzle can slowly smooth out adjacent surface lines.", + "unit": "mm/s", + "type": "float", + "default_value": 30, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "enabled": "adhesion_type == \"raft\"", + "inherit_function": "parent_value", + "global_only": "True" + }, + "raft_interface_speed": + { + "label": "Raft Interface Print Speed", + "description": "The speed at which the interface raft layer is printed. This should be printed quite slowly, as the volume of material coming out of the nozzle is quite high.", + "unit": "mm/s", + "type": "float", + "default_value": 15, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "enabled": "adhesion_type == \"raft\"", + "inherit_function": "0.5 * parent_value", + "global_only": "True" + }, + "raft_base_speed": + { + "label": "Raft Base Print Speed", + "description": "The speed at which the base raft layer is printed. This should be printed quite slowly, as the volume of material coming out of the nozzle is quite high.", + "unit": "mm/s", + "type": "float", + "default_value": 15, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "200", + "enabled": "adhesion_type == \"raft\"", + "inherit_function": "0.5 * parent_value", + "global_only": "True" + } + } + }, + "raft_fan_speed": + { + "label": "Raft Fan Speed", + "description": "The fan speed for the raft.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "global_only": "True", + "enabled": "adhesion_type == \"raft\"", + "children": + { + "raft_surface_fan_speed": + { + "label": "Raft Surface Fan Speed", + "description": "The fan speed for the surface raft layers.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "global_only": "True", + "inherit": true, + "enabled": "adhesion_type == \"raft\"" + }, + "raft_interface_fan_speed": + { + "label": "Raft Interface Fan Speed", + "description": "The fan speed for the interface raft layer.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "global_only": "True", + "inherit": true, + "enabled": "adhesion_type == \"raft\"" + }, + "raft_base_fan_speed": + { + "label": "Raft Base Fan Speed", + "description": "The fan speed for the base raft layer.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "global_only": "True", + "inherit": true, + "enabled": "adhesion_type == \"raft\"" + } + } + } + } + }, + "meshfix": + { + "label": "Mesh Fixes", + "type": "category", + "icon": "category_fixes", + "description": "category_fixes", + "children": + { + "meshfix_union_all": + { + "label": "Union Overlapping Volumes", + "description": "Ignore the internal geometry arising from overlapping volumes and print the volumes as one. This may cause internal cavities to disappear.", + "type": "bool", + "default_value": true + }, + "meshfix_union_all_remove_holes": + { + "label": "Remove All Holes", + "description": "Remove the holes in each layer and keep only the outside shape. This will ignore any invisible internal geometry. However, it also ignores layer holes which can be viewed from above or below.", + "type": "bool", + "default_value": false + }, + "meshfix_extensive_stitching": + { + "label": "Extensive Stitching", + "description": "Extensive stitching tries to stitch up open holes in the mesh by closing the hole with touching polygons. This option can introduce a lot of processing time.", + "type": "bool", + "default_value": false + }, + "meshfix_keep_open_polygons": + { + "label": "Keep Disconnected Faces", + "description": "Normally Cura tries to stitch up small holes in the mesh and remove parts of a layer with big holes. Enabling this option keeps those parts which cannot be stitched. This option should be used as a last resort option when everything else fails to produce proper GCode.", + "type": "bool", + "default_value": false + } + } + }, + "blackmagic": + { + "label": "Special Modes", + "type": "category", + "icon": "category_blackmagic", + "description": "category_blackmagic", + "children": + { + "print_sequence": + { + "label": "Print Sequence", + "description": "Whether to print all objects one layer at a time or to wait for one object to finish, before moving on to the next. One at a time mode is only possible if all models are separated in such a way that the whole print head can move in between and all models are lower than the distance between the nozzle and the X/Y axes.", + "type": "enum", + "options": + { + "all_at_once": "All at Once", + "one_at_a_time": "One at a Time" + }, + "default_value": "all_at_once", + "global_only": true + }, + "magic_mesh_surface_mode": + { + "label": "Surface Mode", + "description": "Treat the model as a surface only, a volume, or volumes with loose surfaces. The normal print mode only prints enclosed volumes. \"Surface\" prints a single wall tracing the mesh surface with no infill and no top/bottom skin. \"Both\" prints enclosed volumes like normal and any remaining polygons as surfaces.", + "type": "enum", + "options": + { + "normal": "Normal", + "surface": "Surface", + "both": "Both" + }, + "default_value": "normal" + }, + "magic_spiralize": + { + "label": "Spiralize Outer Contour", + "description": "Spiralize smooths out the Z move of the outer edge. This will create a steady Z increase over the whole print. This feature turns a solid object into a single walled print with a solid bottom. This feature used to be called Joris in older versions.", + "type": "bool", + "default_value": false, + "global_only": "True" + } + } + }, + "blackmagic": + { + "label": "Experimental Modes", + "type": "category", + "icon": "category_blackmagic", + "description": "category_blackmagic", + "children": + { + "draft_shield_enabled": + { + "label": "Enable Draft Shield", + "description": "This will create a wall around the object, which traps (hot) air and shields against exterior airflow. Especially useful for materials which warp easily.", + "type": "bool", + "default_value": false, + "global_only": true + }, + "draft_shield_dist": + { + "label": "Draft Shield X/Y Distance", + "description": "Distance of the draft shield from the print, in the X/Y directions.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "100", + "default_value": 10, + "enabled": "draft_shield_enabled", + "global_only": true + }, + "draft_shield_height_limitation": + { + "label": "Draft Shield Limitation", + "description": "Set the height of the draft shield. Choose to print the draft shield at the full height of the object or at a limited height.", + "type": "enum", + "options": + { + "full": "Full", + "limited": "Limited" + }, + "default_value": "full", + "enabled": "draft_shield_enabled", + "global_only": true + }, + "draft_shield_height": + { + "label": "Draft Shield Height", + "description": "Height limitation of the draft shield. Above this height no draft shield will be printed.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "9999", + "default_value": 0, + "inherit_function": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", + "enabled": "draft_shield_height_limitation == \"limited\"", + "global_only": true + }, + "coasting_enable": + { + "label": "Enable Coasting", + "description": "Coasting replaces the last part of an extrusion path with a travel path. The oozed material is used to print the last piece of the extrusion path in order to reduce stringing.", + "type": "bool", + "default_value": false, + "global_only": true + }, + "coasting_volume": + { + "label": "Coasting Volume", + "description": "The volume otherwise oozed. This value should generally be close to the nozzle diameter cubed.", + "unit": "mm³", + "type": "float", + "default_value": 0.064, + "minimum_value": "0", + "maximum_value_warning": "2.0", + "inherit": false, + "enabled": "coasting_enable", + "global_only": true + }, + "coasting_min_volume": + { + "label": "Minimum Volume Before Coasting", + "description": "The smallest volume an extrusion path should have before allowing coasting. For smaller extrusion paths, less pressure has been built up in the bowden tube and so the coasted volume is scaled linearly. This value should always be larger than the Coasting Volume.", + "unit": "mm³", + "type": "float", + "default_value": 0.8, + "minimum_value": "0", + "maximum_value_warning": "10.0", + "enabled": "coasting_enable", + "global_only": true + }, + "coasting_speed": + { + "label": "Coasting Speed", + "description": "The speed by which to move during coasting, relative to the speed of the extrusion path. A value slightly under 100% is advised, since during the coasting move the pressure in the bowden tube drops.", + "unit": "%", + "type": "float", + "default_value": 90, + "minimum_value": "0.0001", + "maximum_value_warning": "100", + "inherit": false, + "enabled": "coasting_enable", + "global_only": true + }, + "skin_outline_count": + { + "label": "Extra Skin Wall Count", + "description": "Replaces the outermost part of the top/bottom pattern with a number of concentric lines. Using one or two lines improves roofs that start on infill material.", + "default_value": 0, + "minimum_value": "0", + "maximum_value_warning": "10", + "type": "int" + }, + "skin_alternate_rotation": + { + "label": "Alternate Skin Rotation", + "description": "Alternate the direction in which the top/bottom layers are printed. Normally they are printed diagonally only. This setting adds the X-only and Y-only directions.", + "type": "bool", + "default_value": false, + "enabled": "top_bottom_pattern != \"concentric\"" + }, + "support_conical_enabled": + { + "label": "Enable Conical Support", + "description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.", + "type": "bool", + "default_value": false, + "enabled": "support_enable" + }, + "support_conical_angle": + { + "label": "Conical Support Angle", + "description": "The angle of the tilt of conical support. With 0 degrees being vertical, and 90 degrees being horizontal. Smaller angles cause the support to be more sturdy, but consist of more material. Negative angles cause the base of the support to be wider than the top.", + "unit": "°", + "type": "float", + "minimum_value": "-90", + "minimum_value_warning": "-45", + "maximum_value_warning": "45", + "maximum_value": "90", + "default_value": 30, + "enabled": "support_conical_enabled and support_enable" + }, + "support_conical_min_width": + { + "label": "Conical Support Minimum Width", + "description": "Minimum width to which the base of the conical support area is reduced. Small widths can lead to unstable support structures.", + "unit": "mm", + "default_value": 5.0, + "minimum_value": "0", + "minimum_value_warning": "machine_nozzle_size * 3", + "maximum_value_warning": "100.0", + "type": "float", + "enabled": "support_conical_enabled and support_enable" + }, + "magic_fuzzy_skin_enabled": + { + "label": "Fuzzy Skin", + "description": "Randomly jitter while printing the outer wall, so that the surface has a rough and fuzzy look.", + "type": "bool", + "default_value": false + }, + "magic_fuzzy_skin_thickness": + { + "label": "Fuzzy Skin Thickness", + "description": "The width within which to jitter. It's advised to keep this below the outer wall width, since the inner walls are unaltered.", + "type": "float", + "unit": "mm", + "default_value": 0.3, + "minimum_value": "0.001", + "maximum_value_warning": "wall_line_width_0", + "enabled": "magic_fuzzy_skin_enabled" + }, + "magic_fuzzy_skin_point_density": + { + "label": "Fuzzy Skin Density", + "description": "The average density of points introduced on each polygon in a layer. Note that the original points of the polygon are discarded, so a low density results in a reduction of the resolution.", + "type": "float", + "unit": "1/mm", + "default_value": 1.25, + "minimum_value": "0.008", + "minimum_value_warning": "0.1", + "maximum_value_warning": "10", + "maximum_value": "2 / magic_fuzzy_skin_thickness", + "enabled": "magic_fuzzy_skin_enabled", + "children": + { + "magic_fuzzy_skin_point_dist": + { + "label": "Fuzzy Skin Point Distance", + "description": "The average distance between the random points introduced on each line segment. Note that the original points of the polygon are discarded, so a high smoothness results in a reduction of the resolution. This value must be higher than half the Fuzzy Skin Thickness.", + "type": "float", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "magic_fuzzy_skin_thickness / 2", + "minimum_value_warning": "0.1", + "maximum_value_warning": "10", + "inherit_function": "10000 if parent_value == 0 else 1 / parent_value", + "enabled": "magic_fuzzy_skin_enabled" + } + } + }, + "wireframe_enabled": + { + "label": "Wire Printing", + "description": "Print only the outside surface with a sparse webbed structure, printing 'in thin air'. This is realized by horizontally printing the contours of the model at given Z intervals which are connected via upward and diagonally downward lines.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "wireframe_height": + { + "label": "WP Connection Height", + "description": "The height of the upward and diagonally downward lines between two horizontal parts. This determines the overall density of the net structure. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 3, + "minimum_value": "0.0001", + "maximum_value_warning": "20", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_roof_inset": + { + "label": "WP Roof Inset Distance", + "description": "The distance covered when making a connection from a roof outline inward. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 3, + "minimum_value": "0", + "minimum_value_warning": "machine_nozzle_size", + "maximum_value_warning": "20", + "enabled": "wireframe_enabled", + "inherit_function": "wireframe_height", + "global_only": "True" + }, + "wireframe_printspeed": + { + "label": "WP Speed", + "description": "Speed at which the nozzle moves when extruding material. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "50", + "enabled": "wireframe_enabled", + "global_only": "True", + "children": + { + "wireframe_printspeed_bottom": + { + "label": "WP Bottom Printing Speed", + "description": "Speed of printing the first layer, which is the only layer touching the build platform. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "50", + "visible": false, + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_printspeed_up": + { + "label": "WP Upward Printing Speed", + "description": "Speed of printing a line upward 'in thin air'. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "50", + "visible": false, + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_printspeed_down": + { + "label": "WP Downward Printing Speed", + "description": "Speed of printing a line diagonally downward. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "50", + "visible": false, + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_printspeed_flat": + { + "label": "WP Horizontal Printing Speed", + "description": "Speed of printing the horizontal contours of the object. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "inherit": true, + "enabled": "wireframe_enabled", + "global_only": "True" + } + } + }, + "wireframe_flow": + { + "label": "WP Flow", + "description": "Flow compensation: the amount of material extruded is multiplied by this value. Only applies to Wire Printing.", + "unit": "%", + "default_value": 100, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "float", + "enabled": "wireframe_enabled", + "global_only": "True", + "children": + { + "wireframe_flow_connection": + { + "label": "WP Connection Flow", + "description": "Flow compensation when going up or down. Only applies to Wire Printing.", + "unit": "%", + "default_value": 100, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "float", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_flow_flat": + { + "label": "WP Flat Flow", + "description": "Flow compensation when printing flat lines. Only applies to Wire Printing.", + "unit": "%", + "default_value": 100, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "float", + "enabled": "wireframe_enabled", + "global_only": "True" + } + } + }, + "wireframe_top_delay": + { + "label": "WP Top Delay", + "description": "Delay time after an upward move, so that the upward line can harden. Only applies to Wire Printing.", + "unit": "sec", + "type": "float", + "default_value": 0, + "minimum_value": "0", + "maximum_value_warning": "1", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_bottom_delay": + { + "label": "WP Bottom Delay", + "description": "Delay time after a downward move. Only applies to Wire Printing.", + "unit": "sec", + "type": "float", + "default_value": 0, + "minimum_value": "0", + "maximum_value_warning": "1", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_flat_delay": + { + "label": "WP Flat Delay", + "description": "Delay time between two horizontal segments. Introducing such a delay can cause better adhesion to previous layers at the connection points, while too long delays cause sagging. Only applies to Wire Printing.", + "unit": "sec", + "type": "float", + "default_value": 0.1, + "minimum_value": "0", + "maximum_value_warning": "0.5", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_up_half_speed": + { + "label": "WP Ease Upward", + "description": "Distance of an upward move which is extruded with half speed.\nThis can cause better adhesion to previous layers, while not heating the material in those layers too much. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.3, + "minimum_value": "0", + "maximum_value_warning": "5.0", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_top_jump": + { + "label": "WP Knot Size", + "description": "Creates a small knot at the top of an upward line, so that the consecutive horizontal layer has a better chance to connect to it. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.6, + "minimum_value": "0", + "maximum_value_warning": "2.0", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_fall_down": + { + "label": "WP Fall Down", + "description": "Distance with which the material falls down after an upward extrusion. This distance is compensated for. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.5, + "minimum_value": "0", + "maximum_value_warning": "wireframe_height", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_drag_along": + { + "label": "WP Drag Along", + "description": "Distance with which the material of an upward extrusion is dragged along with the diagonally downward extrusion. This distance is compensated for. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.6, + "minimum_value": "0", + "maximum_value_warning": "wireframe_height", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_strategy": + { + "label": "WP Strategy", + "description": "Strategy for making sure two consecutive layers connect at each connection point. Retraction lets the upward lines harden in the right position, but may cause filament grinding. A knot can be made at the end of an upward line to heighten the chance of connecting to it and to let the line cool; however, it may require slow printing speeds. Another strategy is to compensate for the sagging of the top of an upward line; however, the lines won't always fall down as predicted.", + "type": "enum", + "options": + { + "compensate": "Compensate", + "knot": "Knot", + "retract": "Retract" + }, + "default_value": "compensate", + "visible": false, + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_straight_before_down": + { + "label": "WP Straighten Downward Lines", + "description": "Percentage of a diagonally downward line which is covered by a horizontal line piece. This can prevent sagging of the top most point of upward lines. Only applies to Wire Printing.", + "type": "float", + "unit": "%", + "default_value": 20, + "minimum_value": "0", + "maximum_value": "100", + "visible": false, + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_roof_fall_down": + { + "label": "WP Roof Fall Down", + "description": "The distance which horizontal roof lines printed 'in thin air' fall down when being printed. This distance is compensated for. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 2, + "minimum_value_warning": "0", + "maximum_value_warning": "wireframe_roof_inset", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_roof_drag_along": + { + "label": "WP Roof Drag Along", + "description": "The distance of the end piece of an inward line which gets dragged along when going back to the outer outline of the roof. This distance is compensated for. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_roof_outer_delay": + { + "label": "WP Roof Outer Delay", + "description": "Time spent at the outer perimeters of hole which is to become a roof. Longer times can ensure a better connection. Only applies to Wire Printing.", + "type": "float", + "unit": "sec", + "default_value": 0.2, + "minimum_value": "0", + "maximum_value_warning": "2.0", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_nozzle_clearance": + { + "label": "WP Nozzle Clearance", + "description": "Distance between the nozzle and horizontally downward lines. Larger clearance results in diagonally downward lines with a less steep angle, which in turn results in less upward connections with the next layer. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 1, + "minimum_value_warning": "0", + "maximum_value_warning": "10.0", + "enabled": "wireframe_enabled", + "global_only": "True" + } + } + } + } +} From 9b1f560935da77757b057ec6ab929ad95191b4dc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 2 May 2016 16:47:15 +0200 Subject: [PATCH 105/424] Removed last stray visible properties CURA-1278 --- resources/machines/fdmprinter.def.json | 28 +++----------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/resources/machines/fdmprinter.def.json b/resources/machines/fdmprinter.def.json index 3d39e8a652..b44d720d33 100644 --- a/resources/machines/fdmprinter.def.json +++ b/resources/machines/fdmprinter.def.json @@ -4,8 +4,7 @@ "metadata": { "category": "Ultimaker", - "manufacturer": "Ultimaker", - "visible": false + "manufacturer": "Ultimaker" }, "name": "FDM Printer Base Description", "author": "Ultimaker B.V.", @@ -215,7 +214,6 @@ "default_value": 0.4, "minimum_value": "0.001", "maximum_value_warning": "10", - "visible": false } } }, @@ -366,7 +364,6 @@ "shell": { "label": "Shell", - "visible": true, "icon": "category_shell", "description": "Shell", "type": "category", @@ -683,7 +680,6 @@ "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", "type": "bool", "default_value": false, - "visible": false, "enabled": "False", "global_only": true }, @@ -717,8 +713,7 @@ "maximum_value_warning": "10.0", "global_only": "True", "enabled": "False", - "enabled_before_removal": "material_flow_dependent_temperature or machine_extruder_count > 1", - "visible": false + "enabled_before_removal": "material_flow_dependent_temperature or machine_extruder_count > 1" }, "material_bed_temperature": { "label": "Bed Temperature", @@ -756,8 +751,7 @@ "label": "Enable Retraction", "description": "Retract the filament when the nozzle is moving over a non-printed area. ", "type": "bool", - "default_value": true, - "visible": true + "default_value": true }, "retraction_amount": { "label": "Retraction Distance", @@ -767,7 +761,6 @@ "default_value": 6.5, "minimum_value_warning": "-0.0001", "maximum_value_warning": "10.0", - "visible": false, "inherit": false, "enabled": "retraction_enable" }, @@ -780,7 +773,6 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "visible": false, "inherit": false, "enabled": "retraction_enable", "children": { @@ -793,7 +785,6 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "visible": false, "enabled": "retraction_enable" }, "retraction_prime_speed": { @@ -805,7 +796,6 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "visible": false, "enabled": "retraction_enable" } } @@ -818,7 +808,6 @@ "default_value": 0, "minimum_value_warning": "-0.0001", "maximum_value_warning": "5.0", - "visible": false, "inherit": false, "enabled": "retraction_enable" }, @@ -831,7 +820,6 @@ "inherit_function": "line_width * 2", "minimum_value": "0", "maximum_value_warning": "10", - "visible": false, "inherit": false, "enabled": "retraction_enable" }, @@ -842,7 +830,6 @@ "minimum_value": "0", "maximum_value_warning": "100", "type": "int", - "visible": false, "inherit": false, "enabled": "retraction_enable" }, @@ -854,7 +841,6 @@ "default_value": 4.5, "minimum_value": "0", "maximum_value_warning": "retraction_amount * 2", - "visible": false, "inherit_function": "retraction_amount", "enabled": "retraction_enable" }, @@ -912,7 +898,6 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 30, - "visible": false, "inherit_function": "parent_value / 2", "children": { @@ -1134,7 +1119,6 @@ "maximum_value": "100", "inherit_function": "parent_value", "default_value": 100, - "visible": false, "enabled": "cool_fan_enabled", "global_only": "True" }, @@ -1411,7 +1395,6 @@ "description": "Generate a dense top skin at the top of the support on which the model is printed.", "type": "bool", "default_value": false, - "visible": true, "enabled": "support_enable" }, "support_roof_height": @@ -2198,7 +2181,6 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "50", - "visible": false, "enabled": "wireframe_enabled", "global_only": "True" }, @@ -2212,7 +2194,6 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "50", - "visible": false, "enabled": "wireframe_enabled", "global_only": "True" }, @@ -2226,7 +2207,6 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "50", - "visible": false, "enabled": "wireframe_enabled", "global_only": "True" }, @@ -2381,7 +2361,6 @@ "retract": "Retract" }, "default_value": "compensate", - "visible": false, "enabled": "wireframe_enabled", "global_only": "True" }, @@ -2394,7 +2373,6 @@ "default_value": 20, "minimum_value": "0", "maximum_value": "100", - "visible": false, "enabled": "wireframe_enabled", "global_only": "True" }, From ad506be34cf455409e31557ac9294b769bf6fb21 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 2 May 2016 16:48:58 +0200 Subject: [PATCH 106/424] Formatting CURA-1278 --- resources/machines/fdmprinter.def.json | 77 +++++++++++++++++--------- 1 file changed, 51 insertions(+), 26 deletions(-) diff --git a/resources/machines/fdmprinter.def.json b/resources/machines/fdmprinter.def.json index b44d720d33..db7bcfb864 100644 --- a/resources/machines/fdmprinter.def.json +++ b/resources/machines/fdmprinter.def.json @@ -19,142 +19,163 @@ "description": "Machine specific settings", "children": { - "machine_show_variants": { + "machine_show_variants": + { "description": "Whether to show the different variants of this machine, which are described in separate json files.", "default_value": false, "type": "bool", "label": "Show machine variants" }, - "machine_start_gcode": { + "machine_start_gcode": + { "description": "Gcode commands to be executed at the very start - separated by \\n.", "default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0", "label": "Start GCode", "global_only": true, "type": "str" }, - "machine_end_gcode": { + "machine_end_gcode": + { "description": "Gcode commands to be executed at the very end - separated by \\n.", "default_value": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84", "label": "End GCode", "global_only": true, "type": "str" }, - "material_bed_temp_wait": { + "material_bed_temp_wait": + { "description": "Whether to insert a command to wait until the bed temperature is reached at the start.", "label": "Wait for bed heatup", "default_value": true, "global_only": true, "type": "bool" }, - "material_print_temp_prepend": { + "material_print_temp_prepend": + { "description": "Whether to include nozzle temperature commands at the start of the gcode. When the start_gcode already contains nozzle temperature commands Cura frontend will automatically disable this setting.", "default_value": true, "global_only": true, "type": "bool", "label": "Wait for material heatup" }, - "machine_width": { + "machine_width": + { "description": "The width (X-direction) of the printable area.", "default_value": 100, "global_only": true, "type": "float", "label": "Machine width" }, - "machine_depth": { + "machine_depth": + { "description": "The depth (Y-direction) of the printable area.", "default_value": 100, "global_only": true, "type": "float", "label": "Machine depth" }, - "machine_height": { + "machine_height": + { "description": "The height (Z-direction) of the printable area.", "default_value": 100, "global_only": true, "type": "float", "label": "Machine height" }, - "machine_heated_bed": { + "machine_heated_bed": + { "description": "Whether the machine has a heated bed present.", "default_value": false, "global_only": true, "label": "Has heated bed", "type": "bool" }, - "machine_center_is_zero": { + "machine_center_is_zero": + { "description": "Whether the X/Y coordinates of the zero position of the printer is at the center of the printable area.", "default_value": false, "global_only": true, "type": "bool", "label": "Is center origin" }, - "machine_extruder_count": { + "machine_extruder_count": + { "description": "Number of extruder trains. An extruder train is the combination of a feeder, bowden tube, and nozzle.", "default_value": 1, "global_only": true, "type": "bool", "label": "Number extruders" }, - "machine_nozzle_tip_outer_diameter": { + "machine_nozzle_tip_outer_diameter": + { "description": "The outer diameter of the tip of the nozzle.", "label": "Outer nozzle diameter", "default_value": 1, "global_only": true, "type": "float" }, - "machine_nozzle_head_distance": { + "machine_nozzle_head_distance": + { "description": "The height difference between the tip of the nozzle and the lowest part of the print head.", "default_value": 3, "global_only": true, "type": "float", "label": "Nozzle length" }, - "machine_nozzle_expansion_angle": { + "machine_nozzle_expansion_angle": + { "description": "The angle between the horizontal plane and the conical part right above the tip of the nozzle.", "default_value": 45, "global_only": true, "type": "int", "label": "Nozzle angle" }, - "machine_heat_zone_length": { + "machine_heat_zone_length": + { "description": "The distance from the tip of the nozzle in which heat from the nozzle is transfered to the filament.", "default_value": 16, "global_only": true, "type": "float", "label": "Heat zone length" }, - "machine_nozzle_heat_up_speed": { + "machine_nozzle_heat_up_speed": + { "description": "The speed (°C/s) by which the nozzle heats up averaged over the window of normal printing temperatures and the standby temperature.", "default_value": 2.0, "global_only": true, "type": "float", "label": "Heat up speed" }, - "machine_nozzle_cool_down_speed": { + "machine_nozzle_cool_down_speed": + { "description": "The speed (°C/s) by which the nozzle cools down averaged over the window of normal printing temperatures and the standby temperature.", "default_value": 2.0, "global_only": true, "type": "float", "label": "Cool down speed" }, - "machine_gcode_flavor": { + "machine_gcode_flavor": + { "description": "The type of gcode to be generated.", "default_value": "RepRap", "global_only": true, "type": "str", "label": "Gcode flavour" }, - "machine_disallowed_areas": { + "machine_disallowed_areas": + { "description": "A list of polygons with areas the print head is not allowed to enter.", "type": "polygons", "default_value": [], "global_only": true, "label": "Disallowed areas" }, - "machine_head_polygon": { + "machine_head_polygon": + { "description": "A 2D silhouette of the print head (fan caps excluded).", "type": "polygon", - "default_value": [ + "default_value": + [ [ -1, 1 @@ -175,10 +196,12 @@ "global_only": true, "label": "Machine head polygon" }, - "machine_head_with_fans_polygon": { + "machine_head_with_fans_polygon": + { "description": "A 2D silhouette of the print head (fan caps included).", "type": "polygon", - "default_value": [ + "default_value": + [ [ -20, 10 @@ -199,21 +222,23 @@ "global_only": true, "label": "Machine head & Fan polygon" }, - "gantry_height": { + "gantry_height": + { "description": "The height difference between the tip of the nozzle and the gantry system (X and Y axes).", "default_value": 99999999999, "global_only": true, "label": "Gantry height", "type": "float" }, - "machine_nozzle_size": { + "machine_nozzle_size": + { "label": "Nozzle Diameter", "description": "The inner diameter of the nozzle. Change this setting when using a non-standard nozzle size.", "unit": "mm", "type": "float", "default_value": 0.4, "minimum_value": "0.001", - "maximum_value_warning": "10", + "maximum_value_warning": "10" } } }, From 1eab26dcc02d1a09186aa21efebc8bf6e0e9f902 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 3 May 2016 09:23:20 +0200 Subject: [PATCH 107/424] Added invisible to metadata again CURA-1278 --- resources/machines/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/machines/fdmprinter.def.json b/resources/machines/fdmprinter.def.json index db7bcfb864..3bf66226f5 100644 --- a/resources/machines/fdmprinter.def.json +++ b/resources/machines/fdmprinter.def.json @@ -4,12 +4,12 @@ "metadata": { "category": "Ultimaker", - "manufacturer": "Ultimaker" + "manufacturer": "Ultimaker", + "visible": false }, "name": "FDM Printer Base Description", "author": "Ultimaker B.V.", "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", - "settings": { "machine_settings": From c69652531753364a8d326848a1448f0b54807068 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 3 May 2016 11:38:59 +0200 Subject: [PATCH 108/424] Updated inherit function to value (and in cases where there was implicit inheritance made it explicit) CURA-1278 --- resources/machines/fdmprinter.def.json | 175 +++++++++++++------------ 1 file changed, 94 insertions(+), 81 deletions(-) diff --git a/resources/machines/fdmprinter.def.json b/resources/machines/fdmprinter.def.json index 3bf66226f5..cf92aa847f 100644 --- a/resources/machines/fdmprinter.def.json +++ b/resources/machines/fdmprinter.def.json @@ -284,7 +284,7 @@ "maximum_value_warning": "2 * machine_nozzle_size", "default_value": 0.4, "type": "float", - "inherit_function": "machine_nozzle_size", + "value": "machine_nozzle_size", "children": { "wall_line_width": @@ -295,6 +295,7 @@ "minimum_value": "0.0001", "minimum_value_warning": "0.2", "maximum_value_warning": "5", + "value":"line_width", "default_value": 0.4, "type": "float", "children": @@ -308,6 +309,7 @@ "minimum_value_warning": "0.2", "maximum_value_warning": "5", "default_value": 0.4, + "value":"wall_line_width", "type": "float" }, "wall_line_width_x": @@ -319,6 +321,7 @@ "minimum_value_warning": "0.2", "maximum_value_warning": "5", "default_value": 0.4, + "value":"wall_line_width", "type": "float" } } @@ -332,7 +335,8 @@ "minimum_value_warning": "0.2", "maximum_value_warning": "5", "default_value": 0.4, - "type": "float" + "type": "float", + "value": "line_width" }, "infill_line_width": { @@ -343,7 +347,8 @@ "minimum_value_warning": "0.2", "maximum_value_warning": "5", "default_value": 0.4, - "type": "float" + "type": "float", + "value": "line_width" }, "skirt_line_width": { @@ -355,7 +360,8 @@ "maximum_value_warning": "5", "default_value": 0.4, "type": "float", - "global_only": true + "global_only": true, + "value": "line_width" }, "support_line_width": { @@ -368,7 +374,8 @@ "default_value": 0.4, "type": "float", "enabled": "support_enable", - "global_only": true + "global_only": true, + "value": "line_width" }, "support_roof_line_width": { @@ -380,7 +387,8 @@ "maximum_value_warning": "machine_nozzle_size * 2", "type": "float", "enabled": "support_roof_enable", - "global_only": true + "global_only": true, + "value": "line_width" } } } @@ -413,7 +421,7 @@ "default_value": 2, "minimum_value": "0", "type": "int", - "inherit_function": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" + "value": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" } } }, @@ -438,6 +446,7 @@ "minimum_value": "0", "maximum_value_warning": "100", "type": "float", + "value": "top_bottom_thickness", "children": { "top_layers": @@ -448,7 +457,7 @@ "minimum_value": "0", "maximum_value_warning": "100", "type": "int", - "inherit_function": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + "value": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" } } }, @@ -460,6 +469,7 @@ "default_value": 0.6, "minimum_value": "0", "type": "float", + "value": "top_bottom_thickness", "children": { "bottom_layers": @@ -469,7 +479,7 @@ "minimum_value": "0", "default_value": 6, "type": "int", - "inherit_function": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + "value": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" } } } @@ -495,7 +505,7 @@ "unit": "mm", "type": "float", "default_value": 0.0, - "inherit_function": "(machine_nozzle_size - wall_line_width_0) / 2 if wall_line_width_0 < machine_nozzle_size else 0", + "value": "(machine_nozzle_size - wall_line_width_0) / 2 if wall_line_width_0 < machine_nozzle_size else 0", "minimum_value_warning": "0", "maximum_value_warning": "machine_nozzle_size" }, @@ -504,8 +514,7 @@ "label": "Alternate Extra Wall", "description": "Prints an extra wall at every other layer. This way infill gets caught between these extra walls, resulting in stronger prints.", "type": "bool", - "default_value": false, - "inherit": false + "default_value": false }, "remove_overlapping_walls_enabled": { @@ -522,7 +531,7 @@ "description": "Remove parts of an outer wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin pieces in a model and sharp corners.", "type": "bool", "default_value": false, - "inherit": true, + "value": "remove_overlapping_walls_enabled", "enabled": "False" }, "remove_overlapping_walls_x_enabled": @@ -531,7 +540,7 @@ "description": "Remove parts of an inner wall that would otherwise overlap and cause over-extrusion. These overlaps occur in thin pieces in a model and sharp corners.", "type": "bool", "default_value": true, - "inherit": false + "value": "remove_overlapping_walls_enabled" } } }, @@ -615,7 +624,7 @@ "type": "float", "default_value": 2, "minimum_value": "0", - "inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" + "value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" } } }, @@ -633,7 +642,7 @@ "zigzag": "Zig Zag" }, "default_value": "grid", - "inherit_function": "'lines' if infill_sparse_density > 25 else 'grid'" + "value": "'lines' if infill_sparse_density > 25 else 'grid'" }, "infill_overlap": { @@ -642,7 +651,7 @@ "unit": "%", "type": "float", "default_value": 10, - "inherit_function": "10 if infill_sparse_density < 95 else 0", + "value": "10 if infill_sparse_density < 95 else 0", "minimum_value_warning": "-50", "maximum_value_warning": "100", "children": @@ -656,7 +665,7 @@ "default_value": 0.04, "minimum_value_warning": "-0.5 * machine_nozzle_size", "maximum_value_warning": "machine_nozzle_size", - "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 else 0" + "value": "infill_line_width * infill_overlap / 100 if infill_sparse_density < 95 else 0" } } }, @@ -667,7 +676,7 @@ "unit": "mm", "type": "float", "default_value": 0.04, - "inherit_function": "wall_line_width_0 / 4 if wall_line_count == 1 else wall_line_width_x / 4", + "value": "wall_line_width_0 / 4 if wall_line_count == 1 else wall_line_width_x / 4", "minimum_value_warning": "0", "maximum_value_warning": "machine_nozzle_size" }, @@ -681,7 +690,7 @@ "minimum_value": "0.0001", "maximum_value_warning": "0.32", "maximum_value": "layer_height * 8", - "inherit_function": "layer_height" + "value": "layer_height" }, "infill_before_walls": { @@ -700,7 +709,8 @@ "type": "category", "children": { - "material_flow_dependent_temperature": { + "material_flow_dependent_temperature": + { "label": "Auto Temperature", "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", "type": "bool", @@ -708,7 +718,8 @@ "enabled": "False", "global_only": true }, - "material_print_temperature": { + "material_print_temperature": + { "label": "Printing Temperature", "description": "The temperature used for printing. Set at 0 to pre-heat the printer manually.", "unit": "°C", @@ -718,14 +729,15 @@ "maximum_value_warning": "260", "enabled": "not (material_flow_dependent_temperature)" }, - "material_flow_temp_graph": { + "material_flow_temp_graph": + { "label": "Flow Temperature Graph", "description": "Data linking material flow (in mm3 per second) to temperature (degrees Celsius).", "unit": "", "type": "str", "default_value": "[[3.5,200],[7.0,240]]", "enabled": "False", - "enabled_before_removal": "material_flow_dependent_temperature", + "comments": "old enabled function: material_flow_dependent_temperature", "global_only": true }, "material_extrusion_cool_down_speed": { @@ -738,7 +750,7 @@ "maximum_value_warning": "10.0", "global_only": "True", "enabled": "False", - "enabled_before_removal": "material_flow_dependent_temperature or machine_extruder_count > 1" + "comments": "old enabled function: material_flow_dependent_temperature or machine_extruder_count > 1" }, "material_bed_temperature": { "label": "Bed Temperature", @@ -786,7 +798,6 @@ "default_value": 6.5, "minimum_value_warning": "-0.0001", "maximum_value_warning": "10.0", - "inherit": false, "enabled": "retraction_enable" }, "retraction_speed": { @@ -798,7 +809,6 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "inherit": false, "enabled": "retraction_enable", "children": { "retraction_retract_speed": { @@ -810,7 +820,8 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "enabled": "retraction_enable" + "enabled": "retraction_enable", + "value": "retraction_speed" }, "retraction_prime_speed": { "label": "Retraction Prime Speed", @@ -821,7 +832,8 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "enabled": "retraction_enable" + "enabled": "retraction_enable", + "value": "retraction_speed" } } }, @@ -833,7 +845,6 @@ "default_value": 0, "minimum_value_warning": "-0.0001", "maximum_value_warning": "5.0", - "inherit": false, "enabled": "retraction_enable" }, "retraction_min_travel": { @@ -842,10 +853,9 @@ "unit": "mm", "type": "float", "default_value": 1.5, - "inherit_function": "line_width * 2", + "value": "line_width * 2", "minimum_value": "0", "maximum_value_warning": "10", - "inherit": false, "enabled": "retraction_enable" }, "retraction_count_max": { @@ -855,7 +865,6 @@ "minimum_value": "0", "maximum_value_warning": "100", "type": "int", - "inherit": false, "enabled": "retraction_enable" }, "retraction_extrusion_window": { @@ -866,7 +875,7 @@ "default_value": 4.5, "minimum_value": "0", "maximum_value_warning": "retraction_amount * 2", - "inherit_function": "retraction_amount", + "value": "retraction_amount", "enabled": "retraction_enable" }, "retraction_hop": { @@ -877,7 +886,6 @@ "default_value": 0, "minimum_value_warning": "-0.0001", "maximum_value_warning": "10", - "inherit": false, "enabled": "retraction_enable" } } @@ -911,7 +919,8 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "150", - "default_value": 60 + "default_value": 60, + "value": "speed_print" }, "speed_wall": { @@ -923,7 +932,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 30, - "inherit_function": "parent_value / 2", + "value": "speed_print / 2", "children": { "speed_wall_0": @@ -935,7 +944,8 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "150", - "default_value": 30 + "default_value": 30, + "value": "speed_wall" }, "speed_wall_x": { @@ -947,7 +957,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 60, - "inherit_function": "parent_value * 2" + "value": "speed_wall * 2" } } }, @@ -961,7 +971,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 30, - "inherit_function": "parent_value / 2" + "value": "speed_print / 2" }, "speed_support": { @@ -973,7 +983,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 60, - "inherit_function": "speed_print", + "value": "speed_print", "enabled": "support_roof_enable", "children": { @@ -987,7 +997,7 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "150", - "inherit": true, + "value": "speed_support", "enabled": "support_enable", "global_only": true }, @@ -1002,7 +1012,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "enabled": "support_roof_enable", - "inherit_function": "parent_value / 1.5", + "value": "speed_support / 1.5", "global_only": true } } @@ -1019,7 +1029,7 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "300", - "inherit_function": "speed_print if magic_spiralize else 120", + "value": "speed_print if magic_spiralize else 120", "global_only": true }, "speed_layer_0": { @@ -1041,7 +1051,7 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "300", - "inherit_function": "speed_layer_0", + "value": "speed_layer_0", "global_only": true }, "speed_slowdown_layers": @@ -1095,10 +1105,9 @@ "unit": "mm", "type": "float", "default_value": 1.5, - "inherit_function": "machine_nozzle_tip_outer_diameter / 2 * 1.25", + "value": "machine_nozzle_tip_outer_diameter / 2 * 1.25", "minimum_value": "0", "maximum_value_warning": "machine_nozzle_tip_outer_diameter * 5", - "inherit": false, "enabled": "retraction_combing != \"off\" and travel_avoid_other_parts", "global_only": "True" } @@ -1129,7 +1138,7 @@ "minimum_value": "0", "maximum_value": "100", "default_value": 100, - "inherit_function": "100.0 if cool_fan_enabled else 0.0", + "value": "100.0 if cool_fan_enabled else 0.0", "enabled": "cool_fan_enabled", "global_only": "True", "children": @@ -1142,7 +1151,7 @@ "type": "float", "minimum_value": "0", "maximum_value": "100", - "inherit_function": "parent_value", + "value": "cool_fan_speed", "default_value": 100, "enabled": "cool_fan_enabled", "global_only": "True" @@ -1157,7 +1166,8 @@ "maximum_value": "100", "default_value": 100, "enabled": "cool_fan_enabled", - "global_only": "True" + "global_only": "True", + "value": "cool_fan_speed" } } }, @@ -1179,7 +1189,7 @@ "unit": "mm", "type": "float", "default_value": 0.5, - "inherit_function": "layer_height_0", + "value": "layer_height_0", "minimum_value": "0", "maximum_value_warning": "10.0", "global_only": "True", @@ -1193,7 +1203,7 @@ "default_value": 1, "minimum_value": "0", "maximum_value_warning": "100", - "inherit_function": "int((parent_value - layer_height_0 + 0.001) / layer_height) + 1", + "value": "int((cool_fan_full_at_height - layer_height_0 + 0.001) / layer_height) + 1", "global_only": "True" } } @@ -1316,7 +1326,7 @@ "minimum_value": "0", "default_value": 2.66, "enabled": "support_enable", - "inherit_function": "(support_line_width * 100) / parent_value * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", + "value": "(support_line_width * 100) / support_infill_rate * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", "global_only": true } } @@ -1354,7 +1364,8 @@ "maximum_value_warning": "10", "default_value": 0.15, "type": "float", - "enabled": "support_enable" + "enabled": "support_enable", + "value": "support_z_distance" }, "support_bottom_distance": { @@ -1364,7 +1375,7 @@ "minimum_value": "0", "maximum_value_warning": "10", "default_value": 0.1, - "inherit_function": "0.1 if support_type == 'everywhere' else 0", + "value": "0.1 if support_type == 'everywhere' else 0", "type": "float", "enabled": "support_enable and support_type == 'everywhere'" } @@ -1454,7 +1465,7 @@ "type": "float", "default_value": 0.4, "minimum_value": "0", - "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", + "value": "0 if support_roof_density == 0 else (support_roof_line_width * 100) / support_roof_density * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", "enabled": "support_roof_enable", "global_only": true } @@ -1506,7 +1517,6 @@ "minimum_value": "0", "maximum_value_warning": "10", "maximum_value": "support_tower_diameter", - "inherit": true, "enabled": "support_enable and support_use_towers" }, "support_tower_roof_angle": @@ -1601,7 +1611,7 @@ "default_value": 20, "minimum_value": "0", "maximum_value_warning": "300", - "inherit_function": "math.ceil(parent_value / skirt_line_width)", + "value": "math.ceil(brim_width / skirt_line_width)", "enabled": "adhesion_type == \"brim\"", "global_only": "True" } @@ -1676,7 +1686,7 @@ "minimum_value": "0.0001", "maximum_value_warning": "5.0", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "raft_surface_line_width", + "value": "raft_surface_line_width", "global_only": "True" }, "raft_interface_thickness": @@ -1698,7 +1708,7 @@ "unit": "mm", "type": "float", "default_value": 1, - "inherit_function": "line_width", + "value": "line_width", "minimum_value": "0.0001", "maximum_value_warning": "machine_nozzle_size * 2", "enabled": "adhesion_type == \"raft\"", @@ -1736,7 +1746,7 @@ "type": "float", "default_value": 1, "minimum_value": "0.0001", - "inherit_function": "line_width", + "value": "line_width", "maximum_value_warning": "machine_nozzle_size * 2", "enabled": "adhesion_type == \"raft\"", "global_only": "True" @@ -1764,7 +1774,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "200", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "speed_print / 60 * 30", + "value": "speed_print / 60 * 30", "global_only": "True", "children": { @@ -1779,7 +1789,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "100", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "parent_value", + "value": "raft_speed", "global_only": "True" }, "raft_interface_speed": @@ -1793,7 +1803,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value", + "value": "0.5 * raft_speed", "global_only": "True" }, "raft_base_speed": @@ -1807,7 +1817,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "200", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value", + "value": "0.5 * raft_speed", "global_only": "True" } } @@ -1835,7 +1845,7 @@ "maximum_value": "100", "default_value": 100, "global_only": "True", - "inherit": true, + "value": "raft_fan_speed", "enabled": "adhesion_type == \"raft\"" }, "raft_interface_fan_speed": @@ -1848,7 +1858,7 @@ "maximum_value": "100", "default_value": 100, "global_only": "True", - "inherit": true, + "value": "raft_fan_speed", "enabled": "adhesion_type == \"raft\"" }, "raft_base_fan_speed": @@ -1861,7 +1871,7 @@ "maximum_value": "100", "default_value": 100, "global_only": "True", - "inherit": true, + "value": "raft_fan_speed", "enabled": "adhesion_type == \"raft\"" } } @@ -1950,12 +1960,12 @@ } } }, - "blackmagic": + "experimental": { "label": "Experimental Modes", "type": "category", "icon": "category_blackmagic", - "description": "category_blackmagic", + "description": "experimental!", "children": { "draft_shield_enabled": @@ -2001,7 +2011,7 @@ "minimum_value": "0", "maximum_value_warning": "9999", "default_value": 0, - "inherit_function": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", + "value": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", "enabled": "draft_shield_height_limitation == \"limited\"", "global_only": true }, @@ -2022,7 +2032,6 @@ "default_value": 0.064, "minimum_value": "0", "maximum_value_warning": "2.0", - "inherit": false, "enabled": "coasting_enable", "global_only": true }, @@ -2047,7 +2056,6 @@ "default_value": 90, "minimum_value": "0.0001", "maximum_value_warning": "100", - "inherit": false, "enabled": "coasting_enable", "global_only": true }, @@ -2143,7 +2151,7 @@ "minimum_value": "magic_fuzzy_skin_thickness / 2", "minimum_value_warning": "0.1", "maximum_value_warning": "10", - "inherit_function": "10000 if parent_value == 0 else 1 / parent_value", + "value": "10000 if parent_value == 0 else 1 / magic_fuzzy_skin_point_density", "enabled": "magic_fuzzy_skin_enabled" } } @@ -2179,7 +2187,7 @@ "minimum_value_warning": "machine_nozzle_size", "maximum_value_warning": "20", "enabled": "wireframe_enabled", - "inherit_function": "wireframe_height", + "value": "wireframe_height", "global_only": "True" }, "wireframe_printspeed": @@ -2207,7 +2215,8 @@ "maximum_value": "299792458000", "maximum_value_warning": "50", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_printspeed" }, "wireframe_printspeed_up": { @@ -2220,7 +2229,8 @@ "maximum_value": "299792458000", "maximum_value_warning": "50", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_printspeed" }, "wireframe_printspeed_down": { @@ -2233,7 +2243,8 @@ "maximum_value": "299792458000", "maximum_value_warning": "50", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_printspeed" }, "wireframe_printspeed_flat": { @@ -2245,7 +2256,7 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "100", - "inherit": true, + "value": "wireframe_printspeed", "enabled": "wireframe_enabled", "global_only": "True" } @@ -2274,7 +2285,8 @@ "maximum_value_warning": "100", "type": "float", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_flow" }, "wireframe_flow_flat": { @@ -2286,7 +2298,8 @@ "maximum_value_warning": "100", "type": "float", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_flow" } } }, From 220939acbf7b381df4a13ef3806804bc7b9ae0ff Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 4 May 2016 11:01:36 +0200 Subject: [PATCH 109/424] Add a preference for scaling up tiny objects When objects have been modeled with meters as units, they become so tiny that the cannot be selected in Cura to be scaled up. --- cura/CuraApplication.py | 1 + resources/qml/GeneralPage.qml | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 2a22b624a9..9b113b7de8 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -115,6 +115,7 @@ class CuraApplication(QtApplication): Preferences.getInstance().addPreference("cura/categories_expanded", "") Preferences.getInstance().addPreference("view/center_on_select", True) Preferences.getInstance().addPreference("mesh/scale_to_fit", True) + Preferences.getInstance().addPreference("mesh/scale_tiny_meshes", True) Preferences.getInstance().setDefault("local_file/last_used_type", "text/x-gcode") JobQueue.getInstance().jobFinished.connect(self._onJobFinished) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index c22cd6fef2..b2ff44b15a 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -136,6 +136,20 @@ UM.PreferencesPage } } + UM.TooltipArea { + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip","Should opened files be scaled up if they are extremely small?") + + CheckBox + { + id: scaleTinyCheckbox + text: catalog.i18nc("@option:check","Scale extremely small files") + checked: boolCheck(UM.Preferences.getValue("mesh/scale_tiny_meshes")) + onCheckedChanged: UM.Preferences.setValue("mesh/scale_tiny_meshes", checked) + } + } + UM.TooltipArea { width: childrenRect.width height: childrenRect.height From fd871c35ca892c323f8f9b637b561c5767857aa6 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 4 May 2016 11:43:59 +0200 Subject: [PATCH 110/424] JSON feat: support_xy_overrides_z and support_xy_distance_overhang (CURA-1479) --- resources/machines/fdmprinter.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 2751c69db2..fed3edd457 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1253,6 +1253,30 @@ "visible": false, "enabled": "support_enable" }, + "support_xy_overrides_z": { + "label": "Support Distance Priority", + "description": "Whether the Support X/Y Distance overrides the Support Z Distance or vice versa. When X/Y overrides Z the X/Y distance can push away the support from the model, influencing the actual Z distance to the overhang. We can disable this by not applying the X/Y distance around overhangs.", + "type": "enum", + "options": { + "xy_overrides_z": "X/Y overrides Z", + "z_overrides_xy": "Z overrides X/Y" + }, + "default": "z_overrides_xy", + "visible": false, + "enabled": "support_enable" + }, + "support_xy_distance_overhang": { + "label": "Minimum Support X/Y Distance", + "description": "Distance of the support structure from the overhang in the X/Y directions. ", + "unit": "mm", + "type": "float", + "min_value": "0", + "max_value_warning": "10", + "default": 0.2, + "visible": false, + "inherit_function": "machine_nozzle_size / 2", + "enabled": "support_enable and support_xy_overrides_z==\"z_overrides_xy\"" + }, "support_z_distance": { "label": "Support Z Distance", "description": "Distance from the top/bottom of the support structure to the print. This gap provides clearance to remove the supports after the model is printed. This value is rounded down to a multiple of the layer height.", From 5a891a5fa221d0769d07971b19b6cdda836bfce6 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 4 May 2016 11:46:42 +0200 Subject: [PATCH 111/424] JSON refactor: moved support z distance above support xy distance options (CURA-1479) The support dist priority option may enable the xy dist overhang option, so it's logical to group it with the xy dist options, but it presumes you know about the support z distance, so it's more logical to put the x distance options above the xy distance options. --- resources/machines/fdmprinter.json | 70 +++++++++++++++--------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index fed3edd457..c868c451e3 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1242,41 +1242,6 @@ } } }, - "support_xy_distance": { - "label": "Support X/Y Distance", - "description": "Distance of the support structure from the print in the X/Y directions.", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "10", - "default": 0.7, - "visible": false, - "enabled": "support_enable" - }, - "support_xy_overrides_z": { - "label": "Support Distance Priority", - "description": "Whether the Support X/Y Distance overrides the Support Z Distance or vice versa. When X/Y overrides Z the X/Y distance can push away the support from the model, influencing the actual Z distance to the overhang. We can disable this by not applying the X/Y distance around overhangs.", - "type": "enum", - "options": { - "xy_overrides_z": "X/Y overrides Z", - "z_overrides_xy": "Z overrides X/Y" - }, - "default": "z_overrides_xy", - "visible": false, - "enabled": "support_enable" - }, - "support_xy_distance_overhang": { - "label": "Minimum Support X/Y Distance", - "description": "Distance of the support structure from the overhang in the X/Y directions. ", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "10", - "default": 0.2, - "visible": false, - "inherit_function": "machine_nozzle_size / 2", - "enabled": "support_enable and support_xy_overrides_z==\"z_overrides_xy\"" - }, "support_z_distance": { "label": "Support Z Distance", "description": "Distance from the top/bottom of the support structure to the print. This gap provides clearance to remove the supports after the model is printed. This value is rounded down to a multiple of the layer height.", @@ -1314,6 +1279,41 @@ } } }, + "support_xy_distance": { + "label": "Support X/Y Distance", + "description": "Distance of the support structure from the print in the X/Y directions.", + "unit": "mm", + "type": "float", + "min_value": "0", + "max_value_warning": "10", + "default": 0.7, + "visible": false, + "enabled": "support_enable" + }, + "support_xy_overrides_z": { + "label": "Support Distance Priority", + "description": "Whether the Support X/Y Distance overrides the Support Z Distance or vice versa. When X/Y overrides Z the X/Y distance can push away the support from the model, influencing the actual Z distance to the overhang. We can disable this by not applying the X/Y distance around overhangs.", + "type": "enum", + "options": { + "xy_overrides_z": "X/Y overrides Z", + "z_overrides_xy": "Z overrides X/Y" + }, + "default": "z_overrides_xy", + "visible": false, + "enabled": "support_enable" + }, + "support_xy_distance_overhang": { + "label": "Minimum Support X/Y Distance", + "description": "Distance of the support structure from the overhang in the X/Y directions. ", + "unit": "mm", + "type": "float", + "min_value": "0", + "max_value_warning": "10", + "default": 0.2, + "visible": false, + "inherit_function": "machine_nozzle_size / 2", + "enabled": "support_enable and support_xy_overrides_z==\"z_overrides_xy\"" + }, "support_bottom_stair_step_height": { "label": "Support Stair Step Height", "description": "The height of the steps of the stair-like bottom of support resting on the model. A low value makes the support harder to remove, but too high values can lead to unstable support structures.", From a0838256e203e171480c2fcfad33d8ccb03ecad0 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 4 May 2016 14:07:46 +0200 Subject: [PATCH 112/424] JSON fix: regular fan speed at layer inherit function was a bit off --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index c868c451e3..263913c9a4 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1121,7 +1121,7 @@ "min_value": "0", "max_value_warning": "100", "visible": false, - "inherit_function": "int((parent_value - layer_height_0 + 0.001) / layer_height) + 1", + "inherit_function": "max(0, int(round((parent_value - layer_height_0) / layer_height, 0)))", "global_only": "True" } } From 4aaa528ea2e2382c62df5ebbe9a2e430b1d6478f Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 4 May 2016 15:10:41 +0200 Subject: [PATCH 113/424] JSON feat: settings split: Compensate Overlapping wall parts ==> outer ; inner wall parts (CURA-995) --- resources/machines/fdmprinter.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 263913c9a4..ef9dab1673 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -497,7 +497,25 @@ "description": "Compensate the flow for parts of a wall being printed where there is already a wall in place.", "type": "boolean", "default": true, - "visible": false + "visible": false, + "children": { + "travel_compensate_overlapping_walls_0_enabled": { + "label": "Compensate Outer Wall Overlaps", + "description": "Compensate the flow for parts of an outer wall being printed where there is already a wall in place.", + "type": "boolean", + "default": true, + "visible": false, + "inherit_function": "parent_value" + }, + "travel_compensate_overlapping_walls_x_enabled": { + "label": "Compensate Inner Wall Overlaps", + "description": "Compensate the flow for parts of an inner wall being printed where there is already a wall in place.", + "type": "boolean", + "default": true, + "visible": false, + "inherit_function": "parent_value" + } + } }, "xy_offset": { "label": "Horizontal Expansion", From 46f4caab32b63af0771a3d65d6719421d8b6d83e Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 4 May 2016 15:32:20 +0200 Subject: [PATCH 114/424] JSON feat: conical_overhang_enabled (CURA-1412) --- resources/machines/fdmprinter.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index ef9dab1673..5b3e84025a 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1944,6 +1944,13 @@ "enabled": "draft_shield_height_limitation == \"limited\"", "global_only": true }, + "conical_overhang_enabled": { + "label": "Make Overhang Printable", + "description": "Change the geometry of the printed model such that minimal support is required. Steep overhangs will become shallow overhangs. Overhanging areas will drop down to become more vertical.", + "type": "boolean", + "default": false, + "visible": false + }, "coasting_enable": { "label": "Enable Coasting", "description": "Coasting replaces the last part of an extrusion path with a travel path. The oozed material is used to print the last piece of the extrusion path in order to reduce stringing.", From 51ed0f317b9b2a27461dcdf378785dc658c81563 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 4 May 2016 15:49:07 +0200 Subject: [PATCH 115/424] JSON feat: conical_overhang_angle (CURA-1412) --- resources/machines/fdmprinter.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 5b3e84025a..c4c2253812 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1951,6 +1951,17 @@ "default": false, "visible": false }, + "conical_overhang_angle": { + "label": "Maximum Model Angle", + "description": "The maximum angle of overhangs after the they have been made printable. At a value of 0° all overhangs are replaced by a piece of model connected to the build plate, 90° will not change the model in any way.", + "unit": "°", + "type": "float", + "min_value": "0", + "max_value": "89", + "default": 50, + "visible": true, + "enabled": "conical_overhang_enabled" + }, "coasting_enable": { "label": "Enable Coasting", "description": "Coasting replaces the last part of an extrusion path with a travel path. The oozed material is used to print the last piece of the extrusion path in order to reduce stringing.", From 581edfeaa5e817fbcd39568a8bfb2903121ccd63 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 4 May 2016 16:21:53 +0200 Subject: [PATCH 116/424] JSON: fix: better max infill_sparse_thickness (CURA-1255) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index c4c2253812..23f5a67af9 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -632,7 +632,7 @@ "default": 0.1, "min_value": "0.0001", "max_value_warning": "0.32", - "max_value": "layer_height * 8", + "max_value": "1000", "visible": false, "inherit_function": "layer_height" }, From f3c16198c90c72c7c069746232d703dac5c28bb1 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 9 May 2016 08:25:56 +0200 Subject: [PATCH 117/424] Only show support extruder selection when printing support is enabled CURA-790 --- resources/qml/SidebarSimple.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 9387872276..f3c551ab0c 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -316,17 +316,21 @@ Item Label { id: supportExtruderLabel + visible: supportCheckBox.checked text: catalog.i18nc("@label:listbox","Print support with:") font: UM.Theme.getFont("default") color: UM.Theme.getColor("text") width: base.width/100* 35 - 2*UM.Theme.getSize("default_margin").width + height: visible ? mainExtruderLabel.height : 0 anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: supportExtruderCombobox.verticalCenter } ComboBox { id: supportExtruderCombobox + visible: supportCheckBox.checked model: extruderModel + height: visible ? mainExtruderCombobox.height : 0 anchors.top: mainExtruderCombobox.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: supportExtruderLabel.right From 44246c0676e8d432eb53e27157197b14a59526dc Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 9 May 2016 12:06:11 +0200 Subject: [PATCH 118/424] Comment out all things that use settings related things so we can at least start --- cura/CuraApplication.py | 8 ++++---- plugins/CuraEngineBackend/CuraEngineBackend.py | 10 +++++----- resources/qml/Cura.qml | 6 +++--- resources/qml/ProfileSetup.qml | 2 +- resources/qml/SidebarHeader.qml | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 2a22b624a9..1f83cd1f3d 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -101,8 +101,8 @@ class CuraApplication(QtApplication): self._camera_animation = None self._cura_actions = None - self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged) - self.getMachineManager().addMachineRequested.connect(self._onAddMachineRequested) + #self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged) + #self.getMachineManager().addMachineRequested.connect(self._onAddMachineRequested) self.getController().getScene().sceneChanged.connect(self.updatePlatformActivity) self.getController().toolOperationStopped.connect(self._onToolOperationStopped) @@ -175,9 +175,9 @@ class CuraApplication(QtApplication): Selection.selectionChanged.connect(self.onSelectionChanged) root = controller.getScene().getRoot() - self._platform = Platform(root) + #self._platform = Platform(root) - self._volume = BuildVolume.BuildVolume(root) + #self._volume = BuildVolume.BuildVolume(root) self.getRenderer().setBackgroundColor(QColor(245, 245, 245)) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 7a5d332d9e..5102427823 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -52,11 +52,11 @@ class CuraEngineBackend(Backend): # When there are current settings and machine instance is changed, there is no profile changed event. We should # pretend there is though. - Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveProfileChanged) + #Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveProfileChanged) - self._profile = None - Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) - self._onActiveProfileChanged() + #self._profile = None + #Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) + #self._onActiveProfileChanged() self._change_timer = QTimer() self._change_timer.setInterval(500) @@ -84,7 +84,7 @@ class CuraEngineBackend(Backend): Application.getInstance().getController().toolOperationStarted.connect(self._onToolOperationStarted) Application.getInstance().getController().toolOperationStopped.connect(self._onToolOperationStopped) - Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onInstanceChanged) + #Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onInstanceChanged) def close(self): # Terminate CuraEngine if it is still running at this point diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 1759eabfc6..cdff5fc9ab 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -168,7 +168,7 @@ UM.MainWindow Instantiator { - model: UM.MachineInstancesModel { } +// model: UM.MachineInstancesModel { } MenuItem { text: model.name; @@ -187,7 +187,7 @@ UM.MainWindow Instantiator { - model: UM.MachineVariantsModel { } +// model: UM.MachineVariantsModel { } MenuItem { text: model.name; checkable: true; @@ -215,7 +215,7 @@ UM.MainWindow Instantiator { id: profileMenuInstantiator - model: UM.ProfilesModel {} +// model: UM.ProfilesModel {} property int separatorIndex: -1 Loader { diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index d6ff042a44..24668f43b0 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -56,7 +56,7 @@ Item{ Instantiator { id: profileSelectionInstantiator - model: UM.ProfilesModel {} +// model: UM.ProfilesModel {} property int separatorIndex: -1 Loader { diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index b5fcc880f6..1c17233acb 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -71,7 +71,7 @@ Item id: machineSelectionMenu Instantiator { - model: UM.MachineInstancesModel { } +// model: UM.MachineInstancesModel { } MenuItem { text: model.name; @@ -139,7 +139,7 @@ Item Instantiator { id: variantSelectionInstantiator - model: UM.MachineVariantsModel { id: variantsModel } +// model: UM.MachineVariantsModel { id: variantsModel } MenuItem { text: model.name; @@ -183,7 +183,7 @@ Item Instantiator { id: materialSelectionInstantiator - model: UM.MachineMaterialsModel { id: machineMaterialsModel } +// model: UM.MachineMaterialsModel { id: machineMaterialsModel } MenuItem { text: model.name; From 38492cb2304b1f84620701d60ad276655076c43c Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 9 May 2016 12:06:35 +0200 Subject: [PATCH 119/424] Update API version of two required plugins --- plugins/CuraEngineBackend/__init__.py | 2 +- plugins/SolidView/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/__init__.py b/plugins/CuraEngineBackend/__init__.py index 86a53d3ada..2e652ae845 100644 --- a/plugins/CuraEngineBackend/__init__.py +++ b/plugins/CuraEngineBackend/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "name": catalog.i18nc("@label", "CuraEngine Backend"), "author": "Ultimaker", "description": catalog.i18nc("@info:whatsthis", "Provides the link to the CuraEngine slicing backend."), - "api": 2 + "api": 3 } } diff --git a/plugins/SolidView/__init__.py b/plugins/SolidView/__init__.py index 0317648e6e..945ccba8f6 100644 --- a/plugins/SolidView/__init__.py +++ b/plugins/SolidView/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": i18n_catalog.i18nc("@info:whatsthis", "Provides a normal solid mesh view."), - "api": 2 + "api": 3 }, "view": { "name": i18n_catalog.i18nc("@item:inmenu", "Solid"), From 2f54e3554ad446d1715a29c397b5b57aa73d2711 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Mon, 9 May 2016 11:36:43 +0200 Subject: [PATCH 120/424] When trying to exit the application, forcefully shutdown the backend exe. Fixes CURA-1453 Cura in slicing loop (Arcus Error (6, native 54)) --- plugins/CuraEngineBackend/CuraEngineBackend.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 09817aa995..e3f9a4542e 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -103,6 +103,9 @@ class CuraEngineBackend(Backend): return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", json_path, "-vv"] + def close(self): + self._terminate() # Forcefully shutdown the backend. + ## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished. # \param time The amount of time the print will take. # \param material_amount The amount of material the print will use. From 1b9c29579b6febbc8281d833698cef27f8c06606 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 9 May 2016 14:55:01 +0200 Subject: [PATCH 121/424] Reworked add machine (Still stub) CURA-1278 --- resources/qml/AddMachineDialog.qml | 165 +++++++++++++++++++++++++++++ resources/qml/Cura.qml | 14 +-- 2 files changed, 172 insertions(+), 7 deletions(-) create mode 100644 resources/qml/AddMachineDialog.qml diff --git a/resources/qml/AddMachineDialog.qml b/resources/qml/AddMachineDialog.qml new file mode 100644 index 0000000000..c6e852aa3e --- /dev/null +++ b/resources/qml/AddMachineDialog.qml @@ -0,0 +1,165 @@ +// Copyright (c) 2016 Ultimaker B.V. +// Cura is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.1 +import QtQuick.Layouts 1.1 +import QtQuick.Window 2.1 + +import QtQuick.Controls.Styles 1.1 + +import UM 1.1 as UM +import Cura 1.0 as Cura + + +UM.Dialog +{ + id: base + title: catalog.i18nc("@title:window", "Add Printer") + property string activeManufacturer: "Ultimaker"; + + function getMachineName() + { + var name = machineList.model.getItem(machineList.currentIndex).name + return name + } + + ScrollView + { + id: machinesHolder + + anchors + { + left: parent.left; + top: parent.top; + right: parent.right; + bottom: parent.bottom; + } + ListView + { + id: machineList + + model: UM.DefinitionContainersModel + { + id: machineDefinitionsModel + filter: {"visible":true} + } + section.property: "manufacturer" + section.delegate: Button + { + text: section + style: ButtonStyle + { + background: Rectangle + { + border.width: 0 + color: "transparent"; + height: UM.Theme.getSize("standard_list_lineheight").height + width: machineList.width + } + label: Label + { + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("standard_arrow").width + UM.Theme.getSize("default_margin").width + text: control.text + color: palette.windowText + font.bold: true + UM.RecolorImage + { + id: downArrow + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.left + anchors.rightMargin: UM.Theme.getSize("default_margin").width + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: width + color: palette.windowText + source: base.activeManufacturer == section ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_right") + } + } + } + + onClicked: + { + base.activeManufacturer = section; + machineList.currentIndex = machineList.model.find("manufacturer", section) + machineName.text = getMachineName() + } + } + + delegate: RadioButton + { + id: machineButton + + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("standard_list_lineheight").width + + opacity: 1; + height: UM.Theme.getSize("standard_list_lineheight").height; + + checked: ListView.isCurrentItem; + + exclusiveGroup: printerGroup; + + text: model.name + + onClicked: + { + ListView.view.currentIndex = index; + machineName.text = getMachineName() + } + + states: State + { + name: "collapsed"; + when: base.activeManufacturer != model.manufacturer; + + PropertyChanges { target: machineButton; opacity: 0; height: 0; } + } + + transitions: + [ + Transition + { + to: "collapsed"; + SequentialAnimation + { + NumberAnimation { property: "opacity"; duration: 75; } + NumberAnimation { property: "height"; duration: 75; } + } + }, + Transition + { + from: "collapsed"; + SequentialAnimation + { + NumberAnimation { property: "height"; duration: 75; } + NumberAnimation { property: "opacity"; duration: 75; } + } + } + ] + } + } + } + + TextField + { + id: machineName; + text: getMachineName() + implicitWidth: UM.Theme.getSize("standard_list_input").width + maximumLength: 40 + anchors.bottom:parent.bottom + } + + Item + { + UM.I18nCatalog + { + id: catalog; + name: "cura"; + } + SystemPalette { id: palette } + ExclusiveGroup { id: printerGroup; } + } +} \ No newline at end of file diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index cdff5fc9ab..e39cd733d9 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -626,7 +626,7 @@ UM.MainWindow resetAll.onTriggered: Printer.resetAll(); reloadAll.onTriggered: Printer.reloadAll(); - addMachine.onTriggered: addMachineWizard.visible = true; + addMachine.onTriggered: addMachineDialog.visible = true; addProfile.onTriggered: { UM.MachineManager.createProfile(); @@ -742,9 +742,9 @@ UM.MainWindow id: engineLog; } - AddMachineWizard + AddMachineDialog { - id: addMachineWizard + id: addMachineDialog } AboutDialog @@ -757,8 +757,8 @@ UM.MainWindow target: Printer onRequestAddPrinter: { - addMachineWizard.visible = true - addMachineWizard.firstRun = false + addMachineDialog.visible = true + addMachineDialog.firstRun = false } } @@ -777,8 +777,8 @@ UM.MainWindow } else if(UM.MachineManager.activeMachineInstance == "") { - addMachineWizard.firstRun = true; - addMachineWizard.open(); + addMachineDialog.firstRun = true; + addMachineDialog.open(); } } } From 0049ee13777f3e61a6b03f9f818f657f6b6fa902 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 9 May 2016 15:42:47 +0200 Subject: [PATCH 122/424] SolidView now uses activeContainerStack CURA-1278 --- plugins/SolidView/SolidView.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 8719e9c6e4..561d194dd3 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -34,12 +34,11 @@ class SolidView(View): self._disabled_shader.setUniformValue("u_diffuseColor", [0.68, 0.68, 0.68, 1.0]) self._disabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) - if Application.getInstance().getMachineManager().getWorkingProfile(): - profile = Application.getInstance().getMachineManager().getWorkingProfile() + if Application.getInstance().getActiveContainerStack(): if Preferences.getInstance().getValue("view/show_overhang"): - angle = profile.getSettingValue("support_angle") - if angle != None: + angle = Application.getInstance().getActiveContainerStack().getValue("support_angle") + if angle is not None: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle))) else: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang. From 293fd5e80d4fdde9a61506d7dc0927a33e2377e6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 9 May 2016 15:44:04 +0200 Subject: [PATCH 123/424] Moved fdmprinter.def.json to definitions folder CURA-1278 --- resources/definitions/fdmprinter.def.json | 2468 +++++++++++++++++++++ 1 file changed, 2468 insertions(+) create mode 100644 resources/definitions/fdmprinter.def.json diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json new file mode 100644 index 0000000000..cf92aa847f --- /dev/null +++ b/resources/definitions/fdmprinter.def.json @@ -0,0 +1,2468 @@ +{ + "id": "fdmprinter", + "version": 2, + "metadata": + { + "category": "Ultimaker", + "manufacturer": "Ultimaker", + "visible": false + }, + "name": "FDM Printer Base Description", + "author": "Ultimaker B.V.", + "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", + "settings": + { + "machine_settings": + { + "label": "Machine", + "type": "category", + "description": "Machine specific settings", + "children": + { + "machine_show_variants": + { + "description": "Whether to show the different variants of this machine, which are described in separate json files.", + "default_value": false, + "type": "bool", + "label": "Show machine variants" + }, + "machine_start_gcode": + { + "description": "Gcode commands to be executed at the very start - separated by \\n.", + "default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0", + "label": "Start GCode", + "global_only": true, + "type": "str" + }, + "machine_end_gcode": + { + "description": "Gcode commands to be executed at the very end - separated by \\n.", + "default_value": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84", + "label": "End GCode", + "global_only": true, + "type": "str" + }, + "material_bed_temp_wait": + { + "description": "Whether to insert a command to wait until the bed temperature is reached at the start.", + "label": "Wait for bed heatup", + "default_value": true, + "global_only": true, + "type": "bool" + }, + "material_print_temp_prepend": + { + "description": "Whether to include nozzle temperature commands at the start of the gcode. When the start_gcode already contains nozzle temperature commands Cura frontend will automatically disable this setting.", + "default_value": true, + "global_only": true, + "type": "bool", + "label": "Wait for material heatup" + }, + "machine_width": + { + "description": "The width (X-direction) of the printable area.", + "default_value": 100, + "global_only": true, + "type": "float", + "label": "Machine width" + }, + "machine_depth": + { + "description": "The depth (Y-direction) of the printable area.", + "default_value": 100, + "global_only": true, + "type": "float", + "label": "Machine depth" + }, + "machine_height": + { + "description": "The height (Z-direction) of the printable area.", + "default_value": 100, + "global_only": true, + "type": "float", + "label": "Machine height" + }, + "machine_heated_bed": + { + "description": "Whether the machine has a heated bed present.", + "default_value": false, + "global_only": true, + "label": "Has heated bed", + "type": "bool" + }, + "machine_center_is_zero": + { + "description": "Whether the X/Y coordinates of the zero position of the printer is at the center of the printable area.", + "default_value": false, + "global_only": true, + "type": "bool", + "label": "Is center origin" + }, + "machine_extruder_count": + { + "description": "Number of extruder trains. An extruder train is the combination of a feeder, bowden tube, and nozzle.", + "default_value": 1, + "global_only": true, + "type": "bool", + "label": "Number extruders" + }, + "machine_nozzle_tip_outer_diameter": + { + "description": "The outer diameter of the tip of the nozzle.", + "label": "Outer nozzle diameter", + "default_value": 1, + "global_only": true, + "type": "float" + }, + "machine_nozzle_head_distance": + { + "description": "The height difference between the tip of the nozzle and the lowest part of the print head.", + "default_value": 3, + "global_only": true, + "type": "float", + "label": "Nozzle length" + }, + "machine_nozzle_expansion_angle": + { + "description": "The angle between the horizontal plane and the conical part right above the tip of the nozzle.", + "default_value": 45, + "global_only": true, + "type": "int", + "label": "Nozzle angle" + }, + "machine_heat_zone_length": + { + "description": "The distance from the tip of the nozzle in which heat from the nozzle is transfered to the filament.", + "default_value": 16, + "global_only": true, + "type": "float", + "label": "Heat zone length" + }, + "machine_nozzle_heat_up_speed": + { + "description": "The speed (°C/s) by which the nozzle heats up averaged over the window of normal printing temperatures and the standby temperature.", + "default_value": 2.0, + "global_only": true, + "type": "float", + "label": "Heat up speed" + }, + "machine_nozzle_cool_down_speed": + { + "description": "The speed (°C/s) by which the nozzle cools down averaged over the window of normal printing temperatures and the standby temperature.", + "default_value": 2.0, + "global_only": true, + "type": "float", + "label": "Cool down speed" + }, + "machine_gcode_flavor": + { + "description": "The type of gcode to be generated.", + "default_value": "RepRap", + "global_only": true, + "type": "str", + "label": "Gcode flavour" + }, + "machine_disallowed_areas": + { + "description": "A list of polygons with areas the print head is not allowed to enter.", + "type": "polygons", + "default_value": [], + "global_only": true, + "label": "Disallowed areas" + }, + "machine_head_polygon": + { + "description": "A 2D silhouette of the print head (fan caps excluded).", + "type": "polygon", + "default_value": + [ + [ + -1, + 1 + ], + [ + -1, + -1 + ], + [ + 1, + -1 + ], + [ + 1, + 1 + ] + ], + "global_only": true, + "label": "Machine head polygon" + }, + "machine_head_with_fans_polygon": + { + "description": "A 2D silhouette of the print head (fan caps included).", + "type": "polygon", + "default_value": + [ + [ + -20, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -20, + -10 + ] + ], + "global_only": true, + "label": "Machine head & Fan polygon" + }, + "gantry_height": + { + "description": "The height difference between the tip of the nozzle and the gantry system (X and Y axes).", + "default_value": 99999999999, + "global_only": true, + "label": "Gantry height", + "type": "float" + }, + "machine_nozzle_size": + { + "label": "Nozzle Diameter", + "description": "The inner diameter of the nozzle. Change this setting when using a non-standard nozzle size.", + "unit": "mm", + "type": "float", + "default_value": 0.4, + "minimum_value": "0.001", + "maximum_value_warning": "10" + } + } + }, + "resolution": + { + "label": "Quality", + "type": "category", + "icon": "category_layer_height", + "description": "All settings that influence the resolution of the print. These settings have a large impact on the quality (and print time)", + "children": + { + "layer_height": + { + "label": "Layer Height", + "description": "The height of each layer in mm. Higher values produce faster prints in lower resolution, lower values produce slower prints in higher resolution.", + "unit": "mm", + "type": "float", + "default_value": 0.1, + "minimum_value": "0.001", + "minimum_value_warning": "0.04", + "maximum_value_warning": "0.8 * machine_nozzle_size", + "global_only": "True" + }, + "layer_height_0": + { + "label": "Initial Layer Height", + "description": "The height of the initial layer in mm. A thicker initial layer makes adhesion to the build plate easier.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0.001", + "minimum_value_warning": "0.04", + "maximum_value_warning": "0.8 * machine_nozzle_size", + "global_only": "True" + }, + "line_width": + { + "label": "Line Width", + "description": "Width of a single line. Generally, the width of each line should correspond to the width of the nozzle. However, slightly reducing this value could produce better prints.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "2 * machine_nozzle_size", + "default_value": 0.4, + "type": "float", + "value": "machine_nozzle_size", + "children": + { + "wall_line_width": + { + "label": "Wall Line Width", + "description": "Width of a single wall line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "value":"line_width", + "default_value": 0.4, + "type": "float", + "children": + { + "wall_line_width_0": + { + "label": "Outer Wall Line Width", + "description": "Width of the outermost wall line. By lowering this value, higher levels of detail can be printed.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "value":"wall_line_width", + "type": "float" + }, + "wall_line_width_x": + { + "label": "Inner Wall(s) Line Width", + "description": "Width of a single wall line for all wall lines except the outermost one.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "value":"wall_line_width", + "type": "float" + } + } + }, + "skin_line_width": + { + "label": "Top/bottom Line Width", + "description": "Width of a single top/bottom line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float", + "value": "line_width" + }, + "infill_line_width": + { + "label": "Infill Line Width", + "description": "Width of a single infill line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float", + "value": "line_width" + }, + "skirt_line_width": + { + "label": "Skirt Line Width", + "description": "Width of a single skirt line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float", + "global_only": true, + "value": "line_width" + }, + "support_line_width": + { + "label": "Support Line Width", + "description": "Width of a single support structure line.", + "unit": "mm", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "default_value": 0.4, + "type": "float", + "enabled": "support_enable", + "global_only": true, + "value": "line_width" + }, + "support_roof_line_width": + { + "label": "Support Roof Line Width", + "description": "Width of a single support roof line.", + "unit": "mm", + "default_value": 0.4, + "minimum_value": "0.0001", + "maximum_value_warning": "machine_nozzle_size * 2", + "type": "float", + "enabled": "support_roof_enable", + "global_only": true, + "value": "line_width" + } + } + } + } + }, + "shell": + { + "label": "Shell", + "icon": "category_shell", + "description": "Shell", + "type": "category", + "children": + { + "wall_thickness": + { + "label": "Wall Thickness", + "description": "The thickness of the outside walls in the horizontal direction. This value divided by the wall line width defines the number of walls.", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "0", + "minimum_value_warning": "line_width", + "maximum_value_warning": "5 * line_width", + "type": "float", + "children": + { + "wall_line_count": + { + "label": "Wall Line Count", + "description": "The number of walls. When calculated by the wall thickness, this value is rounded to a whole number.", + "default_value": 2, + "minimum_value": "0", + "type": "int", + "value": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" + } + } + }, + "top_bottom_thickness": + { + "label": "Top/Bottom Thickness", + "description": "The thickness of the top/bottom layers in the print. This value divided by the layer height defines the number of top/bottom layers.", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "0", + "maximum_value": "5", + "minimum_value_warning": "0.6", + "type": "float", + "children": + { + "top_thickness": + { + "label": "Top Thickness", + "description": "The thickness of the top layers in the print. This value divided by the layer height defines the number of top layers.", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "float", + "value": "top_bottom_thickness", + "children": + { + "top_layers": + { + "label": "Top Layers", + "description": "The number of top layers. When calculated by the top thickness, this value is rounded to a whole number.", + "default_value": 8, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "int", + "value": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + } + } + }, + "bottom_thickness": + { + "label": "Bottom Thickness", + "description": "The thickness of the bottom layers in the print. This value divided by the layer height defines the number of bottom layers.", + "unit": "mm", + "default_value": 0.6, + "minimum_value": "0", + "type": "float", + "value": "top_bottom_thickness", + "children": + { + "bottom_layers": + { + "label": "Bottom Layers", + "description": "The number of bottom layers. When calculated by the bottom thickness, this value is rounded to a whole number.", + "minimum_value": "0", + "default_value": 6, + "type": "int", + "value": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + } + } + } + } + }, + "top_bottom_pattern": + { + "label": "Top/Bottom Pattern", + "description": "The pattern of the top/bottom layers.", + "type": "enum", + "options": + { + "lines": "Lines", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "lines" + }, + "wall_0_inset": + { + "label": "Outer Wall Inset", + "description": "Inset applied to the path of the outer wall. If the outer wall is smaller than the nozzle, and printed after the inner walls, use this offset to get the hole in the nozzle to overlap with the inner walls instead of the outside of the object.", + "unit": "mm", + "type": "float", + "default_value": 0.0, + "value": "(machine_nozzle_size - wall_line_width_0) / 2 if wall_line_width_0 < machine_nozzle_size else 0", + "minimum_value_warning": "0", + "maximum_value_warning": "machine_nozzle_size" + }, + "alternate_extra_perimeter": + { + "label": "Alternate Extra Wall", + "description": "Prints an extra wall at every other layer. This way infill gets caught between these extra walls, resulting in stronger prints.", + "type": "bool", + "default_value": false + }, + "remove_overlapping_walls_enabled": + { + "label": "Remove Overlapping Wall Parts", + "description": "Remove parts of a wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin parts and sharp corners in models.", + "type": "bool", + "default_value": false, + "enabled": "False", + "children": + { + "remove_overlapping_walls_0_enabled": + { + "label": "Remove Overlapping Outer Wall Parts", + "description": "Remove parts of an outer wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin pieces in a model and sharp corners.", + "type": "bool", + "default_value": false, + "value": "remove_overlapping_walls_enabled", + "enabled": "False" + }, + "remove_overlapping_walls_x_enabled": + { + "label": "Remove Overlapping Inner Wall Parts", + "description": "Remove parts of an inner wall that would otherwise overlap and cause over-extrusion. These overlaps occur in thin pieces in a model and sharp corners.", + "type": "bool", + "default_value": true, + "value": "remove_overlapping_walls_enabled" + } + } + }, + "fill_perimeter_gaps": + { + "label": "Fill Gaps Between Walls", + "description": "Fills the gaps between walls when overlapping inner wall parts are removed.", + "type": "enum", + "options": + { + "nowhere": "Nowhere", + "everywhere": "Everywhere", + "skin": "Skin" + }, + "default_value": "everywhere", + "enabled": "remove_overlapping_walls_x_enabled" + }, + "travel_compensate_overlapping_walls_enabled": + { + "label": "Compensate Wall Overlaps", + "description": "Compensate the flow for parts of a wall being printed where there is already a wall in place.", + "type": "bool", + "default_value": true + }, + "xy_offset": + { + "label": "Horizontal Expansion", + "description": "Amount of offset applied to all polygons in each layer. Positive values can compensate for too big holes; negative values can compensate for too small holes.", + "unit": "mm", + "type": "float", + "minimum_value_warning": "-10", + "maximum_value_warning": "10", + "default_value": 0 + }, + "z_seam_type": + { + "label": "Z Seam Alignment", + "description": "Starting point of each path in a layer. When paths in consecutive layers start at the same point a vertical seam may show on the print. When aligning these at the back, the seam is easiest to remove. When placed randomly the inaccuracies at the paths' start will be less noticeable. When taking the shortest path the print will be quicker.", + "type": "enum", + "options": + { + "back": "Back", + "shortest": "Shortest", + "random": "Random" + }, + "default_value": "shortest" + }, + "skin_no_small_gaps_heuristic": + { + "label": "Ignore Small Z Gaps", + "description": "When the model has small vertical gaps, about 5% extra computation time can be spent on generating top and bottom skin in these narrow spaces. In such case, disable the setting.", + "type": "bool", + "default_value": true + } + } + }, + "infill": + { + "label": "Infill", + "icon": "category_infill", + "description": "Infill", + "type": "category", + "children": + { + "infill_sparse_density": + { + "label": "Infill Density", + "description": "Adjusts the density of infill of the print.", + "unit": "%", + "type": "float", + "default_value": 20, + "minimum_value": "0", + "maximum_value_warning": "100", + "children": + { + "infill_line_distance": + { + "label": "Infill Line Distance", + "description": "Distance between the printed infill lines. This setting is calculated by the infill density and the infill line width.", + "unit": "mm", + "type": "float", + "default_value": 2, + "minimum_value": "0", + "value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" + } + } + }, + "infill_pattern": + { + "label": "Infill Pattern", + "description": "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, triangle and concentric patterns are fully printed every layer.", + "type": "enum", + "options": + { + "grid": "Grid", + "lines": "Lines", + "triangles": "Triangles", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "grid", + "value": "'lines' if infill_sparse_density > 25 else 'grid'" + }, + "infill_overlap": + { + "label": "Infill Overlap Percentage", + "description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.", + "unit": "%", + "type": "float", + "default_value": 10, + "value": "10 if infill_sparse_density < 95 else 0", + "minimum_value_warning": "-50", + "maximum_value_warning": "100", + "children": + { + "infill_overlap_mm": + { + "label": "Infill Overlap", + "description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.", + "unit": "mm", + "type": "float", + "default_value": 0.04, + "minimum_value_warning": "-0.5 * machine_nozzle_size", + "maximum_value_warning": "machine_nozzle_size", + "value": "infill_line_width * infill_overlap / 100 if infill_sparse_density < 95 else 0" + } + } + }, + "infill_wipe_dist": + { + "label": "Infill Wipe Distance", + "description": "Distance of a travel move inserted after every infill line, to make the infill stick to the walls better. This option is similar to infill overlap, but without extrusion and only on one end of the infill line.", + "unit": "mm", + "type": "float", + "default_value": 0.04, + "value": "wall_line_width_0 / 4 if wall_line_count == 1 else wall_line_width_x / 4", + "minimum_value_warning": "0", + "maximum_value_warning": "machine_nozzle_size" + }, + "infill_sparse_thickness": + { + "label": "Infill Layer Thickness", + "description": "The thickness per layer of infill material. This value should always be a multiple of the layer height and is otherwise rounded.", + "unit": "mm", + "type": "float", + "default_value": 0.1, + "minimum_value": "0.0001", + "maximum_value_warning": "0.32", + "maximum_value": "layer_height * 8", + "value": "layer_height" + }, + "infill_before_walls": + { + "label": "Infill Before Walls", + "description": "Print the infill before printing the walls. Printing the walls first may lead to more accurate walls, but overhangs print worse. Printing the infill first leads to sturdier walls, but the infill pattern might sometimes show through the surface.", + "type": "bool", + "default_value": true + } + } + }, + "material": + { + "label": "Material", + "icon": "category_material", + "description": "Material", + "type": "category", + "children": + { + "material_flow_dependent_temperature": + { + "label": "Auto Temperature", + "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", + "type": "bool", + "default_value": false, + "enabled": "False", + "global_only": true + }, + "material_print_temperature": + { + "label": "Printing Temperature", + "description": "The temperature used for printing. Set at 0 to pre-heat the printer manually.", + "unit": "°C", + "type": "float", + "default_value": 210, + "minimum_value": "0", + "maximum_value_warning": "260", + "enabled": "not (material_flow_dependent_temperature)" + }, + "material_flow_temp_graph": + { + "label": "Flow Temperature Graph", + "description": "Data linking material flow (in mm3 per second) to temperature (degrees Celsius).", + "unit": "", + "type": "str", + "default_value": "[[3.5,200],[7.0,240]]", + "enabled": "False", + "comments": "old enabled function: material_flow_dependent_temperature", + "global_only": true + }, + "material_extrusion_cool_down_speed": { + "label": "Extrusion Cool Down Speed Modifier", + "description": "The extra speed by which the nozzle cools while extruding. The same value is used to signify the heat up speed lost when heating up while extruding.", + "unit": "°C/s", + "type": "float", + "default_value": 0.5, + "minimum_value": "0", + "maximum_value_warning": "10.0", + "global_only": "True", + "enabled": "False", + "comments": "old enabled function: material_flow_dependent_temperature or machine_extruder_count > 1" + }, + "material_bed_temperature": { + "label": "Bed Temperature", + "description": "The temperature used for the heated bed. Set at 0 to pre-heat the printer manually.", + "unit": "°C", + "type": "float", + "default_value": 60, + "minimum_value": "0", + "maximum_value_warning": "260", + "enabled": "machine_heated_bed", + "global_only": "True" + }, + "material_diameter": { + "label": "Diameter", + "description": "Adjusts the diameter of the filament used. Match this value with the diameter of the used filament.", + "unit": "mm", + "type": "float", + "default_value": 2.85, + "minimum_value": "0.0001", + "minimum_value_warning": "0.4", + "maximum_value_warning": "3.5", + "global_only": "True" + }, + "material_flow": { + "label": "Flow", + "description": "Flow compensation: the amount of material extruded is multiplied by this value.", + "unit": "%", + "default_value": 100, + "type": "float", + "minimum_value": "5", + "minimum_value_warning": "50", + "maximum_value_warning": "150" + }, + "retraction_enable": { + "label": "Enable Retraction", + "description": "Retract the filament when the nozzle is moving over a non-printed area. ", + "type": "bool", + "default_value": true + }, + "retraction_amount": { + "label": "Retraction Distance", + "description": "The length of material retracted during a retraction move.", + "unit": "mm", + "type": "float", + "default_value": 6.5, + "minimum_value_warning": "-0.0001", + "maximum_value_warning": "10.0", + "enabled": "retraction_enable" + }, + "retraction_speed": { + "label": "Retraction Speed", + "description": "The speed at which the filament is retracted and primed during a retraction move.", + "unit": "mm/s", + "type": "float", + "default_value": 25, + "minimum_value": "0", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "enabled": "retraction_enable", + "children": { + "retraction_retract_speed": { + "label": "Retraction Retract Speed", + "description": "The speed at which the filament is retracted during a retraction move.", + "unit": "mm/s", + "type": "float", + "default_value": 25, + "minimum_value": "0", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "enabled": "retraction_enable", + "value": "retraction_speed" + }, + "retraction_prime_speed": { + "label": "Retraction Prime Speed", + "description": "The speed at which the filament is primed during a retraction move.", + "unit": "mm/s", + "type": "float", + "default_value": 25, + "minimum_value": "0", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "enabled": "retraction_enable", + "value": "retraction_speed" + } + } + }, + "retraction_extra_prime_amount": { + "label": "Retraction Extra Prime Amount", + "description": "Some material can ooze away during a travel move, which can be compensated for here.", + "unit": "mm³", + "type": "float", + "default_value": 0, + "minimum_value_warning": "-0.0001", + "maximum_value_warning": "5.0", + "enabled": "retraction_enable" + }, + "retraction_min_travel": { + "label": "Retraction Minimum Travel", + "description": "The minimum distance of travel needed for a retraction to happen at all. This helps to get fewer retractions in a small area.", + "unit": "mm", + "type": "float", + "default_value": 1.5, + "value": "line_width * 2", + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "retraction_enable" + }, + "retraction_count_max": { + "label": "Maximum Retraction Count", + "description": "This setting limits the number of retractions occurring within the minimum extrusion distance window. Further retractions within this window will be ignored. This avoids retracting repeatedly on the same piece of filament, as that can flatten the filament and cause grinding issues.", + "default_value": 45, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "int", + "enabled": "retraction_enable" + }, + "retraction_extrusion_window": { + "label": "Minimum Extrusion Distance Window", + "description": "The window in which the maximum retraction count is enforced. This value should be approximately the same as the retraction distance, so that effectively the number of times a retraction passes the same patch of material is limited.", + "unit": "mm", + "type": "float", + "default_value": 4.5, + "minimum_value": "0", + "maximum_value_warning": "retraction_amount * 2", + "value": "retraction_amount", + "enabled": "retraction_enable" + }, + "retraction_hop": { + "label": "Z Hop when Retracting", + "description": "Whenever a retraction is done, the build plate is lowered to create clearance between the nozzle and the print. It prevents the nozzle from hitting the print during travel moves, reducing the chance to knock the print from the build plate.", + "unit": "mm", + "type": "float", + "default_value": 0, + "minimum_value_warning": "-0.0001", + "maximum_value_warning": "10", + "enabled": "retraction_enable" + } + } + }, + "speed": + { + "label": "Speed", + "icon": "category_speed", + "description": "Speed", + "type": "category", + "children": + { + "speed_print": + { + "label": "Print Speed", + "description": "The speed at which printing happens.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value_warning": "150", + "maximum_value": "299792458000", + "default_value": 60, + "children": + { + "speed_infill": + { + "label": "Infill Speed", + "description": "The speed at which infill is printed.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 60, + "value": "speed_print" + }, + "speed_wall": + { + "label": "Wall Speed", + "description": "The speed at which the walls are printed.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 30, + "value": "speed_print / 2", + "children": + { + "speed_wall_0": + { + "label": "Outer Wall Speed", + "description": "The speed at which the outermost walls are printed. Printing the outer wall at a lower speed improves the final skin quality. However, having a large difference between the inner wall speed and the outer wall speed will effect quality in a negative way.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 30, + "value": "speed_wall" + }, + "speed_wall_x": + { + "label": "Inner Wall Speed", + "description": "The speed at which all inner walls are printed Printing the inner wall faster than the outer wall will reduce printing time. It works well to set this in between the outer wall speed and the infill speed.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 60, + "value": "speed_wall * 2" + } + } + }, + "speed_topbottom": + { + "label": "Top/Bottom Speed", + "description": "The speed at which top/bottom layers are printed.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 30, + "value": "speed_print / 2" + }, + "speed_support": + { + "label": "Support Speed", + "description": "The speed at which the support structure is printed. Printing support at higher speeds can greatly reduce printing time. The surface quality of the support structure is not important since it is removed after printing.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "default_value": 60, + "value": "speed_print", + "enabled": "support_roof_enable", + "children": + { + "speed_support_infill": + { + "label": "Support Infill Speed", + "description": "The speed at which the infill of support is printed. Printing the infill at lower speeds improves stability.", + "unit": "mm/s", + "type": "float", + "default_value": 60, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "value": "speed_support", + "enabled": "support_enable", + "global_only": true + }, + "speed_support_roof": + { + "label": "Support Roof Speed", + "description": "The speed at which the roofs of support are printed. Printing the support roof at lower speeds can improve overhang quality.", + "unit": "mm/s", + "type": "float", + "default_value": 40, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "enabled": "support_roof_enable", + "value": "speed_support / 1.5", + "global_only": true + } + } + } + } + }, + "speed_travel": + { + "label": "Travel Speed", + "description": "The speed at which travel moves are made.", + "unit": "mm/s", + "type": "float", + "default_value": 120, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "300", + "value": "speed_print if magic_spiralize else 120", + "global_only": true + }, + "speed_layer_0": { + "label": "Initial Layer Speed", + "description": "The print speed for the initial layer. A lower value is advised to improve adhesion to the build plate.", + "unit": "mm/s", + "type": "float", + "default_value": 30, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "300" + }, + "skirt_speed": { + "label": "Skirt Speed", + "description": "The speed at which the skirt and brim are printed. Normally this is done at the initial layer speed, but sometimes you might want to print the skirt at a different speed.", + "unit": "mm/s", + "type": "float", + "default_value": 30, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "300", + "value": "speed_layer_0", + "global_only": true + }, + "speed_slowdown_layers": + { + "label": "Number of Slower Layers", + "description": "The first few layers are printed slower than the rest of the object, to get better adhesion to the build plate and improve the overall success rate of prints. The speed is gradually increased over these layers.", + "type": "int", + "default_value": 2, + "minimum_value": "0", + "maximum_value": "299792458000", + "maximum_value_warning": "300", + "global_only": true + } + } + }, + "travel": + { + "label": "Travel", + "icon": "category_travel", + "description": "travel", + "type": "category", + "children": + { + "retraction_combing": + { + "label": "Combing Mode", + "description": "Combing keeps the nozzle within already printed areas when traveling. This results in slightly longer travel moves but reduces the need for retractions. If combing is off, the material will retract and the nozzle moves in a straight line to the next point. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only.", + "type": "enum", + "options": + { + "off": "Off", + "all": "All", + "noskin": "No Skin" + }, + "default_value": "all", + "global_only": true + }, + "travel_avoid_other_parts": + { + "label": "Avoid Printed Parts when Traveling", + "description": "The nozzle avoids already printed parts when traveling. This option is only available when combing is enabled.", + "type": "bool", + "default_value": true, + "enabled": "retraction_combing != \"off\"", + "global_only": "True" + }, + "travel_avoid_distance": + { + "label": "Travel Avoid Distance", + "description": "The distance between the nozzle and already printed parts when avoiding during travel moves.", + "unit": "mm", + "type": "float", + "default_value": 1.5, + "value": "machine_nozzle_tip_outer_diameter / 2 * 1.25", + "minimum_value": "0", + "maximum_value_warning": "machine_nozzle_tip_outer_diameter * 5", + "enabled": "retraction_combing != \"off\" and travel_avoid_other_parts", + "global_only": "True" + } + } + }, + "cooling": + { + "label": "Cooling", + "icon": "category_cool", + "description": "Cooling", + "type": "category", + "children": + { + "cool_fan_enabled": + { + "label": "Enable Cooling Fans", + "description": "Enables the cooling fans while printing. The fans improve print quality on layers with short layer times and bridging / overhangs.", + "type": "bool", + "default_value": true, + "global_only": "True" + }, + "cool_fan_speed": + { + "label": "Fan Speed", + "description": "The speed at which the cooling fans spin.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "value": "100.0 if cool_fan_enabled else 0.0", + "enabled": "cool_fan_enabled", + "global_only": "True", + "children": + { + "cool_fan_speed_min": + { + "label": "Regular Fan Speed", + "description": "The speed at which the fans spin before hitting the threshold. When a layer prints faster than the threshold, the fan speed gradually inclines towards the maximum fan speed.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "value": "cool_fan_speed", + "default_value": 100, + "enabled": "cool_fan_enabled", + "global_only": "True" + }, + "cool_fan_speed_max": + { + "label": "Maximum Fan Speed", + "description": "The speed at which the fans spin on the minimum layer time. The fan speed gradually increases between the regular fan speed and maximum fan speed when the threshold is hit.", + "unit": "%", + "type": "float", + "minimum_value": "max(0, cool_fan_speed_min)", + "maximum_value": "100", + "default_value": 100, + "enabled": "cool_fan_enabled", + "global_only": "True", + "value": "cool_fan_speed" + } + } + }, + "cool_min_layer_time_fan_speed_max": + { + "label": "Regular/Maximum Fan Speed Threshold", + "description": "The layer time which sets the threshold between regular fan speed and maximum fan speed. Layers that print slower than this time use regular fan speed. For faster layers the fan speed gradually increases towards the maximum fan speed.", + "unit": "sec", + "type": "float", + "default_value": 10, + "minimum_value": "cool_min_layer_time", + "maximum_value_warning": "600", + "global_only": "True" + }, + "cool_fan_full_at_height": + { + "label": "Regular Fan Speed at Height", + "description": "The height at which the fans spin on regular fan speed. At the layers below the fan speed gradually increases from zero to regular fan speed.", + "unit": "mm", + "type": "float", + "default_value": 0.5, + "value": "layer_height_0", + "minimum_value": "0", + "maximum_value_warning": "10.0", + "global_only": "True", + "children": + { + "cool_fan_full_layer": + { + "label": "Regular Fan Speed at Layer", + "description": "The layer at which the fans spin on regular fan speed. If regular fan speed at height is set, this value is calculated and rounded to a whole number.", + "type": "int", + "default_value": 1, + "minimum_value": "0", + "maximum_value_warning": "100", + "value": "int((cool_fan_full_at_height - layer_height_0 + 0.001) / layer_height) + 1", + "global_only": "True" + } + } + }, + "cool_min_layer_time": + { + "label": "Minimum Layer Time", + "description": "The minimum time spent in a layer. This forces the printer to slow down, to at least spend the time set here in one layer. This allows the printed material to cool down properly before printing the next layer.", + "unit": "sec", + "type": "float", + "default_value": 5, + "minimum_value": "0", + "maximum_value_warning": "600", + "global_only": "True" + }, + "cool_min_speed": + { + "label": "Minimum Speed", + "description": "The minimum print speed, despite slowing down due to the minimum layer time. When the printer would slow down too much, the pressure in the nozzle would be too low and result in bad print quality.", + "unit": "mm/s", + "type": "float", + "default_value": 10, + "minimum_value": "0", + "maximum_value_warning": "100", + "global_only": "True" + }, + "cool_lift_head": + { + "label": "Lift Head", + "description": "When the minimum speed is hit because of minimum layer time, lift the head away from the print and wait the extra time until the minimum layer time is reached.", + "type": "bool", + "default_value": false, + "global_only": "True" + } + } + }, + "support": + { + "label": "Support", + "type": "category", + "icon": "category_support", + "description": "Support", + "children": + { + "support_enable": + { + "label": "Enable Support", + "description": "Enable support structures. These structures support parts of the model with severe overhangs.", + "type": "bool", + "default_value": false + }, + "support_type": + { + "label": "Support Placement", + "description": "Adjusts the placement of the support structures. The placement can be set to touching build plate or everywhere. When set to everywhere the support structures will also be printed on the model.", + "type": "enum", + "options": + { + "buildplate": "Touching Buildplate", + "everywhere": "Everywhere" + }, + "default_value": "everywhere", + "enabled": "support_enable" + }, + "support_angle": + { + "label": "Support Overhang Angle", + "description": "The minimum angle of overhangs for which support is added. At a value of 0° all overhangs are supported, 90° will not provide any support.", + "unit": "°", + "type": "float", + "minimum_value": "0", + "maximum_value": "90", + "default_value": 50, + "enabled": "support_enable" + }, + "support_pattern": + { + "label": "Support Pattern", + "description": "The pattern of the support structures of the print. The different options available result in sturdy or easy to remove support.", + "type": "enum", + "options": + { + "lines": "Lines", + "grid": "Grid", + "triangles": "Triangles", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "zigzag", + "enabled": "support_enable", + "global_only": true + }, + "support_connect_zigzags": + { + "label": "Connect Support ZigZags", + "description": "Connect the ZigZags. This will increase the strength of the zig zag support structure.", + "type": "bool", + "default_value": true, + "enabled": "support_enable and (support_pattern == \"zigzag\")", + "global_only": true + }, + "support_infill_rate": + { + "label": "Support Density", + "description": "Adjusts the density of the support structure. A higher value results in better overhangs, but the supports are harder to remove.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "100", + "default_value": 15, + "enabled": "support_enable", + "global_only": true, + "children": { + "support_line_distance": + { + "label": "Support Line Distance", + "description": "Distance between the printed support structure lines. This setting is calculated by the support density.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "default_value": 2.66, + "enabled": "support_enable", + "value": "(support_line_width * 100) / support_infill_rate * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", + "global_only": true + } + } + }, + "support_xy_distance": + { + "label": "Support X/Y Distance", + "description": "Distance of the support structure from the print in the X/Y directions.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "10", + "default_value": 0.7, + "enabled": "support_enable" + }, + "support_z_distance": + { + "label": "Support Z Distance", + "description": "Distance from the top/bottom of the support structure to the print. This gap provides clearance to remove the supports after the model is printed. This value is rounded down to a multiple of the layer height.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "10", + "default_value": 0.15, + "enabled": "support_enable", + + "children": + { + "support_top_distance": + { + "label": "Support Top Distance", + "description": "Distance from the top of the support to the print.", + "unit": "mm", + "minimum_value": "0", + "maximum_value_warning": "10", + "default_value": 0.15, + "type": "float", + "enabled": "support_enable", + "value": "support_z_distance" + }, + "support_bottom_distance": + { + "label": "Support Bottom Distance", + "description": "Distance from the print to the bottom of the support.", + "unit": "mm", + "minimum_value": "0", + "maximum_value_warning": "10", + "default_value": 0.1, + "value": "0.1 if support_type == 'everywhere' else 0", + "type": "float", + "enabled": "support_enable and support_type == 'everywhere'" + } + } + }, + "support_bottom_stair_step_height": + { + "label": "Support Stair Step Height", + "description": "The height of the steps of the stair-like bottom of support resting on the model. A low value makes the support harder to remove, but too high values can lead to unstable support structures.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0", + "maximum_value_warning": "1.0", + "enabled": "support_enable" + }, + "support_join_distance": + { + "label": "Support Join Distance", + "description": "The maximum distance between support structures in the X/Y directions. When seperate structures are closer together than this value, the structures merge into one.", + "unit": "mm", + "type": "float", + "default_value": 2.0, + "minimum_value_warning": "0", + "maximum_value_warning": "10", + "enabled": "support_enable" + }, + "support_offset": + { + "label": "Support Horizontal Expansion", + "description": "Amount of offset applied to all support polygons in each layer. Positive values can smooth out the support areas and result in more sturdy support.", + "unit": "mm", + "type": "float", + "default_value": 0.2, + "minimum_value_warning": "-0.5", + "maximum_value_warning": "5.0", + "enabled": "support_enable" + }, + "support_area_smoothing": + { + "label": "Support Area Smoothing", + "description": "Maximum distance in the X/Y directions of a line segment which is to be smoothed out. Ragged lines are introduced by the join distance and support bridge, which cause the machine to resonate. Smoothing the support areas won't cause them to break with the constraints, except it might change the overhang.", + "unit": "mm", + "type": "float", + "default_value": 0.6, + "minimum_value": "0", + "maximum_value_warning": "1.0", + "enabled": "support_enable" + }, + "support_roof_enable": + { + "label": "Enable Support Roof", + "description": "Generate a dense top skin at the top of the support on which the model is printed.", + "type": "bool", + "default_value": false, + "enabled": "support_enable" + }, + "support_roof_height": + { + "label": "Support Roof Thickness", + "description": "The thickness of the support roofs.", + "unit": "mm", + "type": "float", + "default_value": 1, + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "support_roof_enable" + }, + "support_roof_density": + { + "label": "Support Roof Density", + "description": "Adjusts the density of the roof of the support structure. A higher value results in better overhangs, but the supports are harder to remove.", + "unit": "%", + "type": "float", + "default_value": 100, + "minimum_value": "0", + "maximum_value_warning": "100", + "enabled":"support_roof_enable", + "global_only": true, + "children": + { + "support_roof_line_distance": + { + "label": "Support Roof Line Distance", + "description": "Distance between the printed support roof lines. This setting is calculated by the support roof Density, but can be adjusted separately.", + "unit": "mm", + "type": "float", + "default_value": 0.4, + "minimum_value": "0", + "value": "0 if support_roof_density == 0 else (support_roof_line_width * 100) / support_roof_density * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", + "enabled": "support_roof_enable", + "global_only": true + } + } + }, + "support_roof_pattern": + { + "label": "Support Roof Pattern", + "description": "The pattern with which the top of the support is printed.", + "type": "enum", + "options": + { + "lines": "Lines", + "grid": "Grid", + "triangles": "Triangles", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "concentric", + "enabled": "support_roof_enable", + "global_only": true + }, + "support_use_towers": + { + "label": "Use Towers", + "description": "Use specialized towers to support tiny overhang areas. These towers have a larger diameter than the region they support. Near the overhang the towers' diameter decreases, forming a roof.", + "type": "bool", + "default_value": true, + "enabled": "support_enable" + }, + "support_tower_diameter": + { + "label": "Tower Diameter", + "description": "The diameter of a special tower.", + "unit": "mm", + "type": "float", + "default_value": 3.0, + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "support_enable and support_use_towers" + }, + "support_minimal_diameter": + { + "label": "Minimum Diameter", + "description": "Minimum diameter in the X/Y directions of a small area which is to be supported by a specialized support tower.", + "unit": "mm", + "type": "float", + "default_value": 3.0, + "minimum_value": "0", + "maximum_value_warning": "10", + "maximum_value": "support_tower_diameter", + "enabled": "support_enable and support_use_towers" + }, + "support_tower_roof_angle": + { + "label": "Tower Roof Angle", + "description": "The angle of a rooftop of a tower. A higher value results in pointed tower roofs, a lower value results in flattened tower roofs.", + "unit": "°", + "type": "int", + "minimum_value": "0", + "maximum_value": "90", + "default_value": 65, + "enabled": "support_enable and support_use_towers" + } + } + }, + "platform_adhesion": + { + "label": "Platform Adhesion", + "type": "category", + "icon": "category_adhesion", + "description": "Adhesion", + "children": + { + "adhesion_type": + { + "label": "Platform Adhesion Type", + "description": "Different options that help to improve both priming your extrusion and adhesion to the build plate. Brim adds a single layer flat area around the base of your object to prevent warping. Raft adds a thick grid with a roof below the object. Skirt is a line printed around the object, but not connected to the model.", + "type": "enum", + "options": + { + "skirt": "Skirt", + "brim": "Brim", + "raft": "Raft" + }, + "default_value": "brim", + "global_only": "True" + }, + "skirt_line_count": + { + "label": "Skirt Line Count", + "description": "Multiple skirt lines help to prime your extrusion better for small objects. Setting this to 0 will disable the skirt.", + "type": "int", + "default_value": 1, + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "adhesion_type == \"skirt\"", + "global_only": "True" + }, + "skirt_gap": + { + "label": "Skirt Distance", + "description": "The horizontal distance between the skirt and the first layer of the print.\nThis is the minimum distance, multiple skirt lines will extend outwards from this distance.", + "unit": "mm", + "type": "float", + "default_value": 3, + "minimum_value_warning": "0", + "maximum_value_warning": "100", + "enabled": "adhesion_type == \"skirt\"", + "global_only": "True" + }, + "skirt_minimal_length": + { + "label": "Skirt Minimum Length", + "description": "The minimum length of the skirt. If this length is not reached by the skirt line count, more skirt lines will be added until the minimum length is reached. Note: If the line count is set to 0 this is ignored.", + "unit": "mm", + "type": "float", + "default_value": 250, + "minimum_value": "0", + "minimum_value_warning": "25", + "maximum_value_warning": "2500", + "enabled": "adhesion_type == \"skirt\"", + "global_only": "True" + }, + "brim_width": + { + "label": "Brim Width", + "description": "The distance from the model to the outermost brim line. A larger brim enhances adhesion to the build plate, but also reduces the effective print area.", + "type": "float", + "unit": "mm", + "default_value": 8.0, + "minimum_value": "0.0", + "maximum_value_warning": "100.0", + "enabled": "adhesion_type == \"brim\"", + "global_only": "True", + "children": + { + "brim_line_count": + { + "label": "Brim Line Count", + "description": "The number of lines used for a brim. More brim lines enhance adhesion to the build plate, but also reduces the effective print area.", + "type": "int", + "default_value": 20, + "minimum_value": "0", + "maximum_value_warning": "300", + "value": "math.ceil(brim_width / skirt_line_width)", + "enabled": "adhesion_type == \"brim\"", + "global_only": "True" + } + } + }, + "raft_margin": + { + "label": "Raft Extra Margin", + "description": "If the raft is enabled, this is the extra raft area around the object which is also given a raft. Increasing this margin will create a stronger raft while using more material and leaving less area for your print.", + "unit": "mm", + "type": "float", + "default_value": 5, + "minimum_value_warning": "0", + "maximum_value_warning": "10", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_airgap": + { + "label": "Raft Air Gap", + "description": "The gap between the final raft layer and the first layer of the object. Only the first layer is raised by this amount to lower the bonding between the raft layer and the object. Makes it easier to peel off the raft.", + "unit": "mm", + "type": "float", + "default_value": 0.35, + "minimum_value": "0", + "maximum_value_warning": "1.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_surface_layers": + { + "label": "Raft Top Layers", + "description": "The number of top layers on top of the 2nd raft layer. These are fully filled layers that the object sits on. 2 layers result in a smoother top surface than 1.", + "type": "int", + "default_value": 2, + "minimum_value": "0", + "maximum_value_warning": "20", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_surface_thickness": + { + "label": "Raft Top Layer Thickness", + "description": "Layer thickness of the top raft layers.", + "unit": "mm", + "type": "float", + "default_value": 0.1, + "minimum_value": "0", + "maximum_value_warning": "2.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_surface_line_width": + { + "label": "Raft Top Line Width", + "description": "Width of the lines in the top surface of the raft. These can be thin lines so that the top of the raft becomes smooth.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0.0001", + "maximum_value_warning": "machine_nozzle_size * 2", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_surface_line_spacing": + { + "label": "Raft Top Spacing", + "description": "The distance between the raft lines for the top raft layers. The spacing should be equal to the line width, so that the surface is solid.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0.0001", + "maximum_value_warning": "5.0", + "enabled": "adhesion_type == \"raft\"", + "value": "raft_surface_line_width", + "global_only": "True" + }, + "raft_interface_thickness": + { + "label": "Raft Middle Thickness", + "description": "Layer thickness of the middle raft layer.", + "unit": "mm", + "type": "float", + "default_value": 0.27, + "minimum_value": "0", + "maximum_value_warning": "5.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_interface_line_width": + { + "label": "Raft Middle Line Width", + "description": "Width of the lines in the middle raft layer. Making the second layer extrude more causes the lines to stick to the bed.", + "unit": "mm", + "type": "float", + "default_value": 1, + "value": "line_width", + "minimum_value": "0.0001", + "maximum_value_warning": "machine_nozzle_size * 2", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_interface_line_spacing": + { + "label": "Raft Middle Spacing", + "description": "The distance between the raft lines for the middle raft layer. The spacing of the middle should be quite wide, while being dense enough to support the top raft layers.", + "unit": "mm", + "type": "float", + "default_value": 1.0, + "minimum_value": "0", + "maximum_value_warning": "15.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_base_thickness": + { + "label": "Raft Base Thickness", + "description": "Layer thickness of the base raft layer. This should be a thick layer which sticks firmly to the printer bed.", + "unit": "mm", + "type": "float", + "default_value": 0.3, + "minimum_value": "0", + "maximum_value_warning": "5.0", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_base_line_width": + { + "label": "Raft Base Line Width", + "description": "Width of the lines in the base raft layer. These should be thick lines to assist in bed adhesion.", + "unit": "mm", + "type": "float", + "default_value": 1, + "minimum_value": "0.0001", + "value": "line_width", + "maximum_value_warning": "machine_nozzle_size * 2", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_base_line_spacing": + { + "label": "Raft Line Spacing", + "description": "The distance between the raft lines for the base raft layer. Wide spacing makes for easy removal of the raft from the build plate.", + "unit": "mm", + "type": "float", + "default_value": 3.0, + "minimum_value": "0.0001", + "maximum_value_warning": "100", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True" + }, + "raft_speed": + { + "label": "Raft Print Speed", + "description": "The speed at which the raft is printed.", + "unit": "mm/s", + "type": "float", + "default_value": 30, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "200", + "enabled": "adhesion_type == \"raft\"", + "value": "speed_print / 60 * 30", + "global_only": "True", + "children": + { + "raft_surface_speed": + { + "label": "Raft Surface Print Speed", + "description": "The speed at which the surface raft layers are printed. These should be printed a bit slower, so that the nozzle can slowly smooth out adjacent surface lines.", + "unit": "mm/s", + "type": "float", + "default_value": 30, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "enabled": "adhesion_type == \"raft\"", + "value": "raft_speed", + "global_only": "True" + }, + "raft_interface_speed": + { + "label": "Raft Interface Print Speed", + "description": "The speed at which the interface raft layer is printed. This should be printed quite slowly, as the volume of material coming out of the nozzle is quite high.", + "unit": "mm/s", + "type": "float", + "default_value": 15, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "150", + "enabled": "adhesion_type == \"raft\"", + "value": "0.5 * raft_speed", + "global_only": "True" + }, + "raft_base_speed": + { + "label": "Raft Base Print Speed", + "description": "The speed at which the base raft layer is printed. This should be printed quite slowly, as the volume of material coming out of the nozzle is quite high.", + "unit": "mm/s", + "type": "float", + "default_value": 15, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "200", + "enabled": "adhesion_type == \"raft\"", + "value": "0.5 * raft_speed", + "global_only": "True" + } + } + }, + "raft_fan_speed": + { + "label": "Raft Fan Speed", + "description": "The fan speed for the raft.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "global_only": "True", + "enabled": "adhesion_type == \"raft\"", + "children": + { + "raft_surface_fan_speed": + { + "label": "Raft Surface Fan Speed", + "description": "The fan speed for the surface raft layers.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "global_only": "True", + "value": "raft_fan_speed", + "enabled": "adhesion_type == \"raft\"" + }, + "raft_interface_fan_speed": + { + "label": "Raft Interface Fan Speed", + "description": "The fan speed for the interface raft layer.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "global_only": "True", + "value": "raft_fan_speed", + "enabled": "adhesion_type == \"raft\"" + }, + "raft_base_fan_speed": + { + "label": "Raft Base Fan Speed", + "description": "The fan speed for the base raft layer.", + "unit": "%", + "type": "float", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "global_only": "True", + "value": "raft_fan_speed", + "enabled": "adhesion_type == \"raft\"" + } + } + } + } + }, + "meshfix": + { + "label": "Mesh Fixes", + "type": "category", + "icon": "category_fixes", + "description": "category_fixes", + "children": + { + "meshfix_union_all": + { + "label": "Union Overlapping Volumes", + "description": "Ignore the internal geometry arising from overlapping volumes and print the volumes as one. This may cause internal cavities to disappear.", + "type": "bool", + "default_value": true + }, + "meshfix_union_all_remove_holes": + { + "label": "Remove All Holes", + "description": "Remove the holes in each layer and keep only the outside shape. This will ignore any invisible internal geometry. However, it also ignores layer holes which can be viewed from above or below.", + "type": "bool", + "default_value": false + }, + "meshfix_extensive_stitching": + { + "label": "Extensive Stitching", + "description": "Extensive stitching tries to stitch up open holes in the mesh by closing the hole with touching polygons. This option can introduce a lot of processing time.", + "type": "bool", + "default_value": false + }, + "meshfix_keep_open_polygons": + { + "label": "Keep Disconnected Faces", + "description": "Normally Cura tries to stitch up small holes in the mesh and remove parts of a layer with big holes. Enabling this option keeps those parts which cannot be stitched. This option should be used as a last resort option when everything else fails to produce proper GCode.", + "type": "bool", + "default_value": false + } + } + }, + "blackmagic": + { + "label": "Special Modes", + "type": "category", + "icon": "category_blackmagic", + "description": "category_blackmagic", + "children": + { + "print_sequence": + { + "label": "Print Sequence", + "description": "Whether to print all objects one layer at a time or to wait for one object to finish, before moving on to the next. One at a time mode is only possible if all models are separated in such a way that the whole print head can move in between and all models are lower than the distance between the nozzle and the X/Y axes.", + "type": "enum", + "options": + { + "all_at_once": "All at Once", + "one_at_a_time": "One at a Time" + }, + "default_value": "all_at_once", + "global_only": true + }, + "magic_mesh_surface_mode": + { + "label": "Surface Mode", + "description": "Treat the model as a surface only, a volume, or volumes with loose surfaces. The normal print mode only prints enclosed volumes. \"Surface\" prints a single wall tracing the mesh surface with no infill and no top/bottom skin. \"Both\" prints enclosed volumes like normal and any remaining polygons as surfaces.", + "type": "enum", + "options": + { + "normal": "Normal", + "surface": "Surface", + "both": "Both" + }, + "default_value": "normal" + }, + "magic_spiralize": + { + "label": "Spiralize Outer Contour", + "description": "Spiralize smooths out the Z move of the outer edge. This will create a steady Z increase over the whole print. This feature turns a solid object into a single walled print with a solid bottom. This feature used to be called Joris in older versions.", + "type": "bool", + "default_value": false, + "global_only": "True" + } + } + }, + "experimental": + { + "label": "Experimental Modes", + "type": "category", + "icon": "category_blackmagic", + "description": "experimental!", + "children": + { + "draft_shield_enabled": + { + "label": "Enable Draft Shield", + "description": "This will create a wall around the object, which traps (hot) air and shields against exterior airflow. Especially useful for materials which warp easily.", + "type": "bool", + "default_value": false, + "global_only": true + }, + "draft_shield_dist": + { + "label": "Draft Shield X/Y Distance", + "description": "Distance of the draft shield from the print, in the X/Y directions.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "100", + "default_value": 10, + "enabled": "draft_shield_enabled", + "global_only": true + }, + "draft_shield_height_limitation": + { + "label": "Draft Shield Limitation", + "description": "Set the height of the draft shield. Choose to print the draft shield at the full height of the object or at a limited height.", + "type": "enum", + "options": + { + "full": "Full", + "limited": "Limited" + }, + "default_value": "full", + "enabled": "draft_shield_enabled", + "global_only": true + }, + "draft_shield_height": + { + "label": "Draft Shield Height", + "description": "Height limitation of the draft shield. Above this height no draft shield will be printed.", + "unit": "mm", + "type": "float", + "minimum_value": "0", + "maximum_value_warning": "9999", + "default_value": 0, + "value": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", + "enabled": "draft_shield_height_limitation == \"limited\"", + "global_only": true + }, + "coasting_enable": + { + "label": "Enable Coasting", + "description": "Coasting replaces the last part of an extrusion path with a travel path. The oozed material is used to print the last piece of the extrusion path in order to reduce stringing.", + "type": "bool", + "default_value": false, + "global_only": true + }, + "coasting_volume": + { + "label": "Coasting Volume", + "description": "The volume otherwise oozed. This value should generally be close to the nozzle diameter cubed.", + "unit": "mm³", + "type": "float", + "default_value": 0.064, + "minimum_value": "0", + "maximum_value_warning": "2.0", + "enabled": "coasting_enable", + "global_only": true + }, + "coasting_min_volume": + { + "label": "Minimum Volume Before Coasting", + "description": "The smallest volume an extrusion path should have before allowing coasting. For smaller extrusion paths, less pressure has been built up in the bowden tube and so the coasted volume is scaled linearly. This value should always be larger than the Coasting Volume.", + "unit": "mm³", + "type": "float", + "default_value": 0.8, + "minimum_value": "0", + "maximum_value_warning": "10.0", + "enabled": "coasting_enable", + "global_only": true + }, + "coasting_speed": + { + "label": "Coasting Speed", + "description": "The speed by which to move during coasting, relative to the speed of the extrusion path. A value slightly under 100% is advised, since during the coasting move the pressure in the bowden tube drops.", + "unit": "%", + "type": "float", + "default_value": 90, + "minimum_value": "0.0001", + "maximum_value_warning": "100", + "enabled": "coasting_enable", + "global_only": true + }, + "skin_outline_count": + { + "label": "Extra Skin Wall Count", + "description": "Replaces the outermost part of the top/bottom pattern with a number of concentric lines. Using one or two lines improves roofs that start on infill material.", + "default_value": 0, + "minimum_value": "0", + "maximum_value_warning": "10", + "type": "int" + }, + "skin_alternate_rotation": + { + "label": "Alternate Skin Rotation", + "description": "Alternate the direction in which the top/bottom layers are printed. Normally they are printed diagonally only. This setting adds the X-only and Y-only directions.", + "type": "bool", + "default_value": false, + "enabled": "top_bottom_pattern != \"concentric\"" + }, + "support_conical_enabled": + { + "label": "Enable Conical Support", + "description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.", + "type": "bool", + "default_value": false, + "enabled": "support_enable" + }, + "support_conical_angle": + { + "label": "Conical Support Angle", + "description": "The angle of the tilt of conical support. With 0 degrees being vertical, and 90 degrees being horizontal. Smaller angles cause the support to be more sturdy, but consist of more material. Negative angles cause the base of the support to be wider than the top.", + "unit": "°", + "type": "float", + "minimum_value": "-90", + "minimum_value_warning": "-45", + "maximum_value_warning": "45", + "maximum_value": "90", + "default_value": 30, + "enabled": "support_conical_enabled and support_enable" + }, + "support_conical_min_width": + { + "label": "Conical Support Minimum Width", + "description": "Minimum width to which the base of the conical support area is reduced. Small widths can lead to unstable support structures.", + "unit": "mm", + "default_value": 5.0, + "minimum_value": "0", + "minimum_value_warning": "machine_nozzle_size * 3", + "maximum_value_warning": "100.0", + "type": "float", + "enabled": "support_conical_enabled and support_enable" + }, + "magic_fuzzy_skin_enabled": + { + "label": "Fuzzy Skin", + "description": "Randomly jitter while printing the outer wall, so that the surface has a rough and fuzzy look.", + "type": "bool", + "default_value": false + }, + "magic_fuzzy_skin_thickness": + { + "label": "Fuzzy Skin Thickness", + "description": "The width within which to jitter. It's advised to keep this below the outer wall width, since the inner walls are unaltered.", + "type": "float", + "unit": "mm", + "default_value": 0.3, + "minimum_value": "0.001", + "maximum_value_warning": "wall_line_width_0", + "enabled": "magic_fuzzy_skin_enabled" + }, + "magic_fuzzy_skin_point_density": + { + "label": "Fuzzy Skin Density", + "description": "The average density of points introduced on each polygon in a layer. Note that the original points of the polygon are discarded, so a low density results in a reduction of the resolution.", + "type": "float", + "unit": "1/mm", + "default_value": 1.25, + "minimum_value": "0.008", + "minimum_value_warning": "0.1", + "maximum_value_warning": "10", + "maximum_value": "2 / magic_fuzzy_skin_thickness", + "enabled": "magic_fuzzy_skin_enabled", + "children": + { + "magic_fuzzy_skin_point_dist": + { + "label": "Fuzzy Skin Point Distance", + "description": "The average distance between the random points introduced on each line segment. Note that the original points of the polygon are discarded, so a high smoothness results in a reduction of the resolution. This value must be higher than half the Fuzzy Skin Thickness.", + "type": "float", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "magic_fuzzy_skin_thickness / 2", + "minimum_value_warning": "0.1", + "maximum_value_warning": "10", + "value": "10000 if parent_value == 0 else 1 / magic_fuzzy_skin_point_density", + "enabled": "magic_fuzzy_skin_enabled" + } + } + }, + "wireframe_enabled": + { + "label": "Wire Printing", + "description": "Print only the outside surface with a sparse webbed structure, printing 'in thin air'. This is realized by horizontally printing the contours of the model at given Z intervals which are connected via upward and diagonally downward lines.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "wireframe_height": + { + "label": "WP Connection Height", + "description": "The height of the upward and diagonally downward lines between two horizontal parts. This determines the overall density of the net structure. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 3, + "minimum_value": "0.0001", + "maximum_value_warning": "20", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_roof_inset": + { + "label": "WP Roof Inset Distance", + "description": "The distance covered when making a connection from a roof outline inward. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 3, + "minimum_value": "0", + "minimum_value_warning": "machine_nozzle_size", + "maximum_value_warning": "20", + "enabled": "wireframe_enabled", + "value": "wireframe_height", + "global_only": "True" + }, + "wireframe_printspeed": + { + "label": "WP Speed", + "description": "Speed at which the nozzle moves when extruding material. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "50", + "enabled": "wireframe_enabled", + "global_only": "True", + "children": + { + "wireframe_printspeed_bottom": + { + "label": "WP Bottom Printing Speed", + "description": "Speed of printing the first layer, which is the only layer touching the build platform. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "50", + "enabled": "wireframe_enabled", + "global_only": "True", + "value": "wireframe_printspeed" + }, + "wireframe_printspeed_up": + { + "label": "WP Upward Printing Speed", + "description": "Speed of printing a line upward 'in thin air'. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "50", + "enabled": "wireframe_enabled", + "global_only": "True", + "value": "wireframe_printspeed" + }, + "wireframe_printspeed_down": + { + "label": "WP Downward Printing Speed", + "description": "Speed of printing a line diagonally downward. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "50", + "enabled": "wireframe_enabled", + "global_only": "True", + "value": "wireframe_printspeed" + }, + "wireframe_printspeed_flat": + { + "label": "WP Horizontal Printing Speed", + "description": "Speed of printing the horizontal contours of the object. Only applies to Wire Printing.", + "unit": "mm/s", + "type": "float", + "default_value": 5, + "minimum_value": "0.1", + "maximum_value": "299792458000", + "maximum_value_warning": "100", + "value": "wireframe_printspeed", + "enabled": "wireframe_enabled", + "global_only": "True" + } + } + }, + "wireframe_flow": + { + "label": "WP Flow", + "description": "Flow compensation: the amount of material extruded is multiplied by this value. Only applies to Wire Printing.", + "unit": "%", + "default_value": 100, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "float", + "enabled": "wireframe_enabled", + "global_only": "True", + "children": + { + "wireframe_flow_connection": + { + "label": "WP Connection Flow", + "description": "Flow compensation when going up or down. Only applies to Wire Printing.", + "unit": "%", + "default_value": 100, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "float", + "enabled": "wireframe_enabled", + "global_only": "True", + "value": "wireframe_flow" + }, + "wireframe_flow_flat": + { + "label": "WP Flat Flow", + "description": "Flow compensation when printing flat lines. Only applies to Wire Printing.", + "unit": "%", + "default_value": 100, + "minimum_value": "0", + "maximum_value_warning": "100", + "type": "float", + "enabled": "wireframe_enabled", + "global_only": "True", + "value": "wireframe_flow" + } + } + }, + "wireframe_top_delay": + { + "label": "WP Top Delay", + "description": "Delay time after an upward move, so that the upward line can harden. Only applies to Wire Printing.", + "unit": "sec", + "type": "float", + "default_value": 0, + "minimum_value": "0", + "maximum_value_warning": "1", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_bottom_delay": + { + "label": "WP Bottom Delay", + "description": "Delay time after a downward move. Only applies to Wire Printing.", + "unit": "sec", + "type": "float", + "default_value": 0, + "minimum_value": "0", + "maximum_value_warning": "1", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_flat_delay": + { + "label": "WP Flat Delay", + "description": "Delay time between two horizontal segments. Introducing such a delay can cause better adhesion to previous layers at the connection points, while too long delays cause sagging. Only applies to Wire Printing.", + "unit": "sec", + "type": "float", + "default_value": 0.1, + "minimum_value": "0", + "maximum_value_warning": "0.5", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_up_half_speed": + { + "label": "WP Ease Upward", + "description": "Distance of an upward move which is extruded with half speed.\nThis can cause better adhesion to previous layers, while not heating the material in those layers too much. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.3, + "minimum_value": "0", + "maximum_value_warning": "5.0", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_top_jump": + { + "label": "WP Knot Size", + "description": "Creates a small knot at the top of an upward line, so that the consecutive horizontal layer has a better chance to connect to it. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.6, + "minimum_value": "0", + "maximum_value_warning": "2.0", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_fall_down": + { + "label": "WP Fall Down", + "description": "Distance with which the material falls down after an upward extrusion. This distance is compensated for. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.5, + "minimum_value": "0", + "maximum_value_warning": "wireframe_height", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_drag_along": + { + "label": "WP Drag Along", + "description": "Distance with which the material of an upward extrusion is dragged along with the diagonally downward extrusion. This distance is compensated for. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.6, + "minimum_value": "0", + "maximum_value_warning": "wireframe_height", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_strategy": + { + "label": "WP Strategy", + "description": "Strategy for making sure two consecutive layers connect at each connection point. Retraction lets the upward lines harden in the right position, but may cause filament grinding. A knot can be made at the end of an upward line to heighten the chance of connecting to it and to let the line cool; however, it may require slow printing speeds. Another strategy is to compensate for the sagging of the top of an upward line; however, the lines won't always fall down as predicted.", + "type": "enum", + "options": + { + "compensate": "Compensate", + "knot": "Knot", + "retract": "Retract" + }, + "default_value": "compensate", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_straight_before_down": + { + "label": "WP Straighten Downward Lines", + "description": "Percentage of a diagonally downward line which is covered by a horizontal line piece. This can prevent sagging of the top most point of upward lines. Only applies to Wire Printing.", + "type": "float", + "unit": "%", + "default_value": 20, + "minimum_value": "0", + "maximum_value": "100", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_roof_fall_down": + { + "label": "WP Roof Fall Down", + "description": "The distance which horizontal roof lines printed 'in thin air' fall down when being printed. This distance is compensated for. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 2, + "minimum_value_warning": "0", + "maximum_value_warning": "wireframe_roof_inset", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_roof_drag_along": + { + "label": "WP Roof Drag Along", + "description": "The distance of the end piece of an inward line which gets dragged along when going back to the outer outline of the roof. This distance is compensated for. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 0.8, + "minimum_value": "0", + "maximum_value_warning": "10", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_roof_outer_delay": + { + "label": "WP Roof Outer Delay", + "description": "Time spent at the outer perimeters of hole which is to become a roof. Longer times can ensure a better connection. Only applies to Wire Printing.", + "type": "float", + "unit": "sec", + "default_value": 0.2, + "minimum_value": "0", + "maximum_value_warning": "2.0", + "enabled": "wireframe_enabled", + "global_only": "True" + }, + "wireframe_nozzle_clearance": + { + "label": "WP Nozzle Clearance", + "description": "Distance between the nozzle and horizontally downward lines. Larger clearance results in diagonally downward lines with a less steep angle, which in turn results in less upward connections with the next layer. Only applies to Wire Printing.", + "type": "float", + "unit": "mm", + "default_value": 1, + "minimum_value_warning": "0", + "maximum_value_warning": "10.0", + "enabled": "wireframe_enabled", + "global_only": "True" + } + } + } + } +} From 6dc74768397c1621f02ff5c598ac2ad50b0d4e47 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 9 May 2016 15:45:58 +0200 Subject: [PATCH 124/424] Removed final parent_value from functions CURA-1278 --- resources/definitions/fdmprinter.def.json | 6 +- resources/machines/fdmprinter.def.json | 2468 --------------------- 2 files changed, 3 insertions(+), 2471 deletions(-) delete mode 100644 resources/machines/fdmprinter.def.json diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index cf92aa847f..00895fd056 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -457,7 +457,7 @@ "minimum_value": "0", "maximum_value_warning": "100", "type": "int", - "value": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + "value": "0 if infill_sparse_density == 100 else math.ceil(round(top_thickness / layer_height, 4))" } } }, @@ -479,7 +479,7 @@ "minimum_value": "0", "default_value": 6, "type": "int", - "value": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + "value": "999999 if infill_sparse_density == 100 else math.ceil(round(bottom_thickness / layer_height, 4))" } } } @@ -2151,7 +2151,7 @@ "minimum_value": "magic_fuzzy_skin_thickness / 2", "minimum_value_warning": "0.1", "maximum_value_warning": "10", - "value": "10000 if parent_value == 0 else 1 / magic_fuzzy_skin_point_density", + "value": "10000 if magic_fuzzy_skin_point_density == 0 else 1 / magic_fuzzy_skin_point_density", "enabled": "magic_fuzzy_skin_enabled" } } diff --git a/resources/machines/fdmprinter.def.json b/resources/machines/fdmprinter.def.json deleted file mode 100644 index cf92aa847f..0000000000 --- a/resources/machines/fdmprinter.def.json +++ /dev/null @@ -1,2468 +0,0 @@ -{ - "id": "fdmprinter", - "version": 2, - "metadata": - { - "category": "Ultimaker", - "manufacturer": "Ultimaker", - "visible": false - }, - "name": "FDM Printer Base Description", - "author": "Ultimaker B.V.", - "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", - "settings": - { - "machine_settings": - { - "label": "Machine", - "type": "category", - "description": "Machine specific settings", - "children": - { - "machine_show_variants": - { - "description": "Whether to show the different variants of this machine, which are described in separate json files.", - "default_value": false, - "type": "bool", - "label": "Show machine variants" - }, - "machine_start_gcode": - { - "description": "Gcode commands to be executed at the very start - separated by \\n.", - "default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0", - "label": "Start GCode", - "global_only": true, - "type": "str" - }, - "machine_end_gcode": - { - "description": "Gcode commands to be executed at the very end - separated by \\n.", - "default_value": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84", - "label": "End GCode", - "global_only": true, - "type": "str" - }, - "material_bed_temp_wait": - { - "description": "Whether to insert a command to wait until the bed temperature is reached at the start.", - "label": "Wait for bed heatup", - "default_value": true, - "global_only": true, - "type": "bool" - }, - "material_print_temp_prepend": - { - "description": "Whether to include nozzle temperature commands at the start of the gcode. When the start_gcode already contains nozzle temperature commands Cura frontend will automatically disable this setting.", - "default_value": true, - "global_only": true, - "type": "bool", - "label": "Wait for material heatup" - }, - "machine_width": - { - "description": "The width (X-direction) of the printable area.", - "default_value": 100, - "global_only": true, - "type": "float", - "label": "Machine width" - }, - "machine_depth": - { - "description": "The depth (Y-direction) of the printable area.", - "default_value": 100, - "global_only": true, - "type": "float", - "label": "Machine depth" - }, - "machine_height": - { - "description": "The height (Z-direction) of the printable area.", - "default_value": 100, - "global_only": true, - "type": "float", - "label": "Machine height" - }, - "machine_heated_bed": - { - "description": "Whether the machine has a heated bed present.", - "default_value": false, - "global_only": true, - "label": "Has heated bed", - "type": "bool" - }, - "machine_center_is_zero": - { - "description": "Whether the X/Y coordinates of the zero position of the printer is at the center of the printable area.", - "default_value": false, - "global_only": true, - "type": "bool", - "label": "Is center origin" - }, - "machine_extruder_count": - { - "description": "Number of extruder trains. An extruder train is the combination of a feeder, bowden tube, and nozzle.", - "default_value": 1, - "global_only": true, - "type": "bool", - "label": "Number extruders" - }, - "machine_nozzle_tip_outer_diameter": - { - "description": "The outer diameter of the tip of the nozzle.", - "label": "Outer nozzle diameter", - "default_value": 1, - "global_only": true, - "type": "float" - }, - "machine_nozzle_head_distance": - { - "description": "The height difference between the tip of the nozzle and the lowest part of the print head.", - "default_value": 3, - "global_only": true, - "type": "float", - "label": "Nozzle length" - }, - "machine_nozzle_expansion_angle": - { - "description": "The angle between the horizontal plane and the conical part right above the tip of the nozzle.", - "default_value": 45, - "global_only": true, - "type": "int", - "label": "Nozzle angle" - }, - "machine_heat_zone_length": - { - "description": "The distance from the tip of the nozzle in which heat from the nozzle is transfered to the filament.", - "default_value": 16, - "global_only": true, - "type": "float", - "label": "Heat zone length" - }, - "machine_nozzle_heat_up_speed": - { - "description": "The speed (°C/s) by which the nozzle heats up averaged over the window of normal printing temperatures and the standby temperature.", - "default_value": 2.0, - "global_only": true, - "type": "float", - "label": "Heat up speed" - }, - "machine_nozzle_cool_down_speed": - { - "description": "The speed (°C/s) by which the nozzle cools down averaged over the window of normal printing temperatures and the standby temperature.", - "default_value": 2.0, - "global_only": true, - "type": "float", - "label": "Cool down speed" - }, - "machine_gcode_flavor": - { - "description": "The type of gcode to be generated.", - "default_value": "RepRap", - "global_only": true, - "type": "str", - "label": "Gcode flavour" - }, - "machine_disallowed_areas": - { - "description": "A list of polygons with areas the print head is not allowed to enter.", - "type": "polygons", - "default_value": [], - "global_only": true, - "label": "Disallowed areas" - }, - "machine_head_polygon": - { - "description": "A 2D silhouette of the print head (fan caps excluded).", - "type": "polygon", - "default_value": - [ - [ - -1, - 1 - ], - [ - -1, - -1 - ], - [ - 1, - -1 - ], - [ - 1, - 1 - ] - ], - "global_only": true, - "label": "Machine head polygon" - }, - "machine_head_with_fans_polygon": - { - "description": "A 2D silhouette of the print head (fan caps included).", - "type": "polygon", - "default_value": - [ - [ - -20, - 10 - ], - [ - 10, - 10 - ], - [ - 10, - -10 - ], - [ - -20, - -10 - ] - ], - "global_only": true, - "label": "Machine head & Fan polygon" - }, - "gantry_height": - { - "description": "The height difference between the tip of the nozzle and the gantry system (X and Y axes).", - "default_value": 99999999999, - "global_only": true, - "label": "Gantry height", - "type": "float" - }, - "machine_nozzle_size": - { - "label": "Nozzle Diameter", - "description": "The inner diameter of the nozzle. Change this setting when using a non-standard nozzle size.", - "unit": "mm", - "type": "float", - "default_value": 0.4, - "minimum_value": "0.001", - "maximum_value_warning": "10" - } - } - }, - "resolution": - { - "label": "Quality", - "type": "category", - "icon": "category_layer_height", - "description": "All settings that influence the resolution of the print. These settings have a large impact on the quality (and print time)", - "children": - { - "layer_height": - { - "label": "Layer Height", - "description": "The height of each layer in mm. Higher values produce faster prints in lower resolution, lower values produce slower prints in higher resolution.", - "unit": "mm", - "type": "float", - "default_value": 0.1, - "minimum_value": "0.001", - "minimum_value_warning": "0.04", - "maximum_value_warning": "0.8 * machine_nozzle_size", - "global_only": "True" - }, - "layer_height_0": - { - "label": "Initial Layer Height", - "description": "The height of the initial layer in mm. A thicker initial layer makes adhesion to the build plate easier.", - "unit": "mm", - "type": "float", - "default_value": 0.3, - "minimum_value": "0.001", - "minimum_value_warning": "0.04", - "maximum_value_warning": "0.8 * machine_nozzle_size", - "global_only": "True" - }, - "line_width": - { - "label": "Line Width", - "description": "Width of a single line. Generally, the width of each line should correspond to the width of the nozzle. However, slightly reducing this value could produce better prints.", - "unit": "mm", - "minimum_value": "0.0001", - "minimum_value_warning": "0.2", - "maximum_value_warning": "2 * machine_nozzle_size", - "default_value": 0.4, - "type": "float", - "value": "machine_nozzle_size", - "children": - { - "wall_line_width": - { - "label": "Wall Line Width", - "description": "Width of a single wall line.", - "unit": "mm", - "minimum_value": "0.0001", - "minimum_value_warning": "0.2", - "maximum_value_warning": "5", - "value":"line_width", - "default_value": 0.4, - "type": "float", - "children": - { - "wall_line_width_0": - { - "label": "Outer Wall Line Width", - "description": "Width of the outermost wall line. By lowering this value, higher levels of detail can be printed.", - "unit": "mm", - "minimum_value": "0.0001", - "minimum_value_warning": "0.2", - "maximum_value_warning": "5", - "default_value": 0.4, - "value":"wall_line_width", - "type": "float" - }, - "wall_line_width_x": - { - "label": "Inner Wall(s) Line Width", - "description": "Width of a single wall line for all wall lines except the outermost one.", - "unit": "mm", - "minimum_value": "0.0001", - "minimum_value_warning": "0.2", - "maximum_value_warning": "5", - "default_value": 0.4, - "value":"wall_line_width", - "type": "float" - } - } - }, - "skin_line_width": - { - "label": "Top/bottom Line Width", - "description": "Width of a single top/bottom line.", - "unit": "mm", - "minimum_value": "0.0001", - "minimum_value_warning": "0.2", - "maximum_value_warning": "5", - "default_value": 0.4, - "type": "float", - "value": "line_width" - }, - "infill_line_width": - { - "label": "Infill Line Width", - "description": "Width of a single infill line.", - "unit": "mm", - "minimum_value": "0.0001", - "minimum_value_warning": "0.2", - "maximum_value_warning": "5", - "default_value": 0.4, - "type": "float", - "value": "line_width" - }, - "skirt_line_width": - { - "label": "Skirt Line Width", - "description": "Width of a single skirt line.", - "unit": "mm", - "minimum_value": "0.0001", - "minimum_value_warning": "0.2", - "maximum_value_warning": "5", - "default_value": 0.4, - "type": "float", - "global_only": true, - "value": "line_width" - }, - "support_line_width": - { - "label": "Support Line Width", - "description": "Width of a single support structure line.", - "unit": "mm", - "minimum_value": "0.0001", - "minimum_value_warning": "0.2", - "maximum_value_warning": "5", - "default_value": 0.4, - "type": "float", - "enabled": "support_enable", - "global_only": true, - "value": "line_width" - }, - "support_roof_line_width": - { - "label": "Support Roof Line Width", - "description": "Width of a single support roof line.", - "unit": "mm", - "default_value": 0.4, - "minimum_value": "0.0001", - "maximum_value_warning": "machine_nozzle_size * 2", - "type": "float", - "enabled": "support_roof_enable", - "global_only": true, - "value": "line_width" - } - } - } - } - }, - "shell": - { - "label": "Shell", - "icon": "category_shell", - "description": "Shell", - "type": "category", - "children": - { - "wall_thickness": - { - "label": "Wall Thickness", - "description": "The thickness of the outside walls in the horizontal direction. This value divided by the wall line width defines the number of walls.", - "unit": "mm", - "default_value": 0.8, - "minimum_value": "0", - "minimum_value_warning": "line_width", - "maximum_value_warning": "5 * line_width", - "type": "float", - "children": - { - "wall_line_count": - { - "label": "Wall Line Count", - "description": "The number of walls. When calculated by the wall thickness, this value is rounded to a whole number.", - "default_value": 2, - "minimum_value": "0", - "type": "int", - "value": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" - } - } - }, - "top_bottom_thickness": - { - "label": "Top/Bottom Thickness", - "description": "The thickness of the top/bottom layers in the print. This value divided by the layer height defines the number of top/bottom layers.", - "unit": "mm", - "default_value": 0.8, - "minimum_value": "0", - "maximum_value": "5", - "minimum_value_warning": "0.6", - "type": "float", - "children": - { - "top_thickness": - { - "label": "Top Thickness", - "description": "The thickness of the top layers in the print. This value divided by the layer height defines the number of top layers.", - "unit": "mm", - "default_value": 0.8, - "minimum_value": "0", - "maximum_value_warning": "100", - "type": "float", - "value": "top_bottom_thickness", - "children": - { - "top_layers": - { - "label": "Top Layers", - "description": "The number of top layers. When calculated by the top thickness, this value is rounded to a whole number.", - "default_value": 8, - "minimum_value": "0", - "maximum_value_warning": "100", - "type": "int", - "value": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" - } - } - }, - "bottom_thickness": - { - "label": "Bottom Thickness", - "description": "The thickness of the bottom layers in the print. This value divided by the layer height defines the number of bottom layers.", - "unit": "mm", - "default_value": 0.6, - "minimum_value": "0", - "type": "float", - "value": "top_bottom_thickness", - "children": - { - "bottom_layers": - { - "label": "Bottom Layers", - "description": "The number of bottom layers. When calculated by the bottom thickness, this value is rounded to a whole number.", - "minimum_value": "0", - "default_value": 6, - "type": "int", - "value": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" - } - } - } - } - }, - "top_bottom_pattern": - { - "label": "Top/Bottom Pattern", - "description": "The pattern of the top/bottom layers.", - "type": "enum", - "options": - { - "lines": "Lines", - "concentric": "Concentric", - "zigzag": "Zig Zag" - }, - "default_value": "lines" - }, - "wall_0_inset": - { - "label": "Outer Wall Inset", - "description": "Inset applied to the path of the outer wall. If the outer wall is smaller than the nozzle, and printed after the inner walls, use this offset to get the hole in the nozzle to overlap with the inner walls instead of the outside of the object.", - "unit": "mm", - "type": "float", - "default_value": 0.0, - "value": "(machine_nozzle_size - wall_line_width_0) / 2 if wall_line_width_0 < machine_nozzle_size else 0", - "minimum_value_warning": "0", - "maximum_value_warning": "machine_nozzle_size" - }, - "alternate_extra_perimeter": - { - "label": "Alternate Extra Wall", - "description": "Prints an extra wall at every other layer. This way infill gets caught between these extra walls, resulting in stronger prints.", - "type": "bool", - "default_value": false - }, - "remove_overlapping_walls_enabled": - { - "label": "Remove Overlapping Wall Parts", - "description": "Remove parts of a wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin parts and sharp corners in models.", - "type": "bool", - "default_value": false, - "enabled": "False", - "children": - { - "remove_overlapping_walls_0_enabled": - { - "label": "Remove Overlapping Outer Wall Parts", - "description": "Remove parts of an outer wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin pieces in a model and sharp corners.", - "type": "bool", - "default_value": false, - "value": "remove_overlapping_walls_enabled", - "enabled": "False" - }, - "remove_overlapping_walls_x_enabled": - { - "label": "Remove Overlapping Inner Wall Parts", - "description": "Remove parts of an inner wall that would otherwise overlap and cause over-extrusion. These overlaps occur in thin pieces in a model and sharp corners.", - "type": "bool", - "default_value": true, - "value": "remove_overlapping_walls_enabled" - } - } - }, - "fill_perimeter_gaps": - { - "label": "Fill Gaps Between Walls", - "description": "Fills the gaps between walls when overlapping inner wall parts are removed.", - "type": "enum", - "options": - { - "nowhere": "Nowhere", - "everywhere": "Everywhere", - "skin": "Skin" - }, - "default_value": "everywhere", - "enabled": "remove_overlapping_walls_x_enabled" - }, - "travel_compensate_overlapping_walls_enabled": - { - "label": "Compensate Wall Overlaps", - "description": "Compensate the flow for parts of a wall being printed where there is already a wall in place.", - "type": "bool", - "default_value": true - }, - "xy_offset": - { - "label": "Horizontal Expansion", - "description": "Amount of offset applied to all polygons in each layer. Positive values can compensate for too big holes; negative values can compensate for too small holes.", - "unit": "mm", - "type": "float", - "minimum_value_warning": "-10", - "maximum_value_warning": "10", - "default_value": 0 - }, - "z_seam_type": - { - "label": "Z Seam Alignment", - "description": "Starting point of each path in a layer. When paths in consecutive layers start at the same point a vertical seam may show on the print. When aligning these at the back, the seam is easiest to remove. When placed randomly the inaccuracies at the paths' start will be less noticeable. When taking the shortest path the print will be quicker.", - "type": "enum", - "options": - { - "back": "Back", - "shortest": "Shortest", - "random": "Random" - }, - "default_value": "shortest" - }, - "skin_no_small_gaps_heuristic": - { - "label": "Ignore Small Z Gaps", - "description": "When the model has small vertical gaps, about 5% extra computation time can be spent on generating top and bottom skin in these narrow spaces. In such case, disable the setting.", - "type": "bool", - "default_value": true - } - } - }, - "infill": - { - "label": "Infill", - "icon": "category_infill", - "description": "Infill", - "type": "category", - "children": - { - "infill_sparse_density": - { - "label": "Infill Density", - "description": "Adjusts the density of infill of the print.", - "unit": "%", - "type": "float", - "default_value": 20, - "minimum_value": "0", - "maximum_value_warning": "100", - "children": - { - "infill_line_distance": - { - "label": "Infill Line Distance", - "description": "Distance between the printed infill lines. This setting is calculated by the infill density and the infill line width.", - "unit": "mm", - "type": "float", - "default_value": 2, - "minimum_value": "0", - "value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" - } - } - }, - "infill_pattern": - { - "label": "Infill Pattern", - "description": "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, triangle and concentric patterns are fully printed every layer.", - "type": "enum", - "options": - { - "grid": "Grid", - "lines": "Lines", - "triangles": "Triangles", - "concentric": "Concentric", - "zigzag": "Zig Zag" - }, - "default_value": "grid", - "value": "'lines' if infill_sparse_density > 25 else 'grid'" - }, - "infill_overlap": - { - "label": "Infill Overlap Percentage", - "description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.", - "unit": "%", - "type": "float", - "default_value": 10, - "value": "10 if infill_sparse_density < 95 else 0", - "minimum_value_warning": "-50", - "maximum_value_warning": "100", - "children": - { - "infill_overlap_mm": - { - "label": "Infill Overlap", - "description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.", - "unit": "mm", - "type": "float", - "default_value": 0.04, - "minimum_value_warning": "-0.5 * machine_nozzle_size", - "maximum_value_warning": "machine_nozzle_size", - "value": "infill_line_width * infill_overlap / 100 if infill_sparse_density < 95 else 0" - } - } - }, - "infill_wipe_dist": - { - "label": "Infill Wipe Distance", - "description": "Distance of a travel move inserted after every infill line, to make the infill stick to the walls better. This option is similar to infill overlap, but without extrusion and only on one end of the infill line.", - "unit": "mm", - "type": "float", - "default_value": 0.04, - "value": "wall_line_width_0 / 4 if wall_line_count == 1 else wall_line_width_x / 4", - "minimum_value_warning": "0", - "maximum_value_warning": "machine_nozzle_size" - }, - "infill_sparse_thickness": - { - "label": "Infill Layer Thickness", - "description": "The thickness per layer of infill material. This value should always be a multiple of the layer height and is otherwise rounded.", - "unit": "mm", - "type": "float", - "default_value": 0.1, - "minimum_value": "0.0001", - "maximum_value_warning": "0.32", - "maximum_value": "layer_height * 8", - "value": "layer_height" - }, - "infill_before_walls": - { - "label": "Infill Before Walls", - "description": "Print the infill before printing the walls. Printing the walls first may lead to more accurate walls, but overhangs print worse. Printing the infill first leads to sturdier walls, but the infill pattern might sometimes show through the surface.", - "type": "bool", - "default_value": true - } - } - }, - "material": - { - "label": "Material", - "icon": "category_material", - "description": "Material", - "type": "category", - "children": - { - "material_flow_dependent_temperature": - { - "label": "Auto Temperature", - "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", - "type": "bool", - "default_value": false, - "enabled": "False", - "global_only": true - }, - "material_print_temperature": - { - "label": "Printing Temperature", - "description": "The temperature used for printing. Set at 0 to pre-heat the printer manually.", - "unit": "°C", - "type": "float", - "default_value": 210, - "minimum_value": "0", - "maximum_value_warning": "260", - "enabled": "not (material_flow_dependent_temperature)" - }, - "material_flow_temp_graph": - { - "label": "Flow Temperature Graph", - "description": "Data linking material flow (in mm3 per second) to temperature (degrees Celsius).", - "unit": "", - "type": "str", - "default_value": "[[3.5,200],[7.0,240]]", - "enabled": "False", - "comments": "old enabled function: material_flow_dependent_temperature", - "global_only": true - }, - "material_extrusion_cool_down_speed": { - "label": "Extrusion Cool Down Speed Modifier", - "description": "The extra speed by which the nozzle cools while extruding. The same value is used to signify the heat up speed lost when heating up while extruding.", - "unit": "°C/s", - "type": "float", - "default_value": 0.5, - "minimum_value": "0", - "maximum_value_warning": "10.0", - "global_only": "True", - "enabled": "False", - "comments": "old enabled function: material_flow_dependent_temperature or machine_extruder_count > 1" - }, - "material_bed_temperature": { - "label": "Bed Temperature", - "description": "The temperature used for the heated bed. Set at 0 to pre-heat the printer manually.", - "unit": "°C", - "type": "float", - "default_value": 60, - "minimum_value": "0", - "maximum_value_warning": "260", - "enabled": "machine_heated_bed", - "global_only": "True" - }, - "material_diameter": { - "label": "Diameter", - "description": "Adjusts the diameter of the filament used. Match this value with the diameter of the used filament.", - "unit": "mm", - "type": "float", - "default_value": 2.85, - "minimum_value": "0.0001", - "minimum_value_warning": "0.4", - "maximum_value_warning": "3.5", - "global_only": "True" - }, - "material_flow": { - "label": "Flow", - "description": "Flow compensation: the amount of material extruded is multiplied by this value.", - "unit": "%", - "default_value": 100, - "type": "float", - "minimum_value": "5", - "minimum_value_warning": "50", - "maximum_value_warning": "150" - }, - "retraction_enable": { - "label": "Enable Retraction", - "description": "Retract the filament when the nozzle is moving over a non-printed area. ", - "type": "bool", - "default_value": true - }, - "retraction_amount": { - "label": "Retraction Distance", - "description": "The length of material retracted during a retraction move.", - "unit": "mm", - "type": "float", - "default_value": 6.5, - "minimum_value_warning": "-0.0001", - "maximum_value_warning": "10.0", - "enabled": "retraction_enable" - }, - "retraction_speed": { - "label": "Retraction Speed", - "description": "The speed at which the filament is retracted and primed during a retraction move.", - "unit": "mm/s", - "type": "float", - "default_value": 25, - "minimum_value": "0", - "maximum_value": "299792458000", - "maximum_value_warning": "100", - "enabled": "retraction_enable", - "children": { - "retraction_retract_speed": { - "label": "Retraction Retract Speed", - "description": "The speed at which the filament is retracted during a retraction move.", - "unit": "mm/s", - "type": "float", - "default_value": 25, - "minimum_value": "0", - "maximum_value": "299792458000", - "maximum_value_warning": "100", - "enabled": "retraction_enable", - "value": "retraction_speed" - }, - "retraction_prime_speed": { - "label": "Retraction Prime Speed", - "description": "The speed at which the filament is primed during a retraction move.", - "unit": "mm/s", - "type": "float", - "default_value": 25, - "minimum_value": "0", - "maximum_value": "299792458000", - "maximum_value_warning": "100", - "enabled": "retraction_enable", - "value": "retraction_speed" - } - } - }, - "retraction_extra_prime_amount": { - "label": "Retraction Extra Prime Amount", - "description": "Some material can ooze away during a travel move, which can be compensated for here.", - "unit": "mm³", - "type": "float", - "default_value": 0, - "minimum_value_warning": "-0.0001", - "maximum_value_warning": "5.0", - "enabled": "retraction_enable" - }, - "retraction_min_travel": { - "label": "Retraction Minimum Travel", - "description": "The minimum distance of travel needed for a retraction to happen at all. This helps to get fewer retractions in a small area.", - "unit": "mm", - "type": "float", - "default_value": 1.5, - "value": "line_width * 2", - "minimum_value": "0", - "maximum_value_warning": "10", - "enabled": "retraction_enable" - }, - "retraction_count_max": { - "label": "Maximum Retraction Count", - "description": "This setting limits the number of retractions occurring within the minimum extrusion distance window. Further retractions within this window will be ignored. This avoids retracting repeatedly on the same piece of filament, as that can flatten the filament and cause grinding issues.", - "default_value": 45, - "minimum_value": "0", - "maximum_value_warning": "100", - "type": "int", - "enabled": "retraction_enable" - }, - "retraction_extrusion_window": { - "label": "Minimum Extrusion Distance Window", - "description": "The window in which the maximum retraction count is enforced. This value should be approximately the same as the retraction distance, so that effectively the number of times a retraction passes the same patch of material is limited.", - "unit": "mm", - "type": "float", - "default_value": 4.5, - "minimum_value": "0", - "maximum_value_warning": "retraction_amount * 2", - "value": "retraction_amount", - "enabled": "retraction_enable" - }, - "retraction_hop": { - "label": "Z Hop when Retracting", - "description": "Whenever a retraction is done, the build plate is lowered to create clearance between the nozzle and the print. It prevents the nozzle from hitting the print during travel moves, reducing the chance to knock the print from the build plate.", - "unit": "mm", - "type": "float", - "default_value": 0, - "minimum_value_warning": "-0.0001", - "maximum_value_warning": "10", - "enabled": "retraction_enable" - } - } - }, - "speed": - { - "label": "Speed", - "icon": "category_speed", - "description": "Speed", - "type": "category", - "children": - { - "speed_print": - { - "label": "Print Speed", - "description": "The speed at which printing happens.", - "unit": "mm/s", - "type": "float", - "minimum_value": "0.1", - "maximum_value_warning": "150", - "maximum_value": "299792458000", - "default_value": 60, - "children": - { - "speed_infill": - { - "label": "Infill Speed", - "description": "The speed at which infill is printed.", - "unit": "mm/s", - "type": "float", - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "default_value": 60, - "value": "speed_print" - }, - "speed_wall": - { - "label": "Wall Speed", - "description": "The speed at which the walls are printed.", - "unit": "mm/s", - "type": "float", - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "default_value": 30, - "value": "speed_print / 2", - "children": - { - "speed_wall_0": - { - "label": "Outer Wall Speed", - "description": "The speed at which the outermost walls are printed. Printing the outer wall at a lower speed improves the final skin quality. However, having a large difference between the inner wall speed and the outer wall speed will effect quality in a negative way.", - "unit": "mm/s", - "type": "float", - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "default_value": 30, - "value": "speed_wall" - }, - "speed_wall_x": - { - "label": "Inner Wall Speed", - "description": "The speed at which all inner walls are printed Printing the inner wall faster than the outer wall will reduce printing time. It works well to set this in between the outer wall speed and the infill speed.", - "unit": "mm/s", - "type": "float", - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "default_value": 60, - "value": "speed_wall * 2" - } - } - }, - "speed_topbottom": - { - "label": "Top/Bottom Speed", - "description": "The speed at which top/bottom layers are printed.", - "unit": "mm/s", - "type": "float", - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "default_value": 30, - "value": "speed_print / 2" - }, - "speed_support": - { - "label": "Support Speed", - "description": "The speed at which the support structure is printed. Printing support at higher speeds can greatly reduce printing time. The surface quality of the support structure is not important since it is removed after printing.", - "unit": "mm/s", - "type": "float", - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "default_value": 60, - "value": "speed_print", - "enabled": "support_roof_enable", - "children": - { - "speed_support_infill": - { - "label": "Support Infill Speed", - "description": "The speed at which the infill of support is printed. Printing the infill at lower speeds improves stability.", - "unit": "mm/s", - "type": "float", - "default_value": 60, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "value": "speed_support", - "enabled": "support_enable", - "global_only": true - }, - "speed_support_roof": - { - "label": "Support Roof Speed", - "description": "The speed at which the roofs of support are printed. Printing the support roof at lower speeds can improve overhang quality.", - "unit": "mm/s", - "type": "float", - "default_value": 40, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "enabled": "support_roof_enable", - "value": "speed_support / 1.5", - "global_only": true - } - } - } - } - }, - "speed_travel": - { - "label": "Travel Speed", - "description": "The speed at which travel moves are made.", - "unit": "mm/s", - "type": "float", - "default_value": 120, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "300", - "value": "speed_print if magic_spiralize else 120", - "global_only": true - }, - "speed_layer_0": { - "label": "Initial Layer Speed", - "description": "The print speed for the initial layer. A lower value is advised to improve adhesion to the build plate.", - "unit": "mm/s", - "type": "float", - "default_value": 30, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "300" - }, - "skirt_speed": { - "label": "Skirt Speed", - "description": "The speed at which the skirt and brim are printed. Normally this is done at the initial layer speed, but sometimes you might want to print the skirt at a different speed.", - "unit": "mm/s", - "type": "float", - "default_value": 30, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "300", - "value": "speed_layer_0", - "global_only": true - }, - "speed_slowdown_layers": - { - "label": "Number of Slower Layers", - "description": "The first few layers are printed slower than the rest of the object, to get better adhesion to the build plate and improve the overall success rate of prints. The speed is gradually increased over these layers.", - "type": "int", - "default_value": 2, - "minimum_value": "0", - "maximum_value": "299792458000", - "maximum_value_warning": "300", - "global_only": true - } - } - }, - "travel": - { - "label": "Travel", - "icon": "category_travel", - "description": "travel", - "type": "category", - "children": - { - "retraction_combing": - { - "label": "Combing Mode", - "description": "Combing keeps the nozzle within already printed areas when traveling. This results in slightly longer travel moves but reduces the need for retractions. If combing is off, the material will retract and the nozzle moves in a straight line to the next point. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only.", - "type": "enum", - "options": - { - "off": "Off", - "all": "All", - "noskin": "No Skin" - }, - "default_value": "all", - "global_only": true - }, - "travel_avoid_other_parts": - { - "label": "Avoid Printed Parts when Traveling", - "description": "The nozzle avoids already printed parts when traveling. This option is only available when combing is enabled.", - "type": "bool", - "default_value": true, - "enabled": "retraction_combing != \"off\"", - "global_only": "True" - }, - "travel_avoid_distance": - { - "label": "Travel Avoid Distance", - "description": "The distance between the nozzle and already printed parts when avoiding during travel moves.", - "unit": "mm", - "type": "float", - "default_value": 1.5, - "value": "machine_nozzle_tip_outer_diameter / 2 * 1.25", - "minimum_value": "0", - "maximum_value_warning": "machine_nozzle_tip_outer_diameter * 5", - "enabled": "retraction_combing != \"off\" and travel_avoid_other_parts", - "global_only": "True" - } - } - }, - "cooling": - { - "label": "Cooling", - "icon": "category_cool", - "description": "Cooling", - "type": "category", - "children": - { - "cool_fan_enabled": - { - "label": "Enable Cooling Fans", - "description": "Enables the cooling fans while printing. The fans improve print quality on layers with short layer times and bridging / overhangs.", - "type": "bool", - "default_value": true, - "global_only": "True" - }, - "cool_fan_speed": - { - "label": "Fan Speed", - "description": "The speed at which the cooling fans spin.", - "unit": "%", - "type": "float", - "minimum_value": "0", - "maximum_value": "100", - "default_value": 100, - "value": "100.0 if cool_fan_enabled else 0.0", - "enabled": "cool_fan_enabled", - "global_only": "True", - "children": - { - "cool_fan_speed_min": - { - "label": "Regular Fan Speed", - "description": "The speed at which the fans spin before hitting the threshold. When a layer prints faster than the threshold, the fan speed gradually inclines towards the maximum fan speed.", - "unit": "%", - "type": "float", - "minimum_value": "0", - "maximum_value": "100", - "value": "cool_fan_speed", - "default_value": 100, - "enabled": "cool_fan_enabled", - "global_only": "True" - }, - "cool_fan_speed_max": - { - "label": "Maximum Fan Speed", - "description": "The speed at which the fans spin on the minimum layer time. The fan speed gradually increases between the regular fan speed and maximum fan speed when the threshold is hit.", - "unit": "%", - "type": "float", - "minimum_value": "max(0, cool_fan_speed_min)", - "maximum_value": "100", - "default_value": 100, - "enabled": "cool_fan_enabled", - "global_only": "True", - "value": "cool_fan_speed" - } - } - }, - "cool_min_layer_time_fan_speed_max": - { - "label": "Regular/Maximum Fan Speed Threshold", - "description": "The layer time which sets the threshold between regular fan speed and maximum fan speed. Layers that print slower than this time use regular fan speed. For faster layers the fan speed gradually increases towards the maximum fan speed.", - "unit": "sec", - "type": "float", - "default_value": 10, - "minimum_value": "cool_min_layer_time", - "maximum_value_warning": "600", - "global_only": "True" - }, - "cool_fan_full_at_height": - { - "label": "Regular Fan Speed at Height", - "description": "The height at which the fans spin on regular fan speed. At the layers below the fan speed gradually increases from zero to regular fan speed.", - "unit": "mm", - "type": "float", - "default_value": 0.5, - "value": "layer_height_0", - "minimum_value": "0", - "maximum_value_warning": "10.0", - "global_only": "True", - "children": - { - "cool_fan_full_layer": - { - "label": "Regular Fan Speed at Layer", - "description": "The layer at which the fans spin on regular fan speed. If regular fan speed at height is set, this value is calculated and rounded to a whole number.", - "type": "int", - "default_value": 1, - "minimum_value": "0", - "maximum_value_warning": "100", - "value": "int((cool_fan_full_at_height - layer_height_0 + 0.001) / layer_height) + 1", - "global_only": "True" - } - } - }, - "cool_min_layer_time": - { - "label": "Minimum Layer Time", - "description": "The minimum time spent in a layer. This forces the printer to slow down, to at least spend the time set here in one layer. This allows the printed material to cool down properly before printing the next layer.", - "unit": "sec", - "type": "float", - "default_value": 5, - "minimum_value": "0", - "maximum_value_warning": "600", - "global_only": "True" - }, - "cool_min_speed": - { - "label": "Minimum Speed", - "description": "The minimum print speed, despite slowing down due to the minimum layer time. When the printer would slow down too much, the pressure in the nozzle would be too low and result in bad print quality.", - "unit": "mm/s", - "type": "float", - "default_value": 10, - "minimum_value": "0", - "maximum_value_warning": "100", - "global_only": "True" - }, - "cool_lift_head": - { - "label": "Lift Head", - "description": "When the minimum speed is hit because of minimum layer time, lift the head away from the print and wait the extra time until the minimum layer time is reached.", - "type": "bool", - "default_value": false, - "global_only": "True" - } - } - }, - "support": - { - "label": "Support", - "type": "category", - "icon": "category_support", - "description": "Support", - "children": - { - "support_enable": - { - "label": "Enable Support", - "description": "Enable support structures. These structures support parts of the model with severe overhangs.", - "type": "bool", - "default_value": false - }, - "support_type": - { - "label": "Support Placement", - "description": "Adjusts the placement of the support structures. The placement can be set to touching build plate or everywhere. When set to everywhere the support structures will also be printed on the model.", - "type": "enum", - "options": - { - "buildplate": "Touching Buildplate", - "everywhere": "Everywhere" - }, - "default_value": "everywhere", - "enabled": "support_enable" - }, - "support_angle": - { - "label": "Support Overhang Angle", - "description": "The minimum angle of overhangs for which support is added. At a value of 0° all overhangs are supported, 90° will not provide any support.", - "unit": "°", - "type": "float", - "minimum_value": "0", - "maximum_value": "90", - "default_value": 50, - "enabled": "support_enable" - }, - "support_pattern": - { - "label": "Support Pattern", - "description": "The pattern of the support structures of the print. The different options available result in sturdy or easy to remove support.", - "type": "enum", - "options": - { - "lines": "Lines", - "grid": "Grid", - "triangles": "Triangles", - "concentric": "Concentric", - "zigzag": "Zig Zag" - }, - "default_value": "zigzag", - "enabled": "support_enable", - "global_only": true - }, - "support_connect_zigzags": - { - "label": "Connect Support ZigZags", - "description": "Connect the ZigZags. This will increase the strength of the zig zag support structure.", - "type": "bool", - "default_value": true, - "enabled": "support_enable and (support_pattern == \"zigzag\")", - "global_only": true - }, - "support_infill_rate": - { - "label": "Support Density", - "description": "Adjusts the density of the support structure. A higher value results in better overhangs, but the supports are harder to remove.", - "unit": "%", - "type": "float", - "minimum_value": "0", - "maximum_value_warning": "100", - "default_value": 15, - "enabled": "support_enable", - "global_only": true, - "children": { - "support_line_distance": - { - "label": "Support Line Distance", - "description": "Distance between the printed support structure lines. This setting is calculated by the support density.", - "unit": "mm", - "type": "float", - "minimum_value": "0", - "default_value": 2.66, - "enabled": "support_enable", - "value": "(support_line_width * 100) / support_infill_rate * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", - "global_only": true - } - } - }, - "support_xy_distance": - { - "label": "Support X/Y Distance", - "description": "Distance of the support structure from the print in the X/Y directions.", - "unit": "mm", - "type": "float", - "minimum_value": "0", - "maximum_value_warning": "10", - "default_value": 0.7, - "enabled": "support_enable" - }, - "support_z_distance": - { - "label": "Support Z Distance", - "description": "Distance from the top/bottom of the support structure to the print. This gap provides clearance to remove the supports after the model is printed. This value is rounded down to a multiple of the layer height.", - "unit": "mm", - "type": "float", - "minimum_value": "0", - "maximum_value_warning": "10", - "default_value": 0.15, - "enabled": "support_enable", - - "children": - { - "support_top_distance": - { - "label": "Support Top Distance", - "description": "Distance from the top of the support to the print.", - "unit": "mm", - "minimum_value": "0", - "maximum_value_warning": "10", - "default_value": 0.15, - "type": "float", - "enabled": "support_enable", - "value": "support_z_distance" - }, - "support_bottom_distance": - { - "label": "Support Bottom Distance", - "description": "Distance from the print to the bottom of the support.", - "unit": "mm", - "minimum_value": "0", - "maximum_value_warning": "10", - "default_value": 0.1, - "value": "0.1 if support_type == 'everywhere' else 0", - "type": "float", - "enabled": "support_enable and support_type == 'everywhere'" - } - } - }, - "support_bottom_stair_step_height": - { - "label": "Support Stair Step Height", - "description": "The height of the steps of the stair-like bottom of support resting on the model. A low value makes the support harder to remove, but too high values can lead to unstable support structures.", - "unit": "mm", - "type": "float", - "default_value": 0.3, - "minimum_value": "0", - "maximum_value_warning": "1.0", - "enabled": "support_enable" - }, - "support_join_distance": - { - "label": "Support Join Distance", - "description": "The maximum distance between support structures in the X/Y directions. When seperate structures are closer together than this value, the structures merge into one.", - "unit": "mm", - "type": "float", - "default_value": 2.0, - "minimum_value_warning": "0", - "maximum_value_warning": "10", - "enabled": "support_enable" - }, - "support_offset": - { - "label": "Support Horizontal Expansion", - "description": "Amount of offset applied to all support polygons in each layer. Positive values can smooth out the support areas and result in more sturdy support.", - "unit": "mm", - "type": "float", - "default_value": 0.2, - "minimum_value_warning": "-0.5", - "maximum_value_warning": "5.0", - "enabled": "support_enable" - }, - "support_area_smoothing": - { - "label": "Support Area Smoothing", - "description": "Maximum distance in the X/Y directions of a line segment which is to be smoothed out. Ragged lines are introduced by the join distance and support bridge, which cause the machine to resonate. Smoothing the support areas won't cause them to break with the constraints, except it might change the overhang.", - "unit": "mm", - "type": "float", - "default_value": 0.6, - "minimum_value": "0", - "maximum_value_warning": "1.0", - "enabled": "support_enable" - }, - "support_roof_enable": - { - "label": "Enable Support Roof", - "description": "Generate a dense top skin at the top of the support on which the model is printed.", - "type": "bool", - "default_value": false, - "enabled": "support_enable" - }, - "support_roof_height": - { - "label": "Support Roof Thickness", - "description": "The thickness of the support roofs.", - "unit": "mm", - "type": "float", - "default_value": 1, - "minimum_value": "0", - "maximum_value_warning": "10", - "enabled": "support_roof_enable" - }, - "support_roof_density": - { - "label": "Support Roof Density", - "description": "Adjusts the density of the roof of the support structure. A higher value results in better overhangs, but the supports are harder to remove.", - "unit": "%", - "type": "float", - "default_value": 100, - "minimum_value": "0", - "maximum_value_warning": "100", - "enabled":"support_roof_enable", - "global_only": true, - "children": - { - "support_roof_line_distance": - { - "label": "Support Roof Line Distance", - "description": "Distance between the printed support roof lines. This setting is calculated by the support roof Density, but can be adjusted separately.", - "unit": "mm", - "type": "float", - "default_value": 0.4, - "minimum_value": "0", - "value": "0 if support_roof_density == 0 else (support_roof_line_width * 100) / support_roof_density * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", - "enabled": "support_roof_enable", - "global_only": true - } - } - }, - "support_roof_pattern": - { - "label": "Support Roof Pattern", - "description": "The pattern with which the top of the support is printed.", - "type": "enum", - "options": - { - "lines": "Lines", - "grid": "Grid", - "triangles": "Triangles", - "concentric": "Concentric", - "zigzag": "Zig Zag" - }, - "default_value": "concentric", - "enabled": "support_roof_enable", - "global_only": true - }, - "support_use_towers": - { - "label": "Use Towers", - "description": "Use specialized towers to support tiny overhang areas. These towers have a larger diameter than the region they support. Near the overhang the towers' diameter decreases, forming a roof.", - "type": "bool", - "default_value": true, - "enabled": "support_enable" - }, - "support_tower_diameter": - { - "label": "Tower Diameter", - "description": "The diameter of a special tower.", - "unit": "mm", - "type": "float", - "default_value": 3.0, - "minimum_value": "0", - "maximum_value_warning": "10", - "enabled": "support_enable and support_use_towers" - }, - "support_minimal_diameter": - { - "label": "Minimum Diameter", - "description": "Minimum diameter in the X/Y directions of a small area which is to be supported by a specialized support tower.", - "unit": "mm", - "type": "float", - "default_value": 3.0, - "minimum_value": "0", - "maximum_value_warning": "10", - "maximum_value": "support_tower_diameter", - "enabled": "support_enable and support_use_towers" - }, - "support_tower_roof_angle": - { - "label": "Tower Roof Angle", - "description": "The angle of a rooftop of a tower. A higher value results in pointed tower roofs, a lower value results in flattened tower roofs.", - "unit": "°", - "type": "int", - "minimum_value": "0", - "maximum_value": "90", - "default_value": 65, - "enabled": "support_enable and support_use_towers" - } - } - }, - "platform_adhesion": - { - "label": "Platform Adhesion", - "type": "category", - "icon": "category_adhesion", - "description": "Adhesion", - "children": - { - "adhesion_type": - { - "label": "Platform Adhesion Type", - "description": "Different options that help to improve both priming your extrusion and adhesion to the build plate. Brim adds a single layer flat area around the base of your object to prevent warping. Raft adds a thick grid with a roof below the object. Skirt is a line printed around the object, but not connected to the model.", - "type": "enum", - "options": - { - "skirt": "Skirt", - "brim": "Brim", - "raft": "Raft" - }, - "default_value": "brim", - "global_only": "True" - }, - "skirt_line_count": - { - "label": "Skirt Line Count", - "description": "Multiple skirt lines help to prime your extrusion better for small objects. Setting this to 0 will disable the skirt.", - "type": "int", - "default_value": 1, - "minimum_value": "0", - "maximum_value_warning": "10", - "enabled": "adhesion_type == \"skirt\"", - "global_only": "True" - }, - "skirt_gap": - { - "label": "Skirt Distance", - "description": "The horizontal distance between the skirt and the first layer of the print.\nThis is the minimum distance, multiple skirt lines will extend outwards from this distance.", - "unit": "mm", - "type": "float", - "default_value": 3, - "minimum_value_warning": "0", - "maximum_value_warning": "100", - "enabled": "adhesion_type == \"skirt\"", - "global_only": "True" - }, - "skirt_minimal_length": - { - "label": "Skirt Minimum Length", - "description": "The minimum length of the skirt. If this length is not reached by the skirt line count, more skirt lines will be added until the minimum length is reached. Note: If the line count is set to 0 this is ignored.", - "unit": "mm", - "type": "float", - "default_value": 250, - "minimum_value": "0", - "minimum_value_warning": "25", - "maximum_value_warning": "2500", - "enabled": "adhesion_type == \"skirt\"", - "global_only": "True" - }, - "brim_width": - { - "label": "Brim Width", - "description": "The distance from the model to the outermost brim line. A larger brim enhances adhesion to the build plate, but also reduces the effective print area.", - "type": "float", - "unit": "mm", - "default_value": 8.0, - "minimum_value": "0.0", - "maximum_value_warning": "100.0", - "enabled": "adhesion_type == \"brim\"", - "global_only": "True", - "children": - { - "brim_line_count": - { - "label": "Brim Line Count", - "description": "The number of lines used for a brim. More brim lines enhance adhesion to the build plate, but also reduces the effective print area.", - "type": "int", - "default_value": 20, - "minimum_value": "0", - "maximum_value_warning": "300", - "value": "math.ceil(brim_width / skirt_line_width)", - "enabled": "adhesion_type == \"brim\"", - "global_only": "True" - } - } - }, - "raft_margin": - { - "label": "Raft Extra Margin", - "description": "If the raft is enabled, this is the extra raft area around the object which is also given a raft. Increasing this margin will create a stronger raft while using more material and leaving less area for your print.", - "unit": "mm", - "type": "float", - "default_value": 5, - "minimum_value_warning": "0", - "maximum_value_warning": "10", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_airgap": - { - "label": "Raft Air Gap", - "description": "The gap between the final raft layer and the first layer of the object. Only the first layer is raised by this amount to lower the bonding between the raft layer and the object. Makes it easier to peel off the raft.", - "unit": "mm", - "type": "float", - "default_value": 0.35, - "minimum_value": "0", - "maximum_value_warning": "1.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_surface_layers": - { - "label": "Raft Top Layers", - "description": "The number of top layers on top of the 2nd raft layer. These are fully filled layers that the object sits on. 2 layers result in a smoother top surface than 1.", - "type": "int", - "default_value": 2, - "minimum_value": "0", - "maximum_value_warning": "20", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_surface_thickness": - { - "label": "Raft Top Layer Thickness", - "description": "Layer thickness of the top raft layers.", - "unit": "mm", - "type": "float", - "default_value": 0.1, - "minimum_value": "0", - "maximum_value_warning": "2.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_surface_line_width": - { - "label": "Raft Top Line Width", - "description": "Width of the lines in the top surface of the raft. These can be thin lines so that the top of the raft becomes smooth.", - "unit": "mm", - "type": "float", - "default_value": 0.3, - "minimum_value": "0.0001", - "maximum_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_surface_line_spacing": - { - "label": "Raft Top Spacing", - "description": "The distance between the raft lines for the top raft layers. The spacing should be equal to the line width, so that the surface is solid.", - "unit": "mm", - "type": "float", - "default_value": 0.3, - "minimum_value": "0.0001", - "maximum_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"", - "value": "raft_surface_line_width", - "global_only": "True" - }, - "raft_interface_thickness": - { - "label": "Raft Middle Thickness", - "description": "Layer thickness of the middle raft layer.", - "unit": "mm", - "type": "float", - "default_value": 0.27, - "minimum_value": "0", - "maximum_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_interface_line_width": - { - "label": "Raft Middle Line Width", - "description": "Width of the lines in the middle raft layer. Making the second layer extrude more causes the lines to stick to the bed.", - "unit": "mm", - "type": "float", - "default_value": 1, - "value": "line_width", - "minimum_value": "0.0001", - "maximum_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_interface_line_spacing": - { - "label": "Raft Middle Spacing", - "description": "The distance between the raft lines for the middle raft layer. The spacing of the middle should be quite wide, while being dense enough to support the top raft layers.", - "unit": "mm", - "type": "float", - "default_value": 1.0, - "minimum_value": "0", - "maximum_value_warning": "15.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_base_thickness": - { - "label": "Raft Base Thickness", - "description": "Layer thickness of the base raft layer. This should be a thick layer which sticks firmly to the printer bed.", - "unit": "mm", - "type": "float", - "default_value": 0.3, - "minimum_value": "0", - "maximum_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_base_line_width": - { - "label": "Raft Base Line Width", - "description": "Width of the lines in the base raft layer. These should be thick lines to assist in bed adhesion.", - "unit": "mm", - "type": "float", - "default_value": 1, - "minimum_value": "0.0001", - "value": "line_width", - "maximum_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_base_line_spacing": - { - "label": "Raft Line Spacing", - "description": "The distance between the raft lines for the base raft layer. Wide spacing makes for easy removal of the raft from the build plate.", - "unit": "mm", - "type": "float", - "default_value": 3.0, - "minimum_value": "0.0001", - "maximum_value_warning": "100", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True" - }, - "raft_speed": - { - "label": "Raft Print Speed", - "description": "The speed at which the raft is printed.", - "unit": "mm/s", - "type": "float", - "default_value": 30, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "200", - "enabled": "adhesion_type == \"raft\"", - "value": "speed_print / 60 * 30", - "global_only": "True", - "children": - { - "raft_surface_speed": - { - "label": "Raft Surface Print Speed", - "description": "The speed at which the surface raft layers are printed. These should be printed a bit slower, so that the nozzle can slowly smooth out adjacent surface lines.", - "unit": "mm/s", - "type": "float", - "default_value": 30, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "100", - "enabled": "adhesion_type == \"raft\"", - "value": "raft_speed", - "global_only": "True" - }, - "raft_interface_speed": - { - "label": "Raft Interface Print Speed", - "description": "The speed at which the interface raft layer is printed. This should be printed quite slowly, as the volume of material coming out of the nozzle is quite high.", - "unit": "mm/s", - "type": "float", - "default_value": 15, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "150", - "enabled": "adhesion_type == \"raft\"", - "value": "0.5 * raft_speed", - "global_only": "True" - }, - "raft_base_speed": - { - "label": "Raft Base Print Speed", - "description": "The speed at which the base raft layer is printed. This should be printed quite slowly, as the volume of material coming out of the nozzle is quite high.", - "unit": "mm/s", - "type": "float", - "default_value": 15, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "200", - "enabled": "adhesion_type == \"raft\"", - "value": "0.5 * raft_speed", - "global_only": "True" - } - } - }, - "raft_fan_speed": - { - "label": "Raft Fan Speed", - "description": "The fan speed for the raft.", - "unit": "%", - "type": "float", - "minimum_value": "0", - "maximum_value": "100", - "default_value": 100, - "global_only": "True", - "enabled": "adhesion_type == \"raft\"", - "children": - { - "raft_surface_fan_speed": - { - "label": "Raft Surface Fan Speed", - "description": "The fan speed for the surface raft layers.", - "unit": "%", - "type": "float", - "minimum_value": "0", - "maximum_value": "100", - "default_value": 100, - "global_only": "True", - "value": "raft_fan_speed", - "enabled": "adhesion_type == \"raft\"" - }, - "raft_interface_fan_speed": - { - "label": "Raft Interface Fan Speed", - "description": "The fan speed for the interface raft layer.", - "unit": "%", - "type": "float", - "minimum_value": "0", - "maximum_value": "100", - "default_value": 100, - "global_only": "True", - "value": "raft_fan_speed", - "enabled": "adhesion_type == \"raft\"" - }, - "raft_base_fan_speed": - { - "label": "Raft Base Fan Speed", - "description": "The fan speed for the base raft layer.", - "unit": "%", - "type": "float", - "minimum_value": "0", - "maximum_value": "100", - "default_value": 100, - "global_only": "True", - "value": "raft_fan_speed", - "enabled": "adhesion_type == \"raft\"" - } - } - } - } - }, - "meshfix": - { - "label": "Mesh Fixes", - "type": "category", - "icon": "category_fixes", - "description": "category_fixes", - "children": - { - "meshfix_union_all": - { - "label": "Union Overlapping Volumes", - "description": "Ignore the internal geometry arising from overlapping volumes and print the volumes as one. This may cause internal cavities to disappear.", - "type": "bool", - "default_value": true - }, - "meshfix_union_all_remove_holes": - { - "label": "Remove All Holes", - "description": "Remove the holes in each layer and keep only the outside shape. This will ignore any invisible internal geometry. However, it also ignores layer holes which can be viewed from above or below.", - "type": "bool", - "default_value": false - }, - "meshfix_extensive_stitching": - { - "label": "Extensive Stitching", - "description": "Extensive stitching tries to stitch up open holes in the mesh by closing the hole with touching polygons. This option can introduce a lot of processing time.", - "type": "bool", - "default_value": false - }, - "meshfix_keep_open_polygons": - { - "label": "Keep Disconnected Faces", - "description": "Normally Cura tries to stitch up small holes in the mesh and remove parts of a layer with big holes. Enabling this option keeps those parts which cannot be stitched. This option should be used as a last resort option when everything else fails to produce proper GCode.", - "type": "bool", - "default_value": false - } - } - }, - "blackmagic": - { - "label": "Special Modes", - "type": "category", - "icon": "category_blackmagic", - "description": "category_blackmagic", - "children": - { - "print_sequence": - { - "label": "Print Sequence", - "description": "Whether to print all objects one layer at a time or to wait for one object to finish, before moving on to the next. One at a time mode is only possible if all models are separated in such a way that the whole print head can move in between and all models are lower than the distance between the nozzle and the X/Y axes.", - "type": "enum", - "options": - { - "all_at_once": "All at Once", - "one_at_a_time": "One at a Time" - }, - "default_value": "all_at_once", - "global_only": true - }, - "magic_mesh_surface_mode": - { - "label": "Surface Mode", - "description": "Treat the model as a surface only, a volume, or volumes with loose surfaces. The normal print mode only prints enclosed volumes. \"Surface\" prints a single wall tracing the mesh surface with no infill and no top/bottom skin. \"Both\" prints enclosed volumes like normal and any remaining polygons as surfaces.", - "type": "enum", - "options": - { - "normal": "Normal", - "surface": "Surface", - "both": "Both" - }, - "default_value": "normal" - }, - "magic_spiralize": - { - "label": "Spiralize Outer Contour", - "description": "Spiralize smooths out the Z move of the outer edge. This will create a steady Z increase over the whole print. This feature turns a solid object into a single walled print with a solid bottom. This feature used to be called Joris in older versions.", - "type": "bool", - "default_value": false, - "global_only": "True" - } - } - }, - "experimental": - { - "label": "Experimental Modes", - "type": "category", - "icon": "category_blackmagic", - "description": "experimental!", - "children": - { - "draft_shield_enabled": - { - "label": "Enable Draft Shield", - "description": "This will create a wall around the object, which traps (hot) air and shields against exterior airflow. Especially useful for materials which warp easily.", - "type": "bool", - "default_value": false, - "global_only": true - }, - "draft_shield_dist": - { - "label": "Draft Shield X/Y Distance", - "description": "Distance of the draft shield from the print, in the X/Y directions.", - "unit": "mm", - "type": "float", - "minimum_value": "0", - "maximum_value_warning": "100", - "default_value": 10, - "enabled": "draft_shield_enabled", - "global_only": true - }, - "draft_shield_height_limitation": - { - "label": "Draft Shield Limitation", - "description": "Set the height of the draft shield. Choose to print the draft shield at the full height of the object or at a limited height.", - "type": "enum", - "options": - { - "full": "Full", - "limited": "Limited" - }, - "default_value": "full", - "enabled": "draft_shield_enabled", - "global_only": true - }, - "draft_shield_height": - { - "label": "Draft Shield Height", - "description": "Height limitation of the draft shield. Above this height no draft shield will be printed.", - "unit": "mm", - "type": "float", - "minimum_value": "0", - "maximum_value_warning": "9999", - "default_value": 0, - "value": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", - "enabled": "draft_shield_height_limitation == \"limited\"", - "global_only": true - }, - "coasting_enable": - { - "label": "Enable Coasting", - "description": "Coasting replaces the last part of an extrusion path with a travel path. The oozed material is used to print the last piece of the extrusion path in order to reduce stringing.", - "type": "bool", - "default_value": false, - "global_only": true - }, - "coasting_volume": - { - "label": "Coasting Volume", - "description": "The volume otherwise oozed. This value should generally be close to the nozzle diameter cubed.", - "unit": "mm³", - "type": "float", - "default_value": 0.064, - "minimum_value": "0", - "maximum_value_warning": "2.0", - "enabled": "coasting_enable", - "global_only": true - }, - "coasting_min_volume": - { - "label": "Minimum Volume Before Coasting", - "description": "The smallest volume an extrusion path should have before allowing coasting. For smaller extrusion paths, less pressure has been built up in the bowden tube and so the coasted volume is scaled linearly. This value should always be larger than the Coasting Volume.", - "unit": "mm³", - "type": "float", - "default_value": 0.8, - "minimum_value": "0", - "maximum_value_warning": "10.0", - "enabled": "coasting_enable", - "global_only": true - }, - "coasting_speed": - { - "label": "Coasting Speed", - "description": "The speed by which to move during coasting, relative to the speed of the extrusion path. A value slightly under 100% is advised, since during the coasting move the pressure in the bowden tube drops.", - "unit": "%", - "type": "float", - "default_value": 90, - "minimum_value": "0.0001", - "maximum_value_warning": "100", - "enabled": "coasting_enable", - "global_only": true - }, - "skin_outline_count": - { - "label": "Extra Skin Wall Count", - "description": "Replaces the outermost part of the top/bottom pattern with a number of concentric lines. Using one or two lines improves roofs that start on infill material.", - "default_value": 0, - "minimum_value": "0", - "maximum_value_warning": "10", - "type": "int" - }, - "skin_alternate_rotation": - { - "label": "Alternate Skin Rotation", - "description": "Alternate the direction in which the top/bottom layers are printed. Normally they are printed diagonally only. This setting adds the X-only and Y-only directions.", - "type": "bool", - "default_value": false, - "enabled": "top_bottom_pattern != \"concentric\"" - }, - "support_conical_enabled": - { - "label": "Enable Conical Support", - "description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.", - "type": "bool", - "default_value": false, - "enabled": "support_enable" - }, - "support_conical_angle": - { - "label": "Conical Support Angle", - "description": "The angle of the tilt of conical support. With 0 degrees being vertical, and 90 degrees being horizontal. Smaller angles cause the support to be more sturdy, but consist of more material. Negative angles cause the base of the support to be wider than the top.", - "unit": "°", - "type": "float", - "minimum_value": "-90", - "minimum_value_warning": "-45", - "maximum_value_warning": "45", - "maximum_value": "90", - "default_value": 30, - "enabled": "support_conical_enabled and support_enable" - }, - "support_conical_min_width": - { - "label": "Conical Support Minimum Width", - "description": "Minimum width to which the base of the conical support area is reduced. Small widths can lead to unstable support structures.", - "unit": "mm", - "default_value": 5.0, - "minimum_value": "0", - "minimum_value_warning": "machine_nozzle_size * 3", - "maximum_value_warning": "100.0", - "type": "float", - "enabled": "support_conical_enabled and support_enable" - }, - "magic_fuzzy_skin_enabled": - { - "label": "Fuzzy Skin", - "description": "Randomly jitter while printing the outer wall, so that the surface has a rough and fuzzy look.", - "type": "bool", - "default_value": false - }, - "magic_fuzzy_skin_thickness": - { - "label": "Fuzzy Skin Thickness", - "description": "The width within which to jitter. It's advised to keep this below the outer wall width, since the inner walls are unaltered.", - "type": "float", - "unit": "mm", - "default_value": 0.3, - "minimum_value": "0.001", - "maximum_value_warning": "wall_line_width_0", - "enabled": "magic_fuzzy_skin_enabled" - }, - "magic_fuzzy_skin_point_density": - { - "label": "Fuzzy Skin Density", - "description": "The average density of points introduced on each polygon in a layer. Note that the original points of the polygon are discarded, so a low density results in a reduction of the resolution.", - "type": "float", - "unit": "1/mm", - "default_value": 1.25, - "minimum_value": "0.008", - "minimum_value_warning": "0.1", - "maximum_value_warning": "10", - "maximum_value": "2 / magic_fuzzy_skin_thickness", - "enabled": "magic_fuzzy_skin_enabled", - "children": - { - "magic_fuzzy_skin_point_dist": - { - "label": "Fuzzy Skin Point Distance", - "description": "The average distance between the random points introduced on each line segment. Note that the original points of the polygon are discarded, so a high smoothness results in a reduction of the resolution. This value must be higher than half the Fuzzy Skin Thickness.", - "type": "float", - "unit": "mm", - "default_value": 0.8, - "minimum_value": "magic_fuzzy_skin_thickness / 2", - "minimum_value_warning": "0.1", - "maximum_value_warning": "10", - "value": "10000 if parent_value == 0 else 1 / magic_fuzzy_skin_point_density", - "enabled": "magic_fuzzy_skin_enabled" - } - } - }, - "wireframe_enabled": - { - "label": "Wire Printing", - "description": "Print only the outside surface with a sparse webbed structure, printing 'in thin air'. This is realized by horizontally printing the contours of the model at given Z intervals which are connected via upward and diagonally downward lines.", - "type": "bool", - "default_value": false, - "global_only": "True" - }, - "wireframe_height": - { - "label": "WP Connection Height", - "description": "The height of the upward and diagonally downward lines between two horizontal parts. This determines the overall density of the net structure. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 3, - "minimum_value": "0.0001", - "maximum_value_warning": "20", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_roof_inset": - { - "label": "WP Roof Inset Distance", - "description": "The distance covered when making a connection from a roof outline inward. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 3, - "minimum_value": "0", - "minimum_value_warning": "machine_nozzle_size", - "maximum_value_warning": "20", - "enabled": "wireframe_enabled", - "value": "wireframe_height", - "global_only": "True" - }, - "wireframe_printspeed": - { - "label": "WP Speed", - "description": "Speed at which the nozzle moves when extruding material. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default_value": 5, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "50", - "enabled": "wireframe_enabled", - "global_only": "True", - "children": - { - "wireframe_printspeed_bottom": - { - "label": "WP Bottom Printing Speed", - "description": "Speed of printing the first layer, which is the only layer touching the build platform. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default_value": 5, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "50", - "enabled": "wireframe_enabled", - "global_only": "True", - "value": "wireframe_printspeed" - }, - "wireframe_printspeed_up": - { - "label": "WP Upward Printing Speed", - "description": "Speed of printing a line upward 'in thin air'. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default_value": 5, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "50", - "enabled": "wireframe_enabled", - "global_only": "True", - "value": "wireframe_printspeed" - }, - "wireframe_printspeed_down": - { - "label": "WP Downward Printing Speed", - "description": "Speed of printing a line diagonally downward. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default_value": 5, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "50", - "enabled": "wireframe_enabled", - "global_only": "True", - "value": "wireframe_printspeed" - }, - "wireframe_printspeed_flat": - { - "label": "WP Horizontal Printing Speed", - "description": "Speed of printing the horizontal contours of the object. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default_value": 5, - "minimum_value": "0.1", - "maximum_value": "299792458000", - "maximum_value_warning": "100", - "value": "wireframe_printspeed", - "enabled": "wireframe_enabled", - "global_only": "True" - } - } - }, - "wireframe_flow": - { - "label": "WP Flow", - "description": "Flow compensation: the amount of material extruded is multiplied by this value. Only applies to Wire Printing.", - "unit": "%", - "default_value": 100, - "minimum_value": "0", - "maximum_value_warning": "100", - "type": "float", - "enabled": "wireframe_enabled", - "global_only": "True", - "children": - { - "wireframe_flow_connection": - { - "label": "WP Connection Flow", - "description": "Flow compensation when going up or down. Only applies to Wire Printing.", - "unit": "%", - "default_value": 100, - "minimum_value": "0", - "maximum_value_warning": "100", - "type": "float", - "enabled": "wireframe_enabled", - "global_only": "True", - "value": "wireframe_flow" - }, - "wireframe_flow_flat": - { - "label": "WP Flat Flow", - "description": "Flow compensation when printing flat lines. Only applies to Wire Printing.", - "unit": "%", - "default_value": 100, - "minimum_value": "0", - "maximum_value_warning": "100", - "type": "float", - "enabled": "wireframe_enabled", - "global_only": "True", - "value": "wireframe_flow" - } - } - }, - "wireframe_top_delay": - { - "label": "WP Top Delay", - "description": "Delay time after an upward move, so that the upward line can harden. Only applies to Wire Printing.", - "unit": "sec", - "type": "float", - "default_value": 0, - "minimum_value": "0", - "maximum_value_warning": "1", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_bottom_delay": - { - "label": "WP Bottom Delay", - "description": "Delay time after a downward move. Only applies to Wire Printing.", - "unit": "sec", - "type": "float", - "default_value": 0, - "minimum_value": "0", - "maximum_value_warning": "1", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_flat_delay": - { - "label": "WP Flat Delay", - "description": "Delay time between two horizontal segments. Introducing such a delay can cause better adhesion to previous layers at the connection points, while too long delays cause sagging. Only applies to Wire Printing.", - "unit": "sec", - "type": "float", - "default_value": 0.1, - "minimum_value": "0", - "maximum_value_warning": "0.5", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_up_half_speed": - { - "label": "WP Ease Upward", - "description": "Distance of an upward move which is extruded with half speed.\nThis can cause better adhesion to previous layers, while not heating the material in those layers too much. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 0.3, - "minimum_value": "0", - "maximum_value_warning": "5.0", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_top_jump": - { - "label": "WP Knot Size", - "description": "Creates a small knot at the top of an upward line, so that the consecutive horizontal layer has a better chance to connect to it. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 0.6, - "minimum_value": "0", - "maximum_value_warning": "2.0", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_fall_down": - { - "label": "WP Fall Down", - "description": "Distance with which the material falls down after an upward extrusion. This distance is compensated for. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 0.5, - "minimum_value": "0", - "maximum_value_warning": "wireframe_height", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_drag_along": - { - "label": "WP Drag Along", - "description": "Distance with which the material of an upward extrusion is dragged along with the diagonally downward extrusion. This distance is compensated for. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 0.6, - "minimum_value": "0", - "maximum_value_warning": "wireframe_height", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_strategy": - { - "label": "WP Strategy", - "description": "Strategy for making sure two consecutive layers connect at each connection point. Retraction lets the upward lines harden in the right position, but may cause filament grinding. A knot can be made at the end of an upward line to heighten the chance of connecting to it and to let the line cool; however, it may require slow printing speeds. Another strategy is to compensate for the sagging of the top of an upward line; however, the lines won't always fall down as predicted.", - "type": "enum", - "options": - { - "compensate": "Compensate", - "knot": "Knot", - "retract": "Retract" - }, - "default_value": "compensate", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_straight_before_down": - { - "label": "WP Straighten Downward Lines", - "description": "Percentage of a diagonally downward line which is covered by a horizontal line piece. This can prevent sagging of the top most point of upward lines. Only applies to Wire Printing.", - "type": "float", - "unit": "%", - "default_value": 20, - "minimum_value": "0", - "maximum_value": "100", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_roof_fall_down": - { - "label": "WP Roof Fall Down", - "description": "The distance which horizontal roof lines printed 'in thin air' fall down when being printed. This distance is compensated for. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 2, - "minimum_value_warning": "0", - "maximum_value_warning": "wireframe_roof_inset", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_roof_drag_along": - { - "label": "WP Roof Drag Along", - "description": "The distance of the end piece of an inward line which gets dragged along when going back to the outer outline of the roof. This distance is compensated for. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 0.8, - "minimum_value": "0", - "maximum_value_warning": "10", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_roof_outer_delay": - { - "label": "WP Roof Outer Delay", - "description": "Time spent at the outer perimeters of hole which is to become a roof. Longer times can ensure a better connection. Only applies to Wire Printing.", - "type": "float", - "unit": "sec", - "default_value": 0.2, - "minimum_value": "0", - "maximum_value_warning": "2.0", - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_nozzle_clearance": - { - "label": "WP Nozzle Clearance", - "description": "Distance between the nozzle and horizontally downward lines. Larger clearance results in diagonally downward lines with a less steep angle, which in turn results in less upward connections with the next layer. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default_value": 1, - "minimum_value_warning": "0", - "maximum_value_warning": "10.0", - "enabled": "wireframe_enabled", - "global_only": "True" - } - } - } - } -} From ed0f4e6c6795a3b59a6b78bdc6d821f62abf2e5d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 May 2016 09:16:58 +0200 Subject: [PATCH 125/424] Fix grammar mistake Suggested by Jorg. --- plugins/ChangeLogPlugin/ChangeLog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index 8dc6a61dd8..d60154d56b 100644 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -1,7 +1,7 @@ [2.1.0] *2.1 Beta release -Cura has been completely reengineered from the ground up for an even more seamless integration between hardware, software and materials. Together with its intuitive new user interface, it’s now also ready for any future developments. For the beginner Cura makes 3D printing incredibly easy, and for more advanced users, there are over 140 new customisable settings. +Cura has been completely reengineered from the ground up for an even more seamless integration between hardware, software and materials. Together with its intuitive new user interface, it’s now also ready for any future developments. For the beginner, Cura makes 3D printing incredibly easy, and for more advanced users, there are over 140 new customisable settings. *Select Multiple Objects You now have the freedom to select and manipulate multiple objects at the same time. From c0c24f1f706315583bc5d75a7f2ce2c2548003ef Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 09:36:48 +0200 Subject: [PATCH 126/424] BuildVolume now uses StackContainer CURA-1278 --- cura/BuildVolume.py | 78 +++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 46 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index e700b8d7be..351d67c104 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -39,11 +39,8 @@ class BuildVolume(SceneNode): self._active_profile = None self._active_instance = None - Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveInstanceChanged) - self._onActiveInstanceChanged() - - Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) - self._onActiveProfileChanged() + Application.getInstance().activeContainerStackChanged.connect(self._onActiveContainerStackChanged) + self._onActiveContainerStackChanged() def setWidth(self, width): if width: self._width = width @@ -148,9 +145,9 @@ class BuildVolume(SceneNode): skirt_size = 0.0 - profile = Application.getInstance().getMachineManager().getWorkingProfile() - if profile: - skirt_size = self._getSkirtSize(profile) + container_stack = Application.getInstance().getActiveContainerStack() + if container_stack: + skirt_size = self._getSkirtSize(container_stack) # As this works better for UM machines, we only add the disallowed_area_size for the z direction. # This is probably wrong in all other cases. TODO! @@ -162,52 +159,41 @@ class BuildVolume(SceneNode): Application.getInstance().getController().getScene()._maximum_bounds = scale_to_max_bounds - def _onActiveInstanceChanged(self): - self._active_instance = Application.getInstance().getMachineManager().getActiveMachineInstance() + def _onActiveContainerStackChanged(self): + self._active_container_stack = Application.getInstance().getActiveContainerStack() - if self._active_instance: - self._width = self._active_instance.getMachineSettingValue("machine_width") - if Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("print_sequence") == "one_at_a_time": - self._height = Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("gantry_height") + if self._active_container_stack: + self._width = self._active_container_stack.getValue("machine_width") + if self._active_container_stack.getValue("print_sequence") == "one_at_a_time": + self._height = self._active_container_stack.getValue("gantry_height") else: - self._height = self._active_instance.getMachineSettingValue("machine_height") - self._depth = self._active_instance.getMachineSettingValue("machine_depth") + self._height = self._active_container_stack.getValue("machine_height") + self._depth = self._active_container_stack.getValue("machine_depth") self._updateDisallowedAreas() self.rebuild() - def _onActiveProfileChanged(self): - if self._active_profile: - self._active_profile.settingValueChanged.disconnect(self._onSettingValueChanged) - - self._active_profile = Application.getInstance().getMachineManager().getWorkingProfile() - if self._active_profile: - self._active_profile.settingValueChanged.connect(self._onSettingValueChanged) - self._updateDisallowedAreas() - self.rebuild() - def _onSettingValueChanged(self, setting_key): if setting_key == "print_sequence": - if Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("print_sequence") == "one_at_a_time": - self._height = Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("gantry_height") + if Application.getInstance().getActiveContainerStack().getValue("print_sequence") == "one_at_a_time": + self._height = self._active_container_stack.getValue("gantry_height") else: - self._height = self._active_instance.getMachineSettingValue("machine_depth") + self._height = self._active_container_stack.getValue("machine_depth") self.rebuild() if setting_key in self._skirt_settings: self._updateDisallowedAreas() self.rebuild() def _updateDisallowedAreas(self): - if not self._active_instance or not self._active_profile: + if not self._active_container_stack: return - disallowed_areas = self._active_instance.getMachineSettingValue("machine_disallowed_areas") + disallowed_areas = self._active_container_stack.getValue("machine_disallowed_areas") areas = [] skirt_size = 0.0 - if self._active_profile: - skirt_size = self._getSkirtSize(self._active_profile) + skirt_size = self._getSkirtSize(self._active_container_stack) if disallowed_areas: # Extend every area already in the disallowed_areas with the skirt size. @@ -228,8 +214,8 @@ class BuildVolume(SceneNode): # Add the skirt areas around the borders of the build plate. if skirt_size > 0: - half_machine_width = self._active_instance.getMachineSettingValue("machine_width") / 2 - half_machine_depth = self._active_instance.getMachineSettingValue("machine_depth") / 2 + half_machine_width = self._active_container_stack.getValue("machine_width") / 2 + half_machine_depth = self._active_container_stack.getValue("machine_depth") / 2 areas.append(Polygon(numpy.array([ [-half_machine_width, -half_machine_depth], @@ -262,24 +248,24 @@ class BuildVolume(SceneNode): self._disallowed_areas = areas ## Convenience function to calculate the size of the bed adhesion. - def _getSkirtSize(self, profile): + def _getSkirtSize(self, container_stack): skirt_size = 0.0 - adhesion_type = profile.getSettingValue("adhesion_type") + adhesion_type = container_stack.getValue("adhesion_type") if adhesion_type == "skirt": - skirt_distance = profile.getSettingValue("skirt_gap") - skirt_line_count = profile.getSettingValue("skirt_line_count") - skirt_size = skirt_distance + (skirt_line_count * profile.getSettingValue("skirt_line_width")) + skirt_distance = container_stack.getValue("skirt_gap") + skirt_line_count = container_stack.getValue("skirt_line_count") + skirt_size = skirt_distance + (skirt_line_count * container_stack.getValue("skirt_line_width")) elif adhesion_type == "brim": - skirt_size = profile.getSettingValue("brim_line_count") * profile.getSettingValue("skirt_line_width") + skirt_size = container_stack.getValue("brim_line_count") * container_stack.getValue("skirt_line_width") elif adhesion_type == "raft": - skirt_size = profile.getSettingValue("raft_margin") + skirt_size = container_stack.getValue("raft_margin") - if profile.getSettingValue("draft_shield_enabled"): - skirt_size += profile.getSettingValue("draft_shield_dist") + if container_stack.getValue("draft_shield_enabled"): + skirt_size += container_stack.getValue("draft_shield_dist") - if profile.getSettingValue("xy_offset"): - skirt_size += profile.getSettingValue("xy_offset") + if container_stack.getValue("xy_offset"): + skirt_size += container_stack.getValue("xy_offset") return skirt_size From dbd2c911ce4cec9d003671c8f91873ff7bd57088 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 10:34:02 +0200 Subject: [PATCH 127/424] Renamed active containerstack to global containerstac Cura-1278 --- cura/BuildVolume.py | 6 +++--- plugins/SolidView/SolidView.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 351d67c104..2a84675a48 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -145,7 +145,7 @@ class BuildVolume(SceneNode): skirt_size = 0.0 - container_stack = Application.getInstance().getActiveContainerStack() + container_stack = Application.getInstance().getGlobalContainerStack() if container_stack: skirt_size = self._getSkirtSize(container_stack) @@ -160,7 +160,7 @@ class BuildVolume(SceneNode): Application.getInstance().getController().getScene()._maximum_bounds = scale_to_max_bounds def _onActiveContainerStackChanged(self): - self._active_container_stack = Application.getInstance().getActiveContainerStack() + self._active_container_stack = Application.getInstance().getGlobalContainerStack() if self._active_container_stack: self._width = self._active_container_stack.getValue("machine_width") @@ -176,7 +176,7 @@ class BuildVolume(SceneNode): def _onSettingValueChanged(self, setting_key): if setting_key == "print_sequence": - if Application.getInstance().getActiveContainerStack().getValue("print_sequence") == "one_at_a_time": + if Application.getInstance().getGlobalContainerStack().getValue("print_sequence") == "one_at_a_time": self._height = self._active_container_stack.getValue("gantry_height") else: self._height = self._active_container_stack.getValue("machine_depth") diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 561d194dd3..1c65ea5dfe 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -34,10 +34,10 @@ class SolidView(View): self._disabled_shader.setUniformValue("u_diffuseColor", [0.68, 0.68, 0.68, 1.0]) self._disabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) - if Application.getInstance().getActiveContainerStack(): + if Application.getInstance().getGlobalContainerStack(): if Preferences.getInstance().getValue("view/show_overhang"): - angle = Application.getInstance().getActiveContainerStack().getValue("support_angle") + angle = Application.getInstance().getGlobalContainerStack().getValue("support_angle") if angle is not None: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle))) else: From 04f1e8d27cdb56a2e9e6d4d3753b8966cc2dfc96 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 11:16:35 +0200 Subject: [PATCH 128/424] Renames to from activeStack to global stack CURA-1278 --- cura/BuildVolume.py | 8 +++----- cura/CuraApplication.py | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 2a84675a48..4007ee0007 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -37,10 +37,8 @@ class BuildVolume(SceneNode): self.setCalculateBoundingBox(False) - self._active_profile = None - self._active_instance = None - Application.getInstance().activeContainerStackChanged.connect(self._onActiveContainerStackChanged) - self._onActiveContainerStackChanged() + Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged) + self._onGlobalContainerStackChanged() def setWidth(self, width): if width: self._width = width @@ -159,7 +157,7 @@ class BuildVolume(SceneNode): Application.getInstance().getController().getScene()._maximum_bounds = scale_to_max_bounds - def _onActiveContainerStackChanged(self): + def _onGlobalContainerStackChanged(self): self._active_container_stack = Application.getInstance().getGlobalContainerStack() if self._active_container_stack: diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 1f83cd1f3d..fe250aea16 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -101,7 +101,7 @@ class CuraApplication(QtApplication): self._camera_animation = None self._cura_actions = None - #self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged) + #self.getMachineManager().activeMachineInstanceChanged.connect(self._onGlobalContainerStackChanged) #self.getMachineManager().addMachineRequested.connect(self._onAddMachineRequested) self.getController().getScene().sceneChanged.connect(self.updatePlatformActivity) self.getController().toolOperationStopped.connect(self._onToolOperationStopped) @@ -508,10 +508,9 @@ class CuraApplication(QtApplication): @pyqtSlot(str, result = "QVariant") def getSettingValue(self, key): - if not self.getMachineManager().getWorkingProfile(): + if not self._global_container_stack: return None - return self.getMachineManager().getWorkingProfile().getSettingValue(key) - #return self.getActiveMachine().getSettingValueByKey(key) + return self._global_container_stack.getValue(key) ## Change setting by key value pair @pyqtSlot(str, "QVariant") From 93227c0b560c259bf19d36da1c97e8576c91c512 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 11:28:57 +0200 Subject: [PATCH 129/424] Updated removabledrive plugin to use metadata CURA-1278 --- .../RemovableDriveOutputDevice.py | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py index 27859bd145..c6fc277234 100644 --- a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py +++ b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py @@ -29,17 +29,26 @@ class RemovableDriveOutputDevice(OutputDevice): if self._writing: raise OutputDeviceError.DeviceBusyError() - file_formats = Application.getInstance().getMeshFileHandler().getSupportedFileTypesWrite() #Formats supported by this application. + # Formats supported by this application (File types that we can actually write) + file_formats = Application.getInstance().getMeshFileHandler().getSupportedFileTypesWrite() if filter_by_machine: - machine_file_formats = Application.getInstance().getMachineManager().getActiveMachineInstance().getMachineDefinition().getFileFormats() - file_formats = list(filter(lambda file_format: file_format["mime_type"] in machine_file_formats, file_formats)) #Take the intersection between file_formats and machine_file_formats. + container = Application.getInstance().getGlobalContainerStack().findContainer({"file_formats": "*"}) + + # Create a list from supported file formats string + machine_file_formats = [file_type.strip() for file_type in container.getMetaDataEntry("file_formats").split(";")] + + # Take the intersection between file_formats and machine_file_formats. + file_formats = list(filter(lambda file_format: file_format["mime_type"] in machine_file_formats, file_formats)) + if len(file_formats) == 0: Logger.log("e", "There are no file formats available to write with!") raise OutputDeviceError.WriteRequestFailedError() - writer = Application.getInstance().getMeshFileHandler().getWriterByMimeType(file_formats[0]["mime_type"]) #Just take the first file format available. + + # Just take the first file format available. + writer = Application.getInstance().getMeshFileHandler().getWriterByMimeType(file_formats[0]["mime_type"]) extension = file_formats[0]["extension"] - if file_name == None: + if file_name is None: for n in BreadthFirstIterator(node): if n.getMeshData(): file_name = n.getName() @@ -50,7 +59,7 @@ class RemovableDriveOutputDevice(OutputDevice): Logger.log("e", "Could not determine a proper file name when trying to write to %s, aborting", self.getName()) raise OutputDeviceError.WriteRequestFailedError() - if extension: #Not empty string. + if extension: # Not empty string. extension = "." + extension file_name = os.path.join(self.getId(), os.path.splitext(file_name)[0] + extension) From 170df747b3710d9491547e874253cc9316d3d1e8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 11:40:36 +0200 Subject: [PATCH 130/424] Use globalContainer stack instead of activeInstance CURA-1278 --- cura/CuraApplication.py | 2 -- cura/PrintInformation.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index fe250aea16..0fcbeaea5e 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -101,8 +101,6 @@ class CuraApplication(QtApplication): self._camera_animation = None self._cura_actions = None - #self.getMachineManager().activeMachineInstanceChanged.connect(self._onGlobalContainerStackChanged) - #self.getMachineManager().addMachineRequested.connect(self._onAddMachineRequested) self.getController().getScene().sceneChanged.connect(self.updatePlatformActivity) self.getController().toolOperationStopped.connect(self._onToolOperationStopped) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index d3eaab662c..994dac69d0 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -63,6 +63,6 @@ class PrintInformation(QObject): self.currentPrintTimeChanged.emit() # Material amount is sent as an amount of mm^3, so calculate length from that - r = Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("material_diameter") / 2 + r = Application.getInstance().getGlobalContainerStack().getValue("material_diameter") / 2 self._material_amount = round((amount / (math.pi * r ** 2)) / 1000, 2) self.materialAmountChanged.emit() From 162295da8e73494411edaea36a11919e9aae76bf Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 13:31:26 +0200 Subject: [PATCH 131/424] Actually adding a new machine is now possible CURA-1278 --- resources/qml/AddMachineDialog.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/resources/qml/AddMachineDialog.qml b/resources/qml/AddMachineDialog.qml index c6e852aa3e..2aa966d5e9 100644 --- a/resources/qml/AddMachineDialog.qml +++ b/resources/qml/AddMachineDialog.qml @@ -152,6 +152,19 @@ UM.Dialog anchors.bottom:parent.bottom } + Button + { + text:"save" + anchors.bottom: parent.bottom + anchors.right: parent.right + onClicked: + { + base.visible = false + var item = machineList.model.getItem(machineList.currentIndex); + machineList.model.setNewGlobalStackFromDefinition(machineName.text, item.id) + } + } + Item { UM.I18nCatalog From 57bc87f25fba274c9797ab1b176ba7c0b6dcb73b Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Tue, 10 May 2016 13:35:49 +0200 Subject: [PATCH 132/424] Listing of all paths for every OS Only cosmetics --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6425ec8e9..7fc77f9dcf 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,10 @@ Use [this](https://github.com/Ultimaker/Uranium/wiki/Bug-Reporting-Template) tem For crashes and similar issues, please attach the following information: * (On Windows) The log as produced by dxdiag (start -> run -> dxdiag -> save output) -* The Cura GUI log file, located at (Windows) $User/AppData/Local/cura/cura.log, (OSX) $User/.cura/cura.log, (Ubuntu) $USER/.local/share/cura +* The Cura GUI log file, located at + * $User/AppData/Local/cura/cura.log (Windows) + * $User/.cura/cura.log (OSX) + * $USER/.local/share/cura (Ubuntu/Linux) * The Cura Engine log, using Help -> Show Engine Log Dependencies From 67b6c5aa2915979032ef84f9840242fe2c710d03 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 13:47:27 +0200 Subject: [PATCH 133/424] Re-added platform again CURA-1278 --- cura/CuraApplication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 0fcbeaea5e..a9eb3eece4 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -173,7 +173,7 @@ class CuraApplication(QtApplication): Selection.selectionChanged.connect(self.onSelectionChanged) root = controller.getScene().getRoot() - #self._platform = Platform(root) + self._platform = Platform(root) #self._volume = BuildVolume.BuildVolume(root) From 5fdd0e81560fb2c0bae33af62d4fe3dd55b80266 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 14:34:07 +0200 Subject: [PATCH 134/424] BuildVolume no longer crashes when width/height/depth is None CURA-1278 --- cura/BuildVolume.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 4007ee0007..4397c798f7 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -71,7 +71,7 @@ class BuildVolume(SceneNode): ## Recalculates the build volume & disallowed areas. def rebuild(self): - if self._width == 0 or self._height == 0 or self._depth == 0: + if not self._width or not self._height or not self._depth: return min_w = -self._width / 2 From bdccab4b600fd3a51a4cc00502f8cea69759ce77 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 14:35:45 +0200 Subject: [PATCH 135/424] Re-added BuildVolume CURA-1278 --- cura/CuraApplication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index a9eb3eece4..ceb7a42b72 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -175,7 +175,7 @@ class CuraApplication(QtApplication): root = controller.getScene().getRoot() self._platform = Platform(root) - #self._volume = BuildVolume.BuildVolume(root) + self._volume = BuildVolume.BuildVolume(root) self.getRenderer().setBackgroundColor(QColor(245, 245, 245)) From fa8fbb25605242407518c7ef7ccaa6f4f843d095 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 10 May 2016 14:42:53 +0200 Subject: [PATCH 136/424] Added global only to setting type for CuraApplication CURA-1278 --- cura/CuraApplication.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index ceb7a42b72..174621be03 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -24,6 +24,8 @@ from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation from UM.Operations.SetTransformOperation import SetTransformOperation +from UM.Settings.SettingDefinition import SettingDefinition + from UM.i18n import i18nCatalog from . import PlatformPhysics @@ -160,6 +162,8 @@ class CuraApplication(QtApplication): self.showSplashMessage(self._i18n_catalog.i18nc("@info:progress", "Setting up scene...")) + SettingDefinition.addSupportedProperty("global_only", "bool") + controller = self.getController() controller.setActiveView("SolidView") From 3a99a2bc45888ba03eb496c15d6daad95e80e554 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 10 May 2016 17:28:41 +0200 Subject: [PATCH 137/424] Import the right version of the UM module Since it was changed to 1.2 for the setting models --- resources/qml/AddMachineDialog.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/AddMachineDialog.qml b/resources/qml/AddMachineDialog.qml index 2aa966d5e9..476df2178c 100644 --- a/resources/qml/AddMachineDialog.qml +++ b/resources/qml/AddMachineDialog.qml @@ -8,7 +8,7 @@ import QtQuick.Window 2.1 import QtQuick.Controls.Styles 1.1 -import UM 1.1 as UM +import UM 1.2 as UM import Cura 1.0 as Cura @@ -175,4 +175,4 @@ UM.Dialog SystemPalette { id: palette } ExclusiveGroup { id: printerGroup; } } -} \ No newline at end of file +} From 199a30099efd2614e5f94479f0ea22bf60d17050 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 10 May 2016 17:29:29 +0200 Subject: [PATCH 138/424] Comment away everything related to activeprofile and machine manager in SidebarSimple To make SidebarSimple at least display again --- resources/qml/SidebarSimple.qml | 50 ++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 9387872276..21aa315dd1 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -61,7 +61,7 @@ Item return -1; } - var density = parseInt(UM.ActiveProfile.settingValues.getValue("infill_sparse_density")); +// var density = parseInt(UM.ActiveProfile.settingValues.getValue("infill_sparse_density")); for(var i = 0; i < infillModel.count; ++i) { if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax ) @@ -116,7 +116,7 @@ Item onClicked: { if (infillListView.activeIndex != index) { - UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage) +// UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage) } } onEntered: { @@ -213,13 +213,13 @@ Item text: catalog.i18nc("@option:check","Generate Brim"); style: UM.Theme.styles.checkbox; - checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("adhesion_type") == "brim" : false; +// checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("adhesion_type") == "brim" : false; MouseArea { anchors.fill: parent hoverEnabled: true onClicked: { - UM.MachineManager.setSettingValue("adhesion_type", !parent.checked?"brim":"skirt") +// UM.MachineManager.setSettingValue("adhesion_type", !parent.checked?"brim":"skirt") } onEntered: { @@ -246,13 +246,13 @@ Item text: catalog.i18nc("@option:check","Generate Support Structure"); style: UM.Theme.styles.checkbox; - checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_enable") : false; +// checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_enable") : false; MouseArea { anchors.fill: parent hoverEnabled: true onClicked: { - UM.MachineManager.setSettingValue("support_enable", !parent.checked) +// UM.MachineManager.setSettingValue("support_enable", !parent.checked) } onEntered: { @@ -271,15 +271,15 @@ Item function populateExtruderModel() { - extruderModel.clear() - var extruder_count = UM.MachineManager.getSettingValue("machine_extruder_count"); - for(var extruder = 0; extruder < extruder_count ; extruder++) { - extruderModel.append({ - name: catalog.i18nc("@label", "Extruder %1").arg(extruder), - text: catalog.i18nc("@label", "Extruder %1").arg(extruder), - value: extruder - }) - } +// extruderModel.clear() +// var extruder_count = UM.MachineManager.getSettingValue("machine_extruder_count"); +// for(var extruder = 0; extruder < extruder_count ; extruder++) { +// extruderModel.append({ +// name: catalog.i18nc("@label", "Extruder %1").arg(extruder), +// text: catalog.i18nc("@label", "Extruder %1").arg(extruder), +// value: extruder +// }) +// } } Rectangle { @@ -290,7 +290,7 @@ Item width: parent.width height: childrenRect.height // Use both UM.ActiveProfile and UM.MachineManager to force UM.MachineManager.getSettingValue() to be reevaluated - visible: UM.ActiveProfile.settingValues.getValue("machine_extruder_count") || (UM.MachineManager.getSettingValue("machine_extruder_count") > 1) +// visible: UM.ActiveProfile.settingValues.getValue("machine_extruder_count") || (UM.MachineManager.getSettingValue("machine_extruder_count") > 1) Label { id: mainExtruderLabel @@ -308,9 +308,9 @@ Item anchors.top: parent.top anchors.left: supportExtruderLabel.right style: UM.Theme.styles.combobox - currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("extruder_nr") : 0 +// currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("extruder_nr") : 0 onActivated: { - UM.MachineManager.setSettingValue("extruder_nr", index) +// UM.MachineManager.setSettingValue("extruder_nr", index) } } @@ -331,7 +331,7 @@ Item anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: supportExtruderLabel.right style: UM.Theme.styles.combobox - currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_extruder_nr") : 0 +// currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_extruder_nr") : 0 onActivated: { UM.MachineManager.setSettingValue("support_extruder_nr", index) } @@ -341,12 +341,12 @@ Item id: extruderModel Component.onCompleted: populateExtruderModel() } - Connections - { - id: machineChange - target: UM.MachineManager - onActiveMachineInstanceChanged: populateExtruderModel() - } +// Connections +// { +// id: machineChange +// target: UM.MachineManager +// onActiveMachineInstanceChanged: populateExtruderModel() +// } } Rectangle { From fa7e186b2f91d3c575f104f093de2a3216295004 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 10 May 2016 17:31:18 +0200 Subject: [PATCH 139/424] Import Uranium's SettingView related files and start making them work This is too cura-specific now so we should not put it in Uranium. --- resources/qml/Settings/SettingCategory.qml | 79 ++++++++ resources/qml/Settings/SettingCheckBox.qml | 77 ++++++++ resources/qml/Settings/SettingComboBox.qml | 114 ++++++++++++ resources/qml/Settings/SettingItem.qml | 168 ++++++++++++++++++ resources/qml/Settings/SettingTextField.qml | 153 ++++++++++++++++ resources/qml/Settings/SettingUnknown.qml | 13 ++ resources/qml/Settings/SettingView.qml | 92 ++++++++++ .../Settings/SettingsConfigurationPage.qml | 119 +++++++++++++ 8 files changed, 815 insertions(+) create mode 100644 resources/qml/Settings/SettingCategory.qml create mode 100644 resources/qml/Settings/SettingCheckBox.qml create mode 100644 resources/qml/Settings/SettingComboBox.qml create mode 100644 resources/qml/Settings/SettingItem.qml create mode 100644 resources/qml/Settings/SettingTextField.qml create mode 100644 resources/qml/Settings/SettingUnknown.qml create mode 100644 resources/qml/Settings/SettingView.qml create mode 100644 resources/qml/Settings/SettingsConfigurationPage.qml diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml new file mode 100644 index 0000000000..b4c0263149 --- /dev/null +++ b/resources/qml/Settings/SettingCategory.qml @@ -0,0 +1,79 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 +import QtQuick.Layouts 1.1 + +import UM 1.1 as UM + +Button { + id: base; + + style: UM.Theme.styles.sidebar_category; + + signal showTooltip(); + signal hideTooltip(); + signal contextMenuRequested() + + text: definition.label + iconSource: UM.Theme.getIcon(definition.icon) + + checkable: true + checked: definition.expanded + + onClicked: definition.expanded ? settingDefinitionsModel.collapse(definition.key) : settingDefinitionsModel.expandAll(definition.key) + + UM.SimpleButton { + id: settingsButton + + visible: base.hovered || settingsButton.hovered + height: base.height * 0.6 + width: base.height * 0.6 + + anchors { + right: inheritButton.visible ? inheritButton.left : parent.right + rightMargin: inheritButton.visible? UM.Theme.getSize("default_margin").width / 2 : UM.Theme.getSize("setting_preferences_button_margin").width + verticalCenter: parent.verticalCenter; + } + + color: UM.Theme.getColor("setting_control_button"); + hoverColor: UM.Theme.getColor("setting_control_button_hover") + iconSource: UM.Theme.getIcon("settings"); + + onClicked: { + Actions.configureSettingVisibility() + } + } + + UM.SimpleButton + { + // This button shows when the setting has an inherited function, but is overriden by profile. + id: inheritButton; + + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width + + visible: hiddenValuesCount > 0 + height: parent.height / 2; + width: height; + + onClicked: { + base.showAllHidenInheritedSettings() + } + + color: UM.Theme.getColor("setting_control_button") + hoverColor: UM.Theme.getColor("setting_control_button_hover") + iconSource: UM.Theme.getIcon("notice") + + onEntered: { + base.showTooltip() + } + + onExited: { + base.hideTooltip(); + } + } +} diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml new file mode 100644 index 0000000000..b2bbc68ec1 --- /dev/null +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -0,0 +1,77 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 + +import UM 1.2 as UM + +SettingItem +{ + id: base + + MouseArea + { + id: control + + property bool checked: + { + if(value == "True") + { + return true; + } + else if(value == "False") + { + return false; + } + else + { + return value; + } + } + + Rectangle + { + anchors + { + top: parent.top + bottom: parent.bottom + left: parent.left + } + width: height + + color: + { + if (!enabled) + { + return base.style.controlDisabledColor + } + if(base.containsMouse || base.activeFocus) + { + return base.style.controlHighlightColor + } + else + { + return base.style.controlColor + } + } + border.width: base.style.controlBorderWidth; + border.color: !enabled ? base.style.controlDisabledBorderColor : control.containsMouse ? base.style.controlBorderHighlightColor : base.style.controlBorderColor; + + UM.RecolorImage { + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width/2.5 + height: parent.height/2.5 + sourceSize.width: width + sourceSize.height: width + color: !enabled ? base.style.controlDisabledTextColor : base.style.controlTextColor; + source: UM.Theme.getIcon("check") + opacity: control.checked + Behavior on opacity { NumberAnimation { duration: 100; } } + } + } + } +} diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml new file mode 100644 index 0000000000..85935c3471 --- /dev/null +++ b/resources/qml/Settings/SettingComboBox.qml @@ -0,0 +1,114 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 + +import UM 1.1 as UM + +SettingItem +{ + id: base + + ComboBox + { +// signal valueChanged(string value); +// id: base + model: definition.options + textRole: "name"; + + MouseArea + { + anchors.fill: parent; + acceptedButtons: Qt.NoButton; + onWheel: wheel.accepted = true; + } + + style: ComboBoxStyle + { + background: Rectangle + { + color: + { + if (!enabled) + { + return base.style.controlDisabledColor + } + if(control.hovered || base.activeFocus) + { + return base.style.controlHighlightColor + } + else + { + return base.style.controlColor + } + } + border.width: base.style.controlBorderWidth; + border.color: !enabled ? base.style.controlDisabledBorderColor : control.hovered ? base.style.controlBorderHighlightColor : base.style.controlBorderColor; + } + label: Item + { + Label + { + anchors.left: parent.left; + anchors.leftMargin: base.style.controlBorderWidth + anchors.right: downArrow.left; + anchors.rightMargin: base.style.controlBorderWidth; + anchors.verticalCenter: parent.verticalCenter; + + text: control.currentText; + font: base.style.controlFont; + color: !enabled ? base.style.controlDisabledTextColor : base.style.controlTextColor; + + elide: Text.ElideRight; + verticalAlignment: Text.AlignVCenter; + } + + UM.RecolorImage + { + id: downArrow + anchors.right: parent.right; + anchors.rightMargin: base.style.controlBorderWidth * 2; + anchors.verticalCenter: parent.verticalCenter; + + source: UM.Theme.getIcon("arrow_bottom") + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + 5 + sourceSize.height: width + 5 + + color: base.style.controlTextColor; + + } + } + } +/* + onActivated: { + valueChanged(options.getItem(index).value); + } + + onModelChanged: { + updateCurrentIndex(); + } + + Component.onCompleted: { + parent.parent.valueChanged.connect(updateCurrentIndex) + } + + function updateCurrentIndex() { + if (!options) { + return; + } + + for(var i = 0; i < options.rowCount(); ++i) { + if(options.getItem(i).value == value) { + currentIndex = i; + return; + } + } + + currentIndex = -1; + }*/ + } +} diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml new file mode 100644 index 0000000000..845f35853e --- /dev/null +++ b/resources/qml/Settings/SettingItem.qml @@ -0,0 +1,168 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 + +import UM 1.1 as UM + +import "." + +Item { + id: base; + + height: UM.Theme.getSize("section").height; + + property alias contents: controlContainer.children + + signal contextMenuRequested() + signal showTooltip(var position); + signal hideTooltip(); + + MouseArea + { + id: mouse; + + anchors.fill: parent; + + acceptedButtons: Qt.RightButton; + hoverEnabled: true; + + onClicked: base.contextMenuRequested(); + + onEntered: { + hoverTimer.start(); + } + + onExited: { + if(controlContainer.item && controlContainer.item.hovered) { + return; + } + hoverTimer.stop(); + base.hideTooltip(); + } + + Timer { + id: hoverTimer; + interval: 500; + repeat: false; + + onTriggered: base.showTooltip({ x: mouse.mouseX, y: mouse.mouseY }); + } + } + + Label + { + id: label; + + anchors.left: parent.left; + anchors.leftMargin: (UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width) + anchors.right: settingControls.left; + anchors.verticalCenter: parent.verticalCenter + + height: UM.Theme.getSize("section").height; + verticalAlignment: Text.AlignVCenter; + + text: definition.label + elide: Text.ElideMiddle; + + color: UM.Theme.getColor("setting_control_text"); + font: UM.Theme.getFont("default"); + } + + Row + { + id: settingControls + + height: parent.height / 2 + spacing: UM.Theme.getSize("default_margin").width / 2 + + anchors { + right: controlContainer.left + rightMargin: UM.Theme.getSize("default_margin").width / 2 + verticalCenter: parent.verticalCenter + } + + UM.SimpleButton + { + id: revertButton; + +// visible: base.overridden && base.is_enabled + + height: parent.height; + width: height; + + backgroundColor: UM.Theme.getColor("setting_control"); + hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight") + color: UM.Theme.getColor("setting_control_button") + hoverColor: UM.Theme.getColor("setting_control_button_hover") + + iconSource: UM.Theme.getIcon("reset") + + onClicked: { + base.resetRequested() + controlContainer.notifyReset(); + } + + onEntered: base.showResetTooltip({ x: mouse.mouseX, y: mouse.mouseY }) + onExited: + { + if(controlContainer.item && controlContainer.item.hovered) + { + return; + } + + base.hovered = false; + base.hideTooltip(); + } + } + + UM.SimpleButton + { + // This button shows when the setting has an inherited function, but is overriden by profile. + id: inheritButton; + +// visible: has_profile_value && base.has_inherit_function && base.is_enabled + height: parent.height; + width: height; + + onClicked: { + base.resetToDefaultRequested(); + controlContainer.notifyReset(); + } + + backgroundColor: UM.Theme.getColor("setting_control"); + hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight") + color: UM.Theme.getColor("setting_control_button") + hoverColor: UM.Theme.getColor("setting_control_button_hover") + + iconSource: UM.Theme.getIcon("notice"); + + onEntered: base.showInheritanceTooltip({ x: mouse.mouseX, y: mouse.mouseY }) + + onExited: { + if(controlContainer.item && controlContainer.item.hovered) { + return; + } + + base.hovered = false; + base.hideTooltip(); + } + } + + } + + Rectangle + { + id: controlContainer; + + color: "red" + + anchors.right: parent.right; + anchors.verticalCenter: parent.verticalCenter; + width: UM.Theme.getSize("setting_control").width; + height: UM.Theme.getSize("setting_contorl").height + } +} diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml new file mode 100644 index 0000000000..62f03b087d --- /dev/null +++ b/resources/qml/Settings/SettingTextField.qml @@ -0,0 +1,153 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.2 + +import UM 1.1 as UM + +SettingItem +{ + id: base + + contents: Rectangle + { + id: control + + anchors.fill: parent + + property alias hovered: mouseArea.containsMouse; + + border.width: base.style.controlBorderWidth; + border.color: !enabled ? base.style.controlDisabledBorderColor : hovered ? base.style.controlBorderHighlightColor : base.style.controlBorderColor + + property variant parentValue: value //From parent loader + function notifyReset() { + input.text = format(parentValue) + } + +// color: { +// if (!enabled) +// { +// return base.style.controlDisabledColor +// } +// switch(definition.validationState) //From parent loader +// { +// case 0: +// return base.style.validationErrorColor; +// case 1: +// return base.style.validationErrorColor; +// case 2: +// return base.style.validationErrorColor; +// case 3: +// return base.style.validationWarningColor; +// case 4: +// return base.style.validationWarningColor; +// case 5: +// return base.style.validationOkColor; +// +// default: +// return base.style.controlTextColor; +// } +// } + + Rectangle + { + anchors.fill: parent; + anchors.margins: base.style.controlBorderWidth; + color: base.style.controlHighlightColor; + opacity: 0.35 +// opacity: !control.hovered ? 0 : valid == 5 ? 1.0 : 0.35; + } + + Label + { + anchors.right: parent.right; + anchors.rightMargin: base.style.unitRightMargin; + anchors.verticalCenter: parent.verticalCenter; + + text: definition.unit; + color: base.style.unitColor + font: base.style.unitFont; + } + + MouseArea + { + id: mouseArea + anchors.fill: parent; + hoverEnabled: true; + cursorShape: Qt.IBeamCursor + } + + TextInput + { + id: input + + anchors + { + left: parent.left + leftMargin: base.style.unitRightMargin + right: parent.right + verticalCenter: parent.verticalCenter + } + + Keys.onReleased: + { + text = text.replace(",", ".") // User convenience. We use dots for decimal values + if(parseFloat(text) != base.parentValue) + { + base.valueChanged(parseFloat(text)); + } + } + + onEditingFinished: + { + if(parseFloat(text) != base.parentValue) + { + base.valueChanged(parseFloat(text)); + } + } + + color: !enabled ? base.style.controlDisabledTextColor : base.style.controlTextColor; + font: base.style.controlFont; + + selectByMouse: true; + + maximumLength: 10; + + validator: RegExpValidator { regExp: /[0-9.,-]{0,10}/ } + +// Binding +// { +// target: input +// property: "text" +// value: format(base.parentValue) +// when: !input.activeFocus +// } + } + + //Rounds a floating point number to 4 decimals. This prevents floating + //point rounding errors. + // + //input: The number to round. + //decimals: The number of decimals (digits after the radix) to round to. + //return: The rounded number. + function roundFloat(input, decimals) + { + //First convert to fixed-point notation to round the number to 4 decimals and not introduce new floating point errors. + //Then convert to a string (is implicit). The fixed-point notation will be something like "3.200". + //Then remove any trailing zeroes and the radix. + return input.toFixed(decimals).replace(/\.?0*$/, ""); //Match on periods, if any ( \.? ), followed by any number of zeros ( 0* ), then the end of string ( $ ). + } + + //Formats a value for display in the text field. + // + //This correctly handles formatting of float values. + // + //input: The string value to format. + //return: The formatted string. + function format(inputValue) { + return parseFloat(inputValue) ? roundFloat(parseFloat(inputValue), 4) : inputValue //If it's a float, round to four decimals. + } + } +} diff --git a/resources/qml/Settings/SettingUnknown.qml b/resources/qml/Settings/SettingUnknown.qml new file mode 100644 index 0000000000..4b403e522f --- /dev/null +++ b/resources/qml/Settings/SettingUnknown.qml @@ -0,0 +1,13 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 1.1 + +SettingItem +{ + Label + { + text: value + " " + unit; + } +} diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml new file mode 100644 index 0000000000..49beba0990 --- /dev/null +++ b/resources/qml/Settings/SettingView.qml @@ -0,0 +1,92 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 +import QtQuick.Layouts 1.1 + +import UM 1.2 as UM + +ScrollView +{ + id: base; + + style: UM.Theme.styles.scrollview; + flickableItem.flickableDirection: Flickable.VerticalFlick; + + property Action configureSettings; + signal showTooltip(Item item, point location, string text); + signal hideTooltip(); + + ListView + { + id: contents + spacing: UM.Theme.getSize("default_lining").height; + + model: UM.SettingDefinitionsModel { id: definitionsModel; containerId: "fdmprinter" } + + delegate: Loader + { + id: delegate + + width: ListView.view.width + + property var definition: model + property var settingDefinitionsModel: definitionsModel + + source: + { + switch(model.type) + { + case "int": + return "SettingTextField.qml" + case "float": + return "SettingTextField.qml" + case "double": + return "SettingTextField.qml" + case "enum": + return "SettingComboBox.qml" + case "boolean": + return "SettingCheckBox.qml" + case "string": + return "SettingTextField.qml" + case "category": + return "SettingCategory.qml" + default: + return "SettingUnknown.qml" + } + } + + Connections + { + target: item + onContextMenuRequested: { contextMenu.key = model.key; contextMenu.popup() } + onShowTooltip: base.showTooltip(delegate, position, model.description) + } + } + + UM.I18nCatalog { id: catalog; name: "uranium"; } + + Menu + { + id: contextMenu; + + property string key; + + MenuItem + { + //: Settings context menu action + text: catalog.i18nc("@action:menu", "Hide this setting"); + onTriggered: definitionsModel.hide(contextMenu.key); + } + MenuItem + { + //: Settings context menu action + text: catalog.i18nc("@action:menu", "Configure setting visiblity..."); + + onTriggered: if(base.configureSettings) base.configureSettings.trigger(contextMenu); + } + } + } +} diff --git a/resources/qml/Settings/SettingsConfigurationPage.qml b/resources/qml/Settings/SettingsConfigurationPage.qml new file mode 100644 index 0000000000..a2889d410a --- /dev/null +++ b/resources/qml/Settings/SettingsConfigurationPage.qml @@ -0,0 +1,119 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 1.1 +import QtQuick.Layouts 1.1 +import QtQuick.Dialogs 1.1 +import QtQuick.Controls.Styles 1.1 +import QtQml 2.2 + +import UM 1.1 as UM + +import "../Preferences" + +PreferencesPage +{ + //: Machine configuration page title. + title: catalog.i18nc("@title:tab","Machine"); + id: base + + contents: ColumnLayout + { + z: base.z + anchors.fill: parent; + UM.I18nCatalog { id: catalog; name:"uranium"} + RowLayout + { + //: Active machine combo box label + Label { text: catalog.i18nc("@label:listbox","Active Machine:"); } + ComboBox + { + id: machineCombo; + Layout.fillWidth: true; + model: UM.Models.machinesModel; + textRole: "name"; + onActivated: + { + if(index != -1) + UM.Models.machinesModel.setActive(index); + } + + Connections + { + id: machineChange + target: UM.Application + onMachineChanged: machineCombo.currentIndex = machineCombo.find(UM.Application.machineName); + } + + Component.onCompleted: machineCombo.currentIndex = machineCombo.find(UM.Application.machineName); + } + //: Remove active machine button + Button { text: catalog.i18nc("@action:button","Remove"); onClicked: confirmRemoveDialog.open(); } + } + ScrollView + { + id: settingsScrollView + Layout.fillWidth: true; + Layout.fillHeight: true; + + ListView + { + id: settingsListView + delegate: settingDelegate + model: UM.Models.settingsModel + x: 0 + + section.property: "category" + section.delegate: Label { text: section } + } + } + } + + Component + { + id: settingDelegate + CheckBox + { + z:0 + id: settingCheckBox + text: model.name; + x: depth * 25 + checked: model.visibility + onClicked: ListView.view.model.setVisibility(model.key, checked) + //enabled: !model.disabled + + onHoveredChanged: + { + if(hovered) + { + var xPos = parent.x + settingCheckBox.width; + var yPos = parent.y; + toolTip.show(model.description, 1000, 200, undefined, undefined) //tooltip-text, hover-delay in msec, animation-length in msec, position X, position Y (both y en x == undefined: gives the tooltip a standard placement in the right corner) + } else + { + toolTip.hide(0, 0)//hover-delay in msec, animation-length in msec + } + } + } + } + + PreferencesToolTip + { + id: toolTip; + } + + MessageDialog + { + id: confirmRemoveDialog; + + icon: StandardIcon.Question; + //: Remove machine confirmation dialog title + title: catalog.i18nc("@title:window","Confirm Machine Deletion"); + //: Remove machine confirmation dialog text + text: catalog.i18nc("@label","Are you sure you wish to remove the machine?"); + standardButtons: StandardButton.Yes | StandardButton.No; + + onYes: UM.Models.machinesModel.removeMachine(machineCombo.currentIndex); + } +} From 27f31a19b57eecfadae3404b9059e8bec0fdb796 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 10 May 2016 17:31:32 +0200 Subject: [PATCH 140/424] Use the local SettingView in SidebarAdvanced --- resources/qml/SidebarAdvanced.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/qml/SidebarAdvanced.qml b/resources/qml/SidebarAdvanced.qml index 8a231aa53d..30f4e74db6 100644 --- a/resources/qml/SidebarAdvanced.qml +++ b/resources/qml/SidebarAdvanced.qml @@ -5,9 +5,9 @@ import QtQuick 2.0 import QtQuick.Controls 1.2 -import UM 1.0 as UM +import "Settings" -UM.SettingView { - expandedCategories: Printer.expandedCategories; - onExpandedCategoriesChanged: Printer.setExpandedCategories(expandedCategories); +SettingView { +// expandedCategories: Printer.expandedCategories; +// onExpandedCategoriesChanged: Printer.setExpandedCategories(expandedCategories); } From 0b0e53dcf5f05a8e78eb30c5b0cb096fe1d9d648 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 11 May 2016 09:37:21 +0200 Subject: [PATCH 141/424] JSON fix: max infill combine is 8 layers cause of cura statically defined array length (CURA-1255) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 23f5a67af9..c4c2253812 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -632,7 +632,7 @@ "default": 0.1, "min_value": "0.0001", "max_value_warning": "0.32", - "max_value": "1000", + "max_value": "layer_height * 8", "visible": false, "inherit_function": "layer_height" }, From 9fcc3930ffb8c7f38b6df07297d3cbe560e048b3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 11 May 2016 14:30:44 +0200 Subject: [PATCH 142/424] ContainerStackModel is now used for listing all added machines CURA-1278 --- resources/qml/SidebarHeader.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 1c17233acb..92be44bc51 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -5,7 +5,7 @@ import QtQuick 2.2 import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.1 -import UM 1.1 as UM +import UM 1.2 as UM Item { @@ -71,7 +71,10 @@ Item id: machineSelectionMenu Instantiator { -// model: UM.MachineInstancesModel { } + model: UM.ContainerStacksModel + { + filter: {"type": "machine"} + } MenuItem { text: model.name; From 48309431132c7d18aaaca95d78297a05c689ffcc Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 11 May 2016 15:21:01 +0200 Subject: [PATCH 143/424] Refactor grouping/ungrouping into an operation that is undoable CURA-1543 --- cura/CuraApplication.py | 45 +++++++++++++++++----------------- cura/SetParentOperation.py | 50 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 23 deletions(-) create mode 100644 cura/SetParentOperation.py diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 9b113b7de8..f381faa482 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -23,6 +23,7 @@ from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation from UM.Operations.SetTransformOperation import SetTransformOperation +from cura.SetParentOperation import SetParentOperation from UM.i18n import i18nCatalog @@ -540,9 +541,10 @@ class CuraApplication(QtApplication): # Use the previously found center of the group bounding box as the new location of the group group_node.setPosition(group_node.getBoundingBox().center) - + @pyqtSlot() def groupSelected(self): + # Create a group-node group_node = SceneNode() group_decorator = GroupDecorator() group_node.addDecorator(group_decorator) @@ -552,40 +554,37 @@ class CuraApplication(QtApplication): group_node.setPosition(center) group_node.setCenterPosition(center) - for node in Selection.getAllSelectedObjects(): - world = node.getWorldPosition() - node.setParent(group_node) - node.setPosition(world - center) + # Move selected nodes into the group-node + op = GroupedOperation() + nodes = Selection.getAllSelectedObjects() + for node in nodes: + op.addOperation(SetParentOperation(node, group_node)) + op.push() + # Deselect individual nodes and select the groupnode instead for node in group_node.getChildren(): Selection.remove(node) - Selection.add(group_node) @pyqtSlot() def ungroupSelected(self): - ungrouped_nodes = [] selected_objects = Selection.getAllSelectedObjects()[:] #clone the list for node in selected_objects: - if node.callDecoration("isGroup" ): - children_to_move = [] - for child in node.getChildren(): - if type(child) is SceneNode: - children_to_move.append(child) + if node.callDecoration("isGroup"): + op = GroupedOperation() - for child in children_to_move: - position = child.getWorldPosition() - child.setParent(node.getParent()) - child.setPosition(position - node.getParent().getWorldPosition()) - child.scale(node.getScale()) - child.rotate(node.getOrientation()) + group_parent = node.getParent() + children = node.getChildren()[:] #clone the list + for child in children: + # Set the parent of the children to the parent of the group-node + op.addOperation(SetParentOperation(child, group_parent)) + # Add all individual nodes to the selection Selection.add(child) - child.callDecoration("setConvexHull",None) - node.setParent(None) - ungrouped_nodes.append(node) - for node in ungrouped_nodes: - Selection.remove(node) + child.callDecoration("setConvexHull", None) + + op.push() + # Note: The group removes itself from the scene once all its children have left it, see GroupDecorator._onChildrenChanged def _createSplashScreen(self): return CuraSplashScreen.CuraSplashScreen() diff --git a/cura/SetParentOperation.py b/cura/SetParentOperation.py new file mode 100644 index 0000000000..c40ce54909 --- /dev/null +++ b/cura/SetParentOperation.py @@ -0,0 +1,50 @@ +# Copyright (c) 2016 Ultimaker B.V. +# Uranium is released under the terms of the AGPLv3 or higher. + +from UM.Scene.SceneNode import SceneNode +from UM.Operations import Operation + +from UM.Math.Vector import Vector + +## An operation that parents a scene node to another scene node. + +class SetParentOperation(Operation.Operation): + ## Initialises this SetParentOperation. + # + # \param node The node which will be reparented. + # \param parent_node The node which will be the parent. + def __init__(self, node, parent_node): + super().__init__() + self._node = node + self._parent = parent_node + self._old_parent = node.getParent() # To restore the previous parent in case of an undo. + + ## Undoes the set-parent operation, restoring the old parent. + def undo(self): + self._set_parent(self._old_parent) + + ## Re-applies the set-parent operation. + def redo(self): + self._set_parent(self._parent) + + ## Sets the parent of the node while applying transformations to the world-transform of the node stays the same. + # + # \param new_parent The new parent. Note: this argument can be None, which would hide the node from the scene. + def _set_parent(self, new_parent): + if new_parent: + self._node.setPosition(self._node.getWorldPosition() - new_parent.getWorldPosition()) + current_parent = self._node.getParent() + if current_parent: + self._node.scale(current_parent.getScale() / new_parent.getScale()) + self._node.rotate(current_parent.getOrientation()) + else: + self._node.scale(Vector(1, 1, 1) / new_parent.getScale()) + self._node.rotate(new_parent.getOrientation().getInverse()) + + self._node.setParent(new_parent) + + ## Returns a programmer-readable representation of this operation. + # + # \return A programmer-readable representation of this operation. + def __repr__(self): + return "SetParentOperation(node = {0}, parent_node={1})".format(self._node, self._parent) From 573c1c1a5a491fb89e5071f5e682b0bada1fdb45 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 11 May 2016 15:35:41 +0200 Subject: [PATCH 144/424] Added MachineManagerModel to Cura CURA-1278 --- cura/CuraApplication.py | 6 +++++- cura/MachineManagerModel.py | 25 +++++++++++++++++++++++++ resources/qml/SidebarHeader.qml | 5 +++-- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 cura/MachineManagerModel.py diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 174621be03..9a0071a41f 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -36,10 +36,11 @@ from . import CuraActions from . import MultiMaterialDecorator from . import ZOffsetDecorator from . import CuraSplashScreen +from . import MachineManagerModel from PyQt5.QtCore import pyqtSlot, QUrl, pyqtSignal, pyqtProperty, QEvent, Q_ENUMS from PyQt5.QtGui import QColor, QIcon -from PyQt5.QtQml import qmlRegisterUncreatableType +from PyQt5.QtQml import qmlRegisterUncreatableType, qmlRegisterSingletonType import platform import sys @@ -201,6 +202,9 @@ class CuraApplication(QtApplication): self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml")) self.initializeEngine() + qmlRegisterSingletonType(MachineManagerModel.MachineManagerModel, "Cura", 1, 0, "MachineManager", + MachineManagerModel.createMachineManagerModel) + if self._engine.rootObjects: self.closeSplash() diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py new file mode 100644 index 0000000000..3b89ae8048 --- /dev/null +++ b/cura/MachineManagerModel.py @@ -0,0 +1,25 @@ + +from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal +from UM.Application import Application +from UM.Signal import Signal, signalemitter + +class MachineManagerModel(QObject): + def __init__(self, parent = None): + super().__init__(parent) + Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerChanged) + + globalContainerChanged = pyqtSignal() + + def _onGlobalContainerChanged(self): + self.globalContainerChanged.emit() + + @pyqtSlot(str) + def setActiveMachine(self, stack_id): + pass + + @pyqtProperty(str, notify = globalContainerChanged) + def activeMachineId(self): + return Application.getInstance().getGlobalContainerStack().getId() + +def createMachineManagerModel(engine, script_engine): + return MachineManagerModel() \ No newline at end of file diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 92be44bc51..b66aea084a 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -6,6 +6,7 @@ import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.1 import UM 1.2 as UM +import Cura 1.0 as Cura Item { @@ -79,9 +80,9 @@ Item { text: model.name; checkable: true; - checked: model.active; + checked: Cura.MachineManager.activeMachineId == model.id exclusiveGroup: machineSelectionMenuGroup; - onTriggered: UM.MachineManager.setActiveMachineInstance(model.name); + onTriggered: Cura.MachineManager.setActiveMachine(model.id); } onObjectAdded: machineSelectionMenu.insertItem(index, object) onObjectRemoved: machineSelectionMenu.removeItem(object) From f91a4f9369c0ab24098d1aea42ee4ba741369f46 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 11 May 2016 16:13:30 +0200 Subject: [PATCH 145/424] Moved registration of MachineManager model to before QML is read Else the model is undefined on first run, which caused a number of silly issues. CURA-1278 --- cura/CuraApplication.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 9a0071a41f..17450029a3 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -199,12 +199,12 @@ class CuraApplication(QtApplication): self.showSplashMessage(self._i18n_catalog.i18nc("@info:progress", "Loading interface...")) - self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml")) - self.initializeEngine() - qmlRegisterSingletonType(MachineManagerModel.MachineManagerModel, "Cura", 1, 0, "MachineManager", MachineManagerModel.createMachineManagerModel) + self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml")) + self.initializeEngine() + if self._engine.rootObjects: self.closeSplash() From 66a29a2f1c112d7805091df928df46a73a928db5 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 11 May 2016 16:21:09 +0200 Subject: [PATCH 146/424] Added name for active machine CURA-1278 --- cura/MachineManagerModel.py | 12 ++++++++++-- resources/qml/SidebarHeader.qml | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 3b89ae8048..c5f2fc3fa6 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -1,7 +1,7 @@ from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal from UM.Application import Application -from UM.Signal import Signal, signalemitter +from UM.Settings.ContainerRegistry import ContainerRegistry class MachineManagerModel(QObject): def __init__(self, parent = None): @@ -15,11 +15,19 @@ class MachineManagerModel(QObject): @pyqtSlot(str) def setActiveMachine(self, stack_id): - pass + containers = ContainerRegistry.getInstance().findContainerStacks(id = stack_id) + if containers: + Application.getInstance().setGlobalContainerStack(containers[0]) + + @pyqtProperty(str, notify = globalContainerChanged) + def activeMachineName(self): + return Application.getInstance().getGlobalContainerStack().getName() @pyqtProperty(str, notify = globalContainerChanged) def activeMachineId(self): return Application.getInstance().getGlobalContainerStack().getId() + + def createMachineManagerModel(engine, script_engine): return MachineManagerModel() \ No newline at end of file diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index b66aea084a..83188007cf 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -58,10 +58,10 @@ Item ToolButton { id: machineSelection - text: UM.MachineManager.activeMachineInstance; + text: Cura.MachineManager.activeMachineName; width: parent.width/100*55 height: UM.Theme.getSize("setting_control").height - tooltip: UM.MachineManager.activeMachineInstance; + tooltip: Cura.MachineManager.activeMachineName; anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter From 21f57664163e61f97b1912e74722d644de426004 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 11 May 2016 16:39:44 +0200 Subject: [PATCH 147/424] JSON feat: switch_extruder_retraction_hop (CURA-1061) --- resources/machines/dual_extrusion_printer.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json index 2977345bcb..05096ffdd0 100644 --- a/resources/machines/dual_extrusion_printer.json +++ b/resources/machines/dual_extrusion_printer.json @@ -304,6 +304,18 @@ "global_only": true } } + }, + "switch_extruder_retraction_hop": { + "label": "Nozzle Switch Z Hop", + "description": "Whenever the machine switches to another nozzle, the build plate is lowered to create clearance between the nozzle and the print. It prevents the nozzle which has been unused for a while from oozing material on the outside of the print.", + "unit": "mm", + "type": "float", + "default": 1.0, + "min_value_warning": "-0.0001", + "max_value_warning": "10", + "visible": false, + "inherit": false, + "enabled": "retraction_enable" } } } From 9993fcc3cf20e5b1c380c166d708b65475230bab Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 11 May 2016 17:14:49 +0200 Subject: [PATCH 148/424] JSON feat: layer_0_z_overlap (CURA-1549) --- resources/machines/fdmprinter.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 638301d4a7..9bb53c89a2 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1485,13 +1485,26 @@ "description": "The gap between the final raft layer and the first layer of the object. Only the first layer is raised by this amount to lower the bonding between the raft layer and the object. Makes it easier to peel off the raft.", "unit": "mm", "type": "float", - "default": 0.35, + "default": 0.3, "min_value": "0", "max_value_warning": "1.0", "enabled": "adhesion_type == \"raft\"", "global_only": "True", "visible": true }, + "layer_0_z_overlap": { + "label": "First Layer Z Overlap", + "description": "Make the first and second layer of the object overlap in the Z direction to compensate for the filament lost in the airgap. All models above the first model layer will be shifted down by this amount.", + "unit": "mm", + "type": "float", + "default": 0.05, + "inherit_function": "layer_height / 2", + "min_value": "0", + "max_value_warning": "layer_height", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": true + }, "raft_surface_layers": { "label": "Raft Top Layers", "description": "The number of top layers on top of the 2nd raft layer. These are fully filled layers that the object sits on. 2 layers result in a smoother top surface than 1.", From fbbe6cde78479edb07e07cf540d198608778abb2 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:35:17 +0200 Subject: [PATCH 149/424] Expose the Actions object as a QML singleton This makes it much simpler to use actions from within other objects --- resources/qml/Actions.qml | 2 ++ resources/qml/qmldir | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 resources/qml/qmldir diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 003a3ceeec..ad88aa3c39 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -1,6 +1,8 @@ // Copyright (c) 2015 Ultimaker B.V. // Cura is released under the terms of the AGPLv3 or higher. +pragma Singleton + import QtQuick 2.2 import QtQuick.Controls 1.1 import UM 1.1 as UM diff --git a/resources/qml/qmldir b/resources/qml/qmldir new file mode 100644 index 0000000000..096561aca5 --- /dev/null +++ b/resources/qml/qmldir @@ -0,0 +1,3 @@ +module Cura + +singleton Actions 1.0 Actions.qml From 207bdb3cd5669e1c7f272d0ee9ee34409c4068f4 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:37:34 +0200 Subject: [PATCH 150/424] Update Cura.qml to use Actions as singleton instead of instantiating them --- resources/qml/Cura.qml | 287 ++++++++++++++++++++++------------------- 1 file changed, 154 insertions(+), 133 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index e39cd733d9..3b887796eb 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -9,6 +9,8 @@ import QtQuick.Dialogs 1.1 import UM 1.1 as UM +import "." + UM.MainWindow { id: base @@ -53,7 +55,7 @@ UM.MainWindow title: catalog.i18nc("@title:menu menubar:toplevel","&File"); MenuItem { - action: actions.open; + action: Actions.open; } Menu @@ -115,11 +117,11 @@ UM.MainWindow } } - MenuItem { action: actions.reloadAll; } + MenuItem { action: Actions.reloadAll; } MenuSeparator { } - MenuItem { action: actions.quit; } + MenuItem { action: Actions.quit; } } Menu @@ -127,17 +129,17 @@ UM.MainWindow //: Edit menu title: catalog.i18nc("@title:menu menubar:toplevel","&Edit"); - MenuItem { action: actions.undo; } - MenuItem { action: actions.redo; } + MenuItem { action: Actions.undo; } + MenuItem { action: Actions.redo; } MenuSeparator { } - MenuItem { action: actions.deleteSelection; } - MenuItem { action: actions.deleteAll; } - MenuItem { action: actions.resetAllTranslation; } - MenuItem { action: actions.resetAll; } + MenuItem { action: Actions.deleteSelection; } + MenuItem { action: Actions.deleteAll; } + MenuItem { action: Actions.resetAllTranslation; } + MenuItem { action: Actions.resetAll; } MenuSeparator { } - MenuItem { action: actions.groupObjects;} - MenuItem { action: actions.mergeObjects;} - MenuItem { action: actions.unGroupObjects;} + MenuItem { action: Actions.groupObjects;} + MenuItem { action: Actions.mergeObjects;} + MenuItem { action: Actions.unGroupObjects;} } Menu @@ -201,10 +203,10 @@ UM.MainWindow ExclusiveGroup { id: machineVariantsGroup; } - MenuSeparator { visible: UM.MachineManager.hasVariants; } +// MenuSeparator { visible: UM.MachineManager.hasVariants; } - MenuItem { action: actions.addMachine; } - MenuItem { action: actions.configureMachines; } + MenuItem { action: Actions.addMachine; } + MenuItem { action: Actions.configureMachines; } } Menu @@ -277,11 +279,11 @@ UM.MainWindow MenuSeparator { id: profileMenuSeparator } - MenuItem { action: actions.updateProfile; } - MenuItem { action: actions.resetProfile; } - MenuItem { action: actions.addProfile; } + MenuItem { action: Actions.updateProfile; } + MenuItem { action: Actions.resetProfile; } + MenuItem { action: Actions.addProfile; } MenuSeparator { } - MenuItem { action: actions.manageProfiles; } + MenuItem { action: Actions.manageProfiles; } } Menu @@ -323,7 +325,7 @@ UM.MainWindow //: Settings menu title: catalog.i18nc("@title:menu menubar:toplevel","&Settings"); - MenuItem { action: actions.preferences; } + MenuItem { action: Actions.preferences; } } Menu @@ -331,11 +333,11 @@ UM.MainWindow //: Help menu title: catalog.i18nc("@title:menu menubar:toplevel","&Help"); - MenuItem { action: actions.showEngineLog; } - MenuItem { action: actions.documentation; } - MenuItem { action: actions.reportBug; } + MenuItem { action: Actions.showEngineLog; } + MenuItem { action: Actions.documentation; } + MenuItem { action: Actions.reportBug; } MenuSeparator { } - MenuItem { action: actions.about; } + MenuItem { action: Actions.about; } } } @@ -425,7 +427,7 @@ UM.MainWindow left: parent.left; //leftMargin: UM.Theme.getSize("loadfile_margin").width } - action: actions.open; + action: Actions.open; } Image @@ -513,22 +515,12 @@ UM.MainWindow width: UM.Theme.getSize("sidebar").width; - addMachineAction: actions.addMachine; - configureMachinesAction: actions.configureMachines; - addProfileAction: actions.addProfile; - updateProfileAction: actions.updateProfile; - resetProfileAction: actions.resetProfile; - manageProfilesAction: actions.manageProfiles; - - configureSettingsAction: Action - { - onTriggered: - { - preferences.visible = true; - preferences.setPage(2); - preferences.getCurrentItem().scrollToSection(source.key); - } - } + addMachineAction: Actions.addMachine; + configureMachinesAction: Actions.configureMachines; + addProfileAction: Actions.addProfile; + updateProfileAction: Actions.updateProfile; + resetProfileAction: Actions.resetProfile; + manageProfilesAction: Actions.manageProfiles; } } } @@ -561,73 +553,16 @@ UM.MainWindow } } - Actions + Connections { - id: actions; + target: Actions.preferences + onTriggered: preferences.visible = true + } - open.onTriggered: openDialog.open(); - - quit.onTriggered: base.visible = false; - - undo.onTriggered: UM.OperationStack.undo(); - undo.enabled: UM.OperationStack.canUndo; - redo.onTriggered: UM.OperationStack.redo(); - redo.enabled: UM.OperationStack.canRedo; - - deleteSelection.onTriggered: - { - Printer.deleteSelection(); - } - - deleteObject.onTriggered: - { - if(objectContextMenu.objectId != 0) - { - Printer.deleteObject(objectContextMenu.objectId); - objectContextMenu.objectId = 0; - } - } - - multiplyObject.onTriggered: - { - if(objectContextMenu.objectId != 0) - { - Printer.multiplyObject(objectContextMenu.objectId, 1); - objectContextMenu.objectId = 0; - } - } - - centerObject.onTriggered: - { - if(objectContextMenu.objectId != 0) - { - Printer.centerObject(objectContextMenu.objectId); - objectContextMenu.objectId = 0; - } - } - - groupObjects.onTriggered: - { - Printer.groupSelected(); - } - - unGroupObjects.onTriggered: - { - Printer.ungroupSelected(); - } - - mergeObjects.onTriggered: - { - Printer.mergeSelected(); - } - - deleteAll.onTriggered: Printer.deleteAll(); - resetAllTranslation.onTriggered: Printer.resetAllTranslation(); - resetAll.onTriggered: Printer.resetAll(); - reloadAll.onTriggered: Printer.reloadAll(); - - addMachine.onTriggered: addMachineDialog.visible = true; - addProfile.onTriggered: + Connections + { + target: Actions.addProfile + onTriggered: { UM.MachineManager.createProfile(); preferences.setPage(4); @@ -636,26 +571,37 @@ UM.MainWindow // Show the renameDialog after a very short delay so the preference page has time to initiate showProfileNameDialogTimer.start(); } - updateProfile.onTriggered: UM.ActiveProfile.updateProfile(); - resetProfile.onTriggered: UM.ActiveProfile.discardChanges(); + } - preferences.onTriggered: preferences.visible = true; - configureMachines.onTriggered: + Connections + { + target: Actions.configureMachines + onTriggered: { preferences.visible = true; preferences.setPage(3); } - manageProfiles.onTriggered: + } + + Connections + { + target: Actions.manageProfiles + onTriggered: { preferences.visible = true; preferences.setPage(4); } + } - documentation.onTriggered: CuraActions.openDocumentation(); - reportBug.onTriggered: CuraActions.openBugReportPage(); - showEngineLog.onTriggered: engineLog.visible = true; - about.onTriggered: aboutDialog.visible = true; - toggleFullScreen.onTriggered: base.toggleFullscreen(); + Connections + { + target: Actions.configureSettingVisibility + onTriggered: + { + preferences.visible = true; + preferences.setPage(2); + preferences.getCurrentItem().scrollToSection(source.key); + } } Timer @@ -672,29 +618,68 @@ UM.MainWindow id: objectContextMenu; property variant objectId: -1; - MenuItem { action: actions.centerObject; } - MenuItem { action: actions.deleteObject; } - MenuItem { action: actions.multiplyObject; } + MenuItem { action: Actions.centerObject; } + MenuItem { action: Actions.deleteObject; } + MenuItem { action: Actions.multiplyObject; } MenuSeparator { } - MenuItem { action: actions.deleteAll; } - MenuItem { action: actions.reloadAll; } - MenuItem { action: actions.resetAllTranslation; } - MenuItem { action: actions.resetAll; } - MenuItem { action: actions.groupObjects; } - MenuItem { action: actions.mergeObjects; } - MenuItem { action: actions.unGroupObjects; } + MenuItem { action: Actions.deleteAll; } + MenuItem { action: Actions.reloadAll; } + MenuItem { action: Actions.resetAllTranslation; } + MenuItem { action: Actions.resetAll; } + MenuItem { action: Actions.groupObjects; } + MenuItem { action: Actions.mergeObjects; } + MenuItem { action: Actions.unGroupObjects; } + + Connections + { + target: Actions.deleteObject + onTriggered: + { + if(objectContextMenu.objectId != 0) + { + Printer.deleteObject(objectContextMenu.objectId); + objectContextMenu.objectId = 0; + } + } + } + + Connections + { + target: Actions.multiplyObject + onTriggered: + { + if(objectContextMenu.objectId != 0) + { + Printer.multiplyObject(objectContextMenu.objectId, 1); + objectContextMenu.objectId = 0; + } + } + } + + Connections + { + target: Actions.centerObject + onTriggered: + { + if(objectContextMenu.objectId != 0) + { + Printer.centerObject(objectContextMenu.objectId); + objectContextMenu.objectId = 0; + } + } + } } Menu { id: contextMenu; - MenuItem { action: actions.deleteAll; } - MenuItem { action: actions.reloadAll; } - MenuItem { action: actions.resetAllTranslation; } - MenuItem { action: actions.resetAll; } - MenuItem { action: actions.groupObjects; } - MenuItem { action: actions.mergeObjects; } - MenuItem { action: actions.unGroupObjects; } + MenuItem { action: Actions.deleteAll; } + MenuItem { action: Actions.reloadAll; } + MenuItem { action: Actions.resetAllTranslation; } + MenuItem { action: Actions.resetAll; } + MenuItem { action: Actions.groupObjects; } + MenuItem { action: Actions.mergeObjects; } + MenuItem { action: Actions.unGroupObjects; } } Connections @@ -713,6 +698,18 @@ UM.MainWindow } } + Connections + { + target: Actions.quit + onTriggered: base.visible = false; + } + + Connections + { + target: Actions.toggleFullScreen + onTriggered: base.toggleFullscreen(); + } + FileDialog { id: openDialog; @@ -737,21 +734,45 @@ UM.MainWindow } } + Connections + { + target: Actions.open + onTriggered: openDialog.open() + } + EngineLog { id: engineLog; } + Connections + { + target: Actions.showEngineLog + onTriggered: engineLog.visible = true; + } + AddMachineDialog { id: addMachineDialog } + Connections + { + target: Actions.addMachine + onTriggered: addMachineDialog.visible = true; + } + AboutDialog { id: aboutDialog } + Connections + { + target: Actions.about + onTriggered: aboutDialog.visible = true; + } + Connections { target: Printer From 5e226038d94bf3008712fa9efe1048dfa1bc9fba Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:38:54 +0200 Subject: [PATCH 151/424] Instantiate models instead of using the Models object Since Models has been removed --- resources/qml/Cura.qml | 2 +- resources/qml/Toolbar.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 3b887796eb..6c54c439a9 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -294,7 +294,7 @@ UM.MainWindow Instantiator { - model: UM.Models.extensionModel + model: UM.ExtensionModel { } Menu { diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index d5274cd873..bde063de10 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -25,7 +25,7 @@ Item { Repeater { id: repeat - model: UM.Models.toolModel + model: UM.ToolModel { } Button { text: model.name From 8c5b3c8b1dfee4a1779288d50ffe73c21de78f3a Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:40:39 +0200 Subject: [PATCH 152/424] Directly implement onTriggered in Actions for several actions Since they use global objects we can directly call those methods. This makes it simpler to call these actions from other objects. --- resources/qml/Actions.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index ad88aa3c39..bc9ef89e24 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -62,6 +62,8 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit","&Undo"); iconName: "edit-undo"; shortcut: StandardKey.Undo; + onTriggered: UM.OperationStack.undo(); + enabled: UM.OperationStack.canUndo; } Action @@ -70,6 +72,8 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit","&Redo"); iconName: "edit-redo"; shortcut: StandardKey.Redo; + onTriggered: UM.OperationStack.redo(); + enabled: UM.OperationStack.canRedo; } Action @@ -105,6 +109,7 @@ Item id: updateProfileAction; enabled: UM.ActiveProfile.valid && !UM.ActiveProfile.readOnly && UM.ActiveProfile.hasCustomisedValues text: catalog.i18nc("@action:inmenu menubar:profile","&Update Current Profile"); + onTriggered: UM.ActiveProfile.updateProfile(); } Action @@ -112,6 +117,7 @@ Item id: resetProfileAction; enabled: UM.ActiveProfile.valid && UM.ActiveProfile.hasCustomisedValues text: catalog.i18nc("@action:inmenu menubar:profile","&Reload Current Profile"); + onTriggered: UM.ActiveProfile.discardChanges(); } Action @@ -134,12 +140,14 @@ Item text: catalog.i18nc("@action:inmenu menubar:help","Show Online &Documentation"); iconName: "help-contents"; shortcut: StandardKey.Help; + onTriggered: CuraActions.openDocumentation(); } Action { id: reportBugAction; text: catalog.i18nc("@action:inmenu menubar:help","Report a &Bug"); iconName: "tools-report-bug"; + onTriggered: CuraActions.openBugReportPage(); } Action @@ -156,6 +164,7 @@ Item enabled: UM.Controller.toolsEnabled; iconName: "edit-delete"; shortcut: StandardKey.Delete; + onTriggered: Printer.deleteSelection(); } Action @@ -178,6 +187,7 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit","&Group Objects"); enabled: UM.Scene.numObjectsSelected > 1 ? true: false iconName: "object-group" + onTriggered: Printer.groupSelected(); } Action @@ -186,6 +196,7 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit","Ungroup Objects"); enabled: UM.Scene.isGroupSelected iconName: "object-ungroup" + onTriggered: Printer.ungroupSelected(); } Action @@ -194,6 +205,7 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit","&Merge Objects"); enabled: UM.Scene.numObjectsSelected > 1 ? true: false iconName: "merge"; + onTriggered: Printer.mergeSelected(); } Action @@ -210,6 +222,7 @@ Item enabled: UM.Controller.toolsEnabled; iconName: "edit-delete"; shortcut: "Ctrl+D"; + onTriggered: Printer.deleteAll(); } Action @@ -217,18 +230,21 @@ Item id: reloadAllAction; text: catalog.i18nc("@action:inmenu menubar:file","Re&load All Objects"); iconName: "document-revert"; + onTriggered: Printer.reloadAll(); } Action { id: resetAllTranslationAction; text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Object Positions"); + onTriggered: Printer.resetAllTranslation(); } Action { id: resetAllAction; text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Object &Transformations"); + onTriggered: Printer.resetAll(); } Action From 3bfe18e76f35a0aea5b129518a1eced0acff0cdc Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:41:22 +0200 Subject: [PATCH 153/424] Add a configureSettingVisibility action --- resources/qml/Actions.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index bc9ef89e24..afb018fa69 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -47,6 +47,8 @@ Item property alias toggleFullScreen: toggleFullScreenAction; + property alias configureSettingVisibility: configureSettingVisibilityAction + UM.I18nCatalog{id: catalog; name:"cura"} Action @@ -262,4 +264,10 @@ Item iconName: "view-list-text"; shortcut: StandardKey.WhatsThis; } + + Action + { + id: configureSettingVisibilityAction + text: catalog.i18nc("@action:menu", "Configure setting visiblity..."); + } } From d761409bf2b1a074850766bbcec2582d96ce5b77 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:51:09 +0200 Subject: [PATCH 154/424] Remove SettingItemStyle from the cura theme As it is no longer needed --- resources/themes/cura/styles.qml | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index e536c38ba7..cb85abf0c1 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -280,35 +280,6 @@ QtObject { } } - property variant setting_item: UM.SettingItemStyle { - labelFont: Theme.getFont("default"); - labelColor: Theme.getColor("setting_control_text"); - - spacing: Theme.getSize("default_lining").height; - fixedHeight: Theme.getSize("setting").height; - - controlWidth: Theme.getSize("setting_control").width; - controlRightMargin: Theme.getSize("setting_control_margin").width; - controlColor: Theme.getColor("setting_control"); - controlHighlightColor: Theme.getColor("setting_control_highlight"); - controlBorderColor: Theme.getColor("setting_control_border"); - controlBorderHighlightColor: Theme.getColor("setting_control_border_highlight"); - controlTextColor: Theme.getColor("setting_control_text"); - controlBorderWidth: Theme.getSize("default_lining").width; - controlDisabledColor: Theme.getColor("setting_control_disabled"); - controlDisabledTextColor: Theme.getColor("setting_control_disabled_text"); - controlDisabledBorderColor: Theme.getColor("setting_control_disabled_border"); - controlFont: Theme.getFont("default"); - - validationErrorColor: Theme.getColor("setting_validation_error"); - validationWarningColor: Theme.getColor("setting_validation_warning"); - validationOkColor: Theme.getColor("setting_validation_ok"); - - unitRightMargin: Theme.getSize("setting_unit_margin").width; - unitColor: Theme.getColor("setting_unit"); - unitFont: Theme.getFont("default"); - } - property Component combobox: Component { ComboBoxStyle { background: Rectangle { From fa9f9b41ab9eacf52802ca4c41a315a1bfffac9f Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:52:27 +0200 Subject: [PATCH 155/424] Fix SettingUnknown setting handler to display correctly --- resources/qml/Settings/SettingUnknown.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingUnknown.qml b/resources/qml/Settings/SettingUnknown.qml index 4b403e522f..55e26b6695 100644 --- a/resources/qml/Settings/SettingUnknown.qml +++ b/resources/qml/Settings/SettingUnknown.qml @@ -4,10 +4,16 @@ import QtQuick 2.1 import QtQuick.Controls 1.1 +import UM 1.2 as UM + SettingItem { - Label + contents: Label { + anchors.fill: parent text: value + " " + unit; + color: UM.Theme.getColor("setting_control_text") + + verticalAlignment: Qt.AlignVCenter } } From 4c9b9b68ef8263d2f6f577b16db36a5d0d80b8ba Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:52:56 +0200 Subject: [PATCH 156/424] Add add/remove transitions so expand/collapse is animated --- resources/qml/Settings/SettingView.qml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 49beba0990..92f228a9d8 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -68,6 +68,28 @@ ScrollView UM.I18nCatalog { id: catalog; name: "uranium"; } + add: Transition { + SequentialAnimation { + NumberAnimation { properties: "height"; from: 0; duration: 100 } + NumberAnimation { properties: "opacity"; from: 0; duration: 100 } + } + } + remove: Transition { + SequentialAnimation { + NumberAnimation { properties: "opacity"; to: 0; duration: 100 } + NumberAnimation { properties: "height"; to: 0; duration: 100 } + } + } + addDisplaced: Transition { + NumberAnimation { properties: "x,y"; duration: 100 } + } + removeDisplaced: Transition { + SequentialAnimation { + PauseAnimation { duration: 100; } + NumberAnimation { properties: "x,y"; duration: 100 } + } + } + Menu { id: contextMenu; From 2abb9a47c127fe9ab982260715d7cbd9f51fe703 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:55:45 +0200 Subject: [PATCH 157/424] Stop using SettingItemStyle Since everything is now in Cura, using SettingItemStyle does not make a lot of sense anymore --- resources/qml/Settings/SettingCheckBox.qml | 15 ++--- resources/qml/Settings/SettingComboBox.qml | 22 +++---- resources/qml/Settings/SettingTextField.qml | 68 ++++++++++----------- 3 files changed, 53 insertions(+), 52 deletions(-) diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index b2bbc68ec1..37cad7fd4b 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -46,19 +46,20 @@ SettingItem { if (!enabled) { - return base.style.controlDisabledColor + return UM.Theme.getColor("setting_control_disabled") } if(base.containsMouse || base.activeFocus) { - return base.style.controlHighlightColor + return UM.Theme.getColor("setting_control_highlight") } else { - return base.style.controlColor + return UM.Theme.getColor("setting_control") } } - border.width: base.style.controlBorderWidth; - border.color: !enabled ? base.style.controlDisabledBorderColor : control.containsMouse ? base.style.controlBorderHighlightColor : base.style.controlBorderColor; + + border.width: UM.Theme.getSize("default_lining").width + border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : control.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border") UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter @@ -67,9 +68,9 @@ SettingItem height: parent.height/2.5 sourceSize.width: width sourceSize.height: width - color: !enabled ? base.style.controlDisabledTextColor : base.style.controlTextColor; + color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text"); source: UM.Theme.getIcon("check") - opacity: control.checked + opacity: control.checked ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100; } } } } diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index 85935c3471..6fd4c5621c 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -33,33 +33,33 @@ SettingItem { if (!enabled) { - return base.style.controlDisabledColor + return UM.Theme.getColor("setting_control_disabled") } if(control.hovered || base.activeFocus) { - return base.style.controlHighlightColor + return UM.Theme.getColor("setting_control_highlight") } else { - return base.style.controlColor + return UM.Theme.getColor("setting_control") } } - border.width: base.style.controlBorderWidth; - border.color: !enabled ? base.style.controlDisabledBorderColor : control.hovered ? base.style.controlBorderHighlightColor : base.style.controlBorderColor; + border.width: UM.Theme.getSize("default_lining").width; + border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : control.hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border"); } label: Item { Label { anchors.left: parent.left; - anchors.leftMargin: base.style.controlBorderWidth + anchors.leftMargin: UM.Theme.getSize("default_lining").width anchors.right: downArrow.left; - anchors.rightMargin: base.style.controlBorderWidth; + anchors.rightMargin: UM.Theme.getSize("default_lining").width; anchors.verticalCenter: parent.verticalCenter; text: control.currentText; - font: base.style.controlFont; - color: !enabled ? base.style.controlDisabledTextColor : base.style.controlTextColor; + font: UM.Theme.getFont("default"); + color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text"); elide: Text.ElideRight; verticalAlignment: Text.AlignVCenter; @@ -69,7 +69,7 @@ SettingItem { id: downArrow anchors.right: parent.right; - anchors.rightMargin: base.style.controlBorderWidth * 2; + anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2; anchors.verticalCenter: parent.verticalCenter; source: UM.Theme.getIcon("arrow_bottom") @@ -78,7 +78,7 @@ SettingItem sourceSize.width: width + 5 sourceSize.height: width + 5 - color: base.style.controlTextColor; + color: UM.Theme.getColor("setting_control_text"); } } diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 62f03b087d..1b28ebadcc 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -18,44 +18,44 @@ SettingItem property alias hovered: mouseArea.containsMouse; - border.width: base.style.controlBorderWidth; - border.color: !enabled ? base.style.controlDisabledBorderColor : hovered ? base.style.controlBorderHighlightColor : base.style.controlBorderColor + border.width: UM.Theme.getSize("default_lining").width + border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border") property variant parentValue: value //From parent loader function notifyReset() { input.text = format(parentValue) } -// color: { -// if (!enabled) -// { -// return base.style.controlDisabledColor -// } -// switch(definition.validationState) //From parent loader -// { -// case 0: -// return base.style.validationErrorColor; -// case 1: -// return base.style.validationErrorColor; -// case 2: -// return base.style.validationErrorColor; -// case 3: -// return base.style.validationWarningColor; -// case 4: -// return base.style.validationWarningColor; -// case 5: -// return base.style.validationOkColor; -// -// default: -// return base.style.controlTextColor; -// } -// } + color: { + if (!enabled) + { + return UM.Theme.getColor("setting_control_disabled") + } + switch(definition.validationState) + { + case 0: + return UM.Theme.getColor("setting_validation_error") + case 1: + return UM.Theme.getColor("setting_validation_error") + case 2: + return UM.Theme.getColor("setting_validation_error") + case 3: + return UM.Theme.getColor("setting_validation_warning") + case 4: + return UM.Theme.getColor("setting_validation_warning") + case 5: + return UM.Theme.getColor("setting_validation_ok") + + default: + return UM.Theme.getColor("setting_control") + } + } Rectangle { anchors.fill: parent; - anchors.margins: base.style.controlBorderWidth; - color: base.style.controlHighlightColor; + anchors.margins: UM.Theme.getSize("default_lining").width; + color: UM.Theme.getColor("setting_control_highlight") opacity: 0.35 // opacity: !control.hovered ? 0 : valid == 5 ? 1.0 : 0.35; } @@ -63,12 +63,12 @@ SettingItem Label { anchors.right: parent.right; - anchors.rightMargin: base.style.unitRightMargin; + anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width anchors.verticalCenter: parent.verticalCenter; text: definition.unit; - color: base.style.unitColor - font: base.style.unitFont; + color: UM.Theme.getColor("setting_unit") + font: UM.Theme.getFont("default") } MouseArea @@ -86,7 +86,7 @@ SettingItem anchors { left: parent.left - leftMargin: base.style.unitRightMargin + leftMargin: UM.Theme.unitRightMargin right: parent.right verticalCenter: parent.verticalCenter } @@ -108,8 +108,8 @@ SettingItem } } - color: !enabled ? base.style.controlDisabledTextColor : base.style.controlTextColor; - font: base.style.controlFont; + color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text") + font: UM.Theme.getFont("default"); selectByMouse: true; From b7fd97737c9d397cc3a37014be7a13cc843adb25 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:03:02 +0200 Subject: [PATCH 158/424] Simplify tooltip handling for settings Rather than use three different signals, use a single showTooltip signal with a text property. This makes it possible to show any tooltip from within a setting item. --- resources/qml/Settings/SettingCategory.qml | 6 ++++-- resources/qml/Settings/SettingItem.qml | 4 ++-- resources/qml/Settings/SettingView.qml | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index b4c0263149..455ef3d3e1 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -13,7 +13,7 @@ Button { style: UM.Theme.styles.sidebar_category; - signal showTooltip(); + signal showTooltip(string text); signal hideTooltip(); signal contextMenuRequested() @@ -69,11 +69,13 @@ Button { iconSource: UM.Theme.getIcon("notice") onEntered: { - base.showTooltip() + base.showTooltip(catalog.i18nc("@label", "This setting is normally calculated, but it currently has an absolute value set.\n\nClick to restore the calculated value.")) } onExited: { base.hideTooltip(); } + + UM.I18nCatalog { id: catalog; name: "cura" } } } diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index 845f35853e..e8c3b0b7bb 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -18,7 +18,7 @@ Item { property alias contents: controlContainer.children signal contextMenuRequested() - signal showTooltip(var position); + signal showTooltip(string text); signal hideTooltip(); MouseArea @@ -49,7 +49,7 @@ Item { interval: 500; repeat: false; - onTriggered: base.showTooltip({ x: mouse.mouseX, y: mouse.mouseY }); + onTriggered: base.showTooltip(definition.description); } } diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 92f228a9d8..6d0944e1be 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -62,7 +62,8 @@ ScrollView { target: item onContextMenuRequested: { contextMenu.key = model.key; contextMenu.popup() } - onShowTooltip: base.showTooltip(delegate, position, model.description) + onShowTooltip: base.showTooltip(delegate, { x: 0, y: delegate.height / 2 }, text) + onHideTooltip: base.hideTooltip() } } From d68f274a098d7d8669bf90f5416a35c4593b4ff6 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:03:54 +0200 Subject: [PATCH 159/424] Improve positioning of tooltips in advanced mode --- resources/qml/Sidebar.qml | 2 +- resources/qml/SidebarSimple.qml | 6 +++--- resources/qml/SidebarTooltip.qml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 5426125194..b98f3477dc 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -27,7 +27,7 @@ Rectangle function showTooltip(item, position, text) { tooltip.text = text; - position = item.mapToItem(base, position.x, position.y / 2); + position = item.mapToItem(base, position.x, position.y); tooltip.show(position); } diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 21aa315dd1..0e877ab09b 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -120,7 +120,7 @@ Item } } onEntered: { - base.showTooltip(infillCellRight, Qt.point(-infillCellRight.x, parent.height), model.text); + base.showTooltip(infillCellRight, Qt.point(-infillCellRight.x, 0), model.text); } onExited: { base.hideTooltip(); @@ -224,7 +224,7 @@ Item onEntered: { parent.hovered_ex = true - base.showTooltip(brimCheckBox, Qt.point(-helpersCellRight.x, parent.height), + base.showTooltip(brimCheckBox, Qt.point(-helpersCellRight.x, 0), catalog.i18nc("@label", "Enable printing a brim. This will add a single-layer-thick flat area around your object which is easy to cut off afterwards.")); } onExited: @@ -257,7 +257,7 @@ Item onEntered: { parent.hovered_ex = true - base.showTooltip(supportCheckBox, Qt.point(-helpersCellRight.x, parent.height), + base.showTooltip(supportCheckBox, Qt.point(-helpersCellRight.x, 0), catalog.i18nc("@label", "Enable printing support structures. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); } onExited: diff --git a/resources/qml/SidebarTooltip.qml b/resources/qml/SidebarTooltip.qml index 1c7f4bcb76..5cb7ff1f0b 100644 --- a/resources/qml/SidebarTooltip.qml +++ b/resources/qml/SidebarTooltip.qml @@ -31,7 +31,7 @@ UM.PointingRectangle { y = position.y - UM.Theme.getSize("tooltip_arrow_margins").height; } base.opacity = 1; - target = Qt.point(40 , position.y) + target = Qt.point(40 , position.y + UM.Theme.getSize("tooltip_arrow_margins").height / 2) } function hide() { From cdc8b04c5c72cac15357dce9afa14447577de49b Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:05:26 +0200 Subject: [PATCH 160/424] Use the configureSettingVisiblity action from Actions when needed --- resources/qml/Settings/SettingCategory.qml | 4 +++- resources/qml/Settings/SettingView.qml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index 455ef3d3e1..871b5c0036 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -8,6 +8,8 @@ import QtQuick.Layouts 1.1 import UM 1.1 as UM +import ".." + Button { id: base; @@ -43,7 +45,7 @@ Button { iconSource: UM.Theme.getIcon("settings"); onClicked: { - Actions.configureSettingVisibility() + Actions.configureSettingVisibility.trigger(definition) } } diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 6d0944e1be..76fd232f1a 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -8,6 +8,8 @@ import QtQuick.Layouts 1.1 import UM 1.2 as UM +import ".." + ScrollView { id: base; @@ -108,7 +110,7 @@ ScrollView //: Settings context menu action text: catalog.i18nc("@action:menu", "Configure setting visiblity..."); - onTriggered: if(base.configureSettings) base.configureSettings.trigger(contextMenu); + onTriggered: Actions.configureSettingVisibility.trigger(contextMenu); } } } From 38e9661fe1cb6645f8f076c3b9535af020eb6db0 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:05:38 +0200 Subject: [PATCH 161/424] Fix setting type names --- resources/qml/Settings/SettingView.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 76fd232f1a..6fdc5d5082 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -45,13 +45,11 @@ ScrollView return "SettingTextField.qml" case "float": return "SettingTextField.qml" - case "double": - return "SettingTextField.qml" case "enum": return "SettingComboBox.qml" - case "boolean": + case "bool": return "SettingCheckBox.qml" - case "string": + case "str": return "SettingTextField.qml" case "category": return "SettingCategory.qml" From 89928dc6a957b8de3454141fc266589f2b54f333 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:06:01 +0200 Subject: [PATCH 162/424] Make Setting item loading asynchronous and fix its size --- resources/qml/Settings/SettingView.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 6fdc5d5082..66ff30fa11 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -32,11 +32,14 @@ ScrollView { id: delegate - width: ListView.view.width + width: UM.Theme.getSize("sidebar").width; + height: UM.Theme.getSize("section").height; property var definition: model property var settingDefinitionsModel: definitionsModel + asynchronous: true + source: { switch(model.type) From 4390c6a6ff9a08900f49ffdd663058cd9cf70062 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:06:48 +0200 Subject: [PATCH 163/424] Remove configureSettingsAction property from sidebar as it is no longer needed --- resources/qml/Sidebar.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index b98f3477dc..81823f039d 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -247,7 +247,6 @@ Rectangle id: sidebarAdvanced; visible: false; - configureSettings: base.configureSettingsAction; onShowTooltip: base.showTooltip(item, location, text) onHideTooltip: base.hideTooltip() } From 9ec93bedabbea2efbda3e58c4ab143221f02beb9 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:07:27 +0200 Subject: [PATCH 164/424] Fix type and spacing of SettingItem contents --- resources/qml/Settings/SettingItem.qml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index e8c3b0b7bb..f9dac0b879 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -154,15 +154,14 @@ Item { } - Rectangle + Item { id: controlContainer; - color: "red" - anchors.right: parent.right; + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter; width: UM.Theme.getSize("setting_control").width; - height: UM.Theme.getSize("setting_contorl").height + height: UM.Theme.getSize("setting_control").height } } From 2b479e5651680a8cadab1b5c837f9e046fc291bb Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:07:42 +0200 Subject: [PATCH 165/424] Add a hovered property to SettingItem --- resources/qml/Settings/SettingItem.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index f9dac0b879..5e31e0c264 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -15,7 +15,8 @@ Item { height: UM.Theme.getSize("section").height; - property alias contents: controlContainer.children + property alias contents: controlContainer.children; + property bool hovered: false signal contextMenuRequested() signal showTooltip(string text); From d4b5cd519b7a03ad35040537c506f8c94d225d6c Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:10:11 +0200 Subject: [PATCH 166/424] Fix SettingCheckbox so it displays correctly --- resources/qml/Settings/SettingCheckBox.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 37cad7fd4b..0acacb95fb 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -12,9 +12,10 @@ SettingItem { id: base - MouseArea + contents: MouseArea { id: control + anchors.fill: parent property bool checked: { @@ -48,7 +49,7 @@ SettingItem { return UM.Theme.getColor("setting_control_disabled") } - if(base.containsMouse || base.activeFocus) + if(control.containsMouse || control.activeFocus) { return UM.Theme.getColor("setting_control_highlight") } From d1d2dc04c5bb16a4ab5a4e7ede5478100062e9ed Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:13:36 +0200 Subject: [PATCH 167/424] Display the correct tooltips for reset and inherits buttons --- resources/qml/Settings/SettingItem.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index 5e31e0c264..d11b0b300a 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -107,7 +107,7 @@ Item { controlContainer.notifyReset(); } - onEntered: base.showResetTooltip({ x: mouse.mouseX, y: mouse.mouseY }) + onEntered: base.showTooltip(catalog.i18nc("@label", "This setting has a value that is different from the profile.\n\nClick to restore the value of the profile.")) onExited: { if(controlContainer.item && controlContainer.item.hovered) @@ -141,7 +141,7 @@ Item { iconSource: UM.Theme.getIcon("notice"); - onEntered: base.showInheritanceTooltip({ x: mouse.mouseX, y: mouse.mouseY }) + onEntered: base.showTooltip(catalog.i18nc("@label", "This setting is normally calculated, but it currently has an absolute value set.\n\nClick to restore the calculated value.")) onExited: { if(controlContainer.item && controlContainer.item.hovered) { @@ -165,4 +165,6 @@ Item { width: UM.Theme.getSize("setting_control").width; height: UM.Theme.getSize("setting_control").height } + + UM.I18nCatalog { id: catalog; name: "cura" } } From 3514d4839d287bd4876c4f4b99b3aec8e289c9de Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 17:15:04 +0200 Subject: [PATCH 168/424] Fix combo box setting item so it displays the right things --- resources/qml/Settings/SettingComboBox.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index 6fd4c5621c..0f332b2aee 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -11,12 +11,12 @@ SettingItem { id: base - ComboBox + contents: ComboBox { -// signal valueChanged(string value); -// id: base model: definition.options - textRole: "name"; + textRole: "value"; + + anchors.fill: parent MouseArea { From ac9b391e7fd1c6d868dc4fa0ddb7478fe00e3974 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 11 May 2016 17:20:09 +0200 Subject: [PATCH 169/424] Fixed available printers in dropdown menu CURA-1278 --- resources/qml/Cura.qml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index e39cd733d9..753f856163 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -7,7 +7,8 @@ import QtQuick.Controls.Styles 1.1 import QtQuick.Layouts 1.1 import QtQuick.Dialogs 1.1 -import UM 1.1 as UM +import UM 1.2 as UM +import Cura 1.0 as Cura UM.MainWindow { @@ -168,14 +169,17 @@ UM.MainWindow Instantiator { -// model: UM.MachineInstancesModel { } + model: UM.ContainerStacksModel + { + filter: {"type": "machine"} + } MenuItem { text: model.name; checkable: true; - checked: model.active; - exclusiveGroup: machineMenuGroup; - onTriggered: UM.MachineManager.setActiveMachineInstance(model.name) + checked: Cura.MachineManager.activeMachineId == model.id + exclusiveGroup: machineSelectionMenuGroup; + onTriggered: Cura.MachineManager.setActiveMachine(model.id); } onObjectAdded: machineMenu.insertItem(index, object) onObjectRemoved: machineMenu.removeItem(object) From 5a7486a32e4463aa22831f8139d4228701f38ccf Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 11 May 2016 17:27:14 +0200 Subject: [PATCH 170/424] Add conversion of First Layer Airgap from legacy First Layer Airgap's internal name is raft_airgap (yeah don't ask). Contributes to issue CURA-1549. --- plugins/LegacyProfileReader/DictionaryOfDoom.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/LegacyProfileReader/DictionaryOfDoom.json b/plugins/LegacyProfileReader/DictionaryOfDoom.json index e30460f103..1fe7d7b7a5 100644 --- a/plugins/LegacyProfileReader/DictionaryOfDoom.json +++ b/plugins/LegacyProfileReader/DictionaryOfDoom.json @@ -50,7 +50,8 @@ "skirt_minimal_length": "skirt_minimal_length", "brim_line_count": "brim_line_count", "raft_margin": "raft_margin", - "raft_airgap": "raft_airgap_all", + "raft_airgap": "raft_airgap_all - raft_airgap", + "layer_0_z_overlap": "raft_airgap", "raft_surface_layers": "raft_surface_layers", "raft_surface_thickness": "raft_surface_thickness", "raft_surface_line_width": "raft_surface_linewidth", From 9f2e87fdcb357394fde5072cc620f35a96bab61c Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 11 May 2016 17:44:58 +0200 Subject: [PATCH 171/424] Force updating the convex hull of a group node if one of its children is removed Before this fix, if a subselection of a group was deleted from the group, the convex hull would not update. CURA-1054 --- cura/ConvexHullDecorator.py | 43 +++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index b53737cc80..381b5b2b69 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -8,11 +8,11 @@ class ConvexHullDecorator(SceneNodeDecorator): def __init__(self): super().__init__() self._convex_hull = None - + # In case of printing all at once this is the same as the convex hull. # For one at the time this is the area without the head. self._convex_hull_boundary = None - + # In case of printing all at once this is the same as the convex hull. # For one at the time this is area with intersection of mirrored head self._convex_hull_head = None @@ -20,15 +20,23 @@ class ConvexHullDecorator(SceneNodeDecorator): # In case of printing all at once this is the same as the convex hull. # For one at the time this is area with intersection of full head self._convex_hull_head_full = None - + self._convex_hull_node = None self._convex_hull_job = None + # Keep track of the previous parent so we can clear its convex hull when the object is reparented + self._parent_node = None + self._profile = None Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineInstanceChanged) self._onActiveProfileChanged() + def setNode(self, node): + super().setNode(node) + self._parent_node = node.getParent() + node.parentChanged.connect(self._onParentChanged) + ## Force that a new (empty) object is created upon copy. def __deepcopy__(self, memo): copy = ConvexHullDecorator() @@ -59,7 +67,7 @@ class ConvexHullDecorator(SceneNodeDecorator): if not self._convex_hull_boundary: return self.getConvexHull() return self._convex_hull_boundary - + def setConvexHullBoundary(self, hull): self._convex_hull_boundary = hull @@ -68,22 +76,25 @@ class ConvexHullDecorator(SceneNodeDecorator): def setConvexHullHead(self, hull): self._convex_hull_head = hull - + def setConvexHull(self, hull): self._convex_hull = hull - + if not hull and self._convex_hull_node: + self._convex_hull_node.setParent(None) + self._convex_hull_node = None + def getConvexHullJob(self): return self._convex_hull_job - + def setConvexHullJob(self, job): self._convex_hull_job = job - + def getConvexHullNode(self): return self._convex_hull_node - + def setConvexHullNode(self, node): self._convex_hull_node = node - + def _onActiveProfileChanged(self): if self._profile: self._profile.settingValueChanged.disconnect(self._onSettingValueChanged) @@ -97,15 +108,15 @@ class ConvexHullDecorator(SceneNodeDecorator): if self._convex_hull_job: self._convex_hull_job.cancel() self.setConvexHull(None) - if self._convex_hull_node: - self._convex_hull_node.setParent(None) - self._convex_hull_node = None def _onSettingValueChanged(self, setting): if setting == "print_sequence": if self._convex_hull_job: self._convex_hull_job.cancel() self.setConvexHull(None) - if self._convex_hull_node: - self._convex_hull_node.setParent(None) - self._convex_hull_node = None + + def _onParentChanged(self, node): + # Force updating the convex hull of the parent group if the object is in a group + if self._parent_node and self._parent_node.callDecoration("isGroup"): + self._parent_node.callDecoration("setConvexHull", None) + self._parent_node = self.getNode().getParent() From 7c154c78bf8eb1c43aa7837ac8cd3e5b84ab6547 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 11 May 2016 17:58:10 +0200 Subject: [PATCH 172/424] Add keyboard shortcuts for grouping/ungrouping Contributes (in a way) to CURA-1054, \sa CURA-1531 --- resources/qml/Actions.qml | 5 ++++- resources/qml/Cura.qml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 003a3ceeec..33754c71ab 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -176,6 +176,7 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit","&Group Objects"); enabled: UM.Scene.numObjectsSelected > 1 ? true: false iconName: "object-group" + shortcut: "Ctrl+G"; } Action @@ -184,14 +185,16 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit","Ungroup Objects"); enabled: UM.Scene.isGroupSelected iconName: "object-ungroup" + shortcut: "Ctrl+Shift+G"; } - + Action { id: mergeObjectsAction text: catalog.i18nc("@action:inmenu menubar:edit","&Merge Objects"); enabled: UM.Scene.numObjectsSelected > 1 ? true: false iconName: "merge"; + shortcut: "Ctrl+Alt+G"; } Action diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 1759eabfc6..ccaeb63c4e 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -680,6 +680,7 @@ UM.MainWindow MenuItem { action: actions.reloadAll; } MenuItem { action: actions.resetAllTranslation; } MenuItem { action: actions.resetAll; } + MenuSeparator { } MenuItem { action: actions.groupObjects; } MenuItem { action: actions.mergeObjects; } MenuItem { action: actions.unGroupObjects; } @@ -692,6 +693,7 @@ UM.MainWindow MenuItem { action: actions.reloadAll; } MenuItem { action: actions.resetAllTranslation; } MenuItem { action: actions.resetAll; } + MenuSeparator { } MenuItem { action: actions.groupObjects; } MenuItem { action: actions.mergeObjects; } MenuItem { action: actions.unGroupObjects; } From c79d064107008c1b79e83981001bbe94733f6130 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 11 May 2016 18:26:18 +0200 Subject: [PATCH 173/424] Convert raft_airgap settings to float before computing Can't subtract strings from each other, after all. Contributes to issue CURA-1549. --- plugins/LegacyProfileReader/DictionaryOfDoom.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/LegacyProfileReader/DictionaryOfDoom.json b/plugins/LegacyProfileReader/DictionaryOfDoom.json index 1fe7d7b7a5..8c4b49074b 100644 --- a/plugins/LegacyProfileReader/DictionaryOfDoom.json +++ b/plugins/LegacyProfileReader/DictionaryOfDoom.json @@ -50,7 +50,7 @@ "skirt_minimal_length": "skirt_minimal_length", "brim_line_count": "brim_line_count", "raft_margin": "raft_margin", - "raft_airgap": "raft_airgap_all - raft_airgap", + "raft_airgap": "float(raft_airgap_all) - float(raft_airgap)", "layer_0_z_overlap": "raft_airgap", "raft_surface_layers": "raft_surface_layers", "raft_surface_thickness": "raft_surface_thickness", From 76f78295c4ecbfc278e3a367ab202dfa348cd744 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 12 May 2016 10:28:18 +0200 Subject: [PATCH 174/424] Translation correction suggested by BagelOrb BagelOrb indicated the translation wrongly at first. This is apparently correct. Contributes to issue CURA-1549. --- plugins/LegacyProfileReader/DictionaryOfDoom.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/LegacyProfileReader/DictionaryOfDoom.json b/plugins/LegacyProfileReader/DictionaryOfDoom.json index 8c4b49074b..9dd0c04a05 100644 --- a/plugins/LegacyProfileReader/DictionaryOfDoom.json +++ b/plugins/LegacyProfileReader/DictionaryOfDoom.json @@ -50,7 +50,7 @@ "skirt_minimal_length": "skirt_minimal_length", "brim_line_count": "brim_line_count", "raft_margin": "raft_margin", - "raft_airgap": "float(raft_airgap_all) - float(raft_airgap)", + "raft_airgap": "float(raft_airgap_all) + float(raft_airgap)", "layer_0_z_overlap": "raft_airgap", "raft_surface_layers": "raft_surface_layers", "raft_surface_thickness": "raft_surface_thickness", From 5716069fe47e7a39fae12081d62a88ce54a23732 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 12 May 2016 11:01:46 +0200 Subject: [PATCH 175/424] JSON fix: First Layer Z OVerlap ==> Inital Layer ... (CURA-1549) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 9bb53c89a2..44a1ef5291 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1493,7 +1493,7 @@ "visible": true }, "layer_0_z_overlap": { - "label": "First Layer Z Overlap", + "label": "Initial Layer Z Overlap", "description": "Make the first and second layer of the object overlap in the Z direction to compensate for the filament lost in the airgap. All models above the first model layer will be shifted down by this amount.", "unit": "mm", "type": "float", From 9b1867cdaf2e0a2bf49b818968291c8f41a28977 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 12 May 2016 11:23:05 +0200 Subject: [PATCH 176/424] Hide output device selection when there is only one option CURA-1539 --- resources/qml/SaveButton.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index acdb43d67b..64bdcdf540 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -80,8 +80,8 @@ Rectangle { height: UM.Theme.getSize("save_button_save_to_button").height anchors.top: parent.top - anchors.right: deviceSelectionMenu.left; - anchors.rightMargin: -3 * UM.Theme.getSize("default_lining").width; + anchors.right: deviceSelectionMenu.visible ? deviceSelectionMenu.left : parent.right + anchors.rightMargin: deviceSelectionMenu.visible ? -3 * UM.Theme.getSize("default_lining").width : UM.Theme.getSize("default_margin").width text: UM.OutputDeviceManager.activeDeviceShortDescription onClicked: @@ -128,8 +128,8 @@ Rectangle { width: UM.Theme.getSize("save_button_save_to_button").height height: UM.Theme.getSize("save_button_save_to_button").height enabled: base.backendState == 2 && base.activity == true + visible: devicesModel.deviceCount > 1 - //iconSource: UM.Theme.icons[UM.OutputDeviceManager.activeDeviceIconName]; style: ButtonStyle { background: Rectangle { From d8e4aa90788c5ada739b17d8f06d7da392b7e162 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 12 May 2016 11:24:09 +0200 Subject: [PATCH 177/424] Moved machinePage to Cura CURA-1278 --- cura/MachineManagerModel.py | 5 +++ resources/qml/Cura.qml | 2 + resources/qml/MachinesPage.qml | 68 ++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 resources/qml/MachinesPage.qml diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index c5f2fc3fa6..ec346710af 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -27,6 +27,11 @@ class MachineManagerModel(QObject): def activeMachineId(self): return Application.getInstance().getGlobalContainerStack().getId() + @pyqtSlot(str, str) + def renameMachine(self, machine_id, new_name): + containers = ContainerRegistry.getInstance().findContainerStacks(id = machine_id) + if containers: + containers[0].setName(new_name) def createMachineManagerModel(engine, script_engine): diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 134d06c9d7..4314dc21e6 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -542,6 +542,8 @@ UM.MainWindow //: View preferences page title insertPage(1, catalog.i18nc("@title:tab","View"), Qt.resolvedUrl("ViewPage.qml")); + insertPage(2, catalog.i18nc("@title:tab", "Printers"), Qt.resolvedUrl("MachinesPage.qml")); + //Force refresh setPage(0); } diff --git a/resources/qml/MachinesPage.qml b/resources/qml/MachinesPage.qml new file mode 100644 index 0000000000..58a0878019 --- /dev/null +++ b/resources/qml/MachinesPage.qml @@ -0,0 +1,68 @@ +// Copyright (c) 2016 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 1.1 + +import UM 1.2 as UM +import Cura 1.0 as Cura + +UM.ManagementPage +{ + id: base; + + title: catalog.i18nc("@title:tab", "Printers"); + property int numInstances: model.rowCount(); + model: UM.ContainerStacksModel + { + filter: {"type": "machine"} + onDataChanged: numInstances = model.rowCount() + } + + onAddObject: model.requestAddMachine(); + onRemoveObject: confirmDialog.open(); + onRenameObject: renameDialog.open(); + + removeEnabled: numInstances > 1 + renameEnabled: numInstances > 0 + + Flow + { + anchors.fill: parent; + spacing: UM.Theme.getSize("default_margin").height; + + Label + { + text: base.currentItem && base.currentItem.name ? base.currentItem.name : "" + font: UM.Theme.getFont("large") + width: parent.width + elide: Text.ElideRight + } + + Label { text: catalog.i18nc("@label", "Type"); width: parent.width * 0.2; } + Label { text: base.currentItem && base.currentItem.typeName ? base.currentItem.typeName : ""; width: parent.width * 0.7; } + + UM.I18nCatalog { id: catalog; name: "uranium"; } + + UM.ConfirmRemoveDialog + { + id: confirmDialog; + object: base.currentItem && base.currentItem.name ? base.currentItem.name : ""; + onYes: base.model.removeMachineInstance(base.currentItem.name); + } + + UM.RenameDialog + { + id: renameDialog; + object: base.currentItem && base.currentItem.name ? base.currentItem.name : ""; + onAccepted: + { + Cura.MachineManager.renameMachine(base.currentItem.id, newName.trim()); + //Reselect current item to update details panel + var index = objectList.currentIndex + objectList.currentIndex = -1 + objectList.currentIndex = index + } + } + } +} From 78e9545ecea2cbf837402e69221d8a16110fd244 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 12 May 2016 11:46:28 +0200 Subject: [PATCH 178/424] Machines can now be removed CURA-1278 --- cura/MachineManagerModel.py | 5 +++++ resources/qml/MachinesPage.qml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index ec346710af..2df28c1f92 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -33,6 +33,11 @@ class MachineManagerModel(QObject): if containers: containers[0].setName(new_name) + @pyqtSlot(str) + def removeMachine(self, machine_id): + ContainerRegistry.getInstance().removeContainer(machine_id) + + def createMachineManagerModel(engine, script_engine): return MachineManagerModel() \ No newline at end of file diff --git a/resources/qml/MachinesPage.qml b/resources/qml/MachinesPage.qml index 58a0878019..88cfbc740e 100644 --- a/resources/qml/MachinesPage.qml +++ b/resources/qml/MachinesPage.qml @@ -48,7 +48,7 @@ UM.ManagementPage { id: confirmDialog; object: base.currentItem && base.currentItem.name ? base.currentItem.name : ""; - onYes: base.model.removeMachineInstance(base.currentItem.name); + onYes: Cura.MachineManager.removeMachine(base.currentItem.id); } UM.RenameDialog From 65022c3d1806d5a78b31b0580142c42b33038a5d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 12 May 2016 11:53:01 +0200 Subject: [PATCH 179/424] Fixed adding machine in printer dialog CURA-1278 --- resources/qml/MachinesPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/MachinesPage.qml b/resources/qml/MachinesPage.qml index 88cfbc740e..14425acc05 100644 --- a/resources/qml/MachinesPage.qml +++ b/resources/qml/MachinesPage.qml @@ -19,7 +19,7 @@ UM.ManagementPage onDataChanged: numInstances = model.rowCount() } - onAddObject: model.requestAddMachine(); + onAddObject: Printer.requestAddPrinter() onRemoveObject: confirmDialog.open(); onRenameObject: renameDialog.open(); From a16acddff1da61fe2bd7759cb3ce9e0ab36c6d61 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 12 May 2016 11:59:23 +0200 Subject: [PATCH 180/424] Removed unused code CURA-1278 --- cura/CuraApplication.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 17450029a3..8c6681de8c 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -638,6 +638,3 @@ class CuraApplication(QtApplication): job = ReadMeshJob(os.path.abspath(file)) job.finished.connect(self._onFileLoaded) job.start() - - def _onAddMachineRequested(self): - self.requestAddPrinter.emit() From 34b257d0f4b447cccd69fc00b786f1db96b9f327 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 12 May 2016 13:41:39 +0200 Subject: [PATCH 181/424] Add translations for Initial Layer Z Overlap setting English is a copy of the original. Dutch, French, Spanish and German translations were made by a native speaker. Italian by a non-native speaker. Finnish is machine-translated. Contributes to issue CURA-1549. --- resources/i18n/de/fdmprinter.json.po | 13 +++++++++++++ resources/i18n/en/fdmprinter.json.po | 13 +++++++++++++ resources/i18n/es/fdmprinter.json.po | 13 +++++++++++++ resources/i18n/fdmprinter.json.pot | 13 +++++++++++++ resources/i18n/fi/fdmprinter.json.po | 13 +++++++++++++ resources/i18n/fr/fdmprinter.json.po | 13 +++++++++++++ resources/i18n/it/fdmprinter.json.po | 15 +++++++++++++++ resources/i18n/nl/fdmprinter.json.po | 13 +++++++++++++ 8 files changed, 106 insertions(+) diff --git a/resources/i18n/de/fdmprinter.json.po b/resources/i18n/de/fdmprinter.json.po index 9ba0fdca1f..e9a04a21ff 100644 --- a/resources/i18n/de/fdmprinter.json.po +++ b/resources/i18n/de/fdmprinter.json.po @@ -2414,3 +2414,16 @@ msgid "" "which in turn results in less upward connections with the next layer. Only " "applies to Wire Printing." msgstr "Der Abstand zwischen der Düse und den horizontalen Abwärtslinien. Bei einem größeren Abstand haben die diagonalen Abwärtslinien einen weniger spitzen Winkel, was wiederum weniger Aufwärtsverbindungen zur nächsten Schicht zur Folge hat. Dies gilt nur für das Drucken mit Drahtstruktur." + +#: fdmprinter.json +msgctxt "layer_0_z_overlap label" +msgid "Initial Layer Z Overlap" +msgstr "Z Überlappung der ersten Schicht" + +#: fdmprinter.json +msgctxt "layer_0_z_overlap description" +msgid "" +"Make the first and second layer of the object overlap in the Z direction to " +"compensate for the filament lost in the airgap. All model pieces above the first " +"model layer will be shifted down by this amount." +msgstr "Die erste und die zweite Schicht des Objekts überlappen sich in der Z-Richtung, um das verlorene Filament in dem Luftspalt zu kompensieren. Alle Schichten über der ersten Schicht, verschieben sich in der Z-Richtung mit gewähltem Abstand nach unten." diff --git a/resources/i18n/en/fdmprinter.json.po b/resources/i18n/en/fdmprinter.json.po index 9ee03631bb..4578306bfb 100644 --- a/resources/i18n/en/fdmprinter.json.po +++ b/resources/i18n/en/fdmprinter.json.po @@ -2483,3 +2483,16 @@ msgid "" "which in turn results in less upward connections with the next layer. Only " "applies to Wire Printing." msgstr "Distance between the nozzle and horizontally downward lines. Larger clearance results in diagonally downward lines with a less steep angle, which in turn results in fewer upward connections with the next layer. Only applies to Wire Printing." + +#: fdmprinter.json +msgctxt "layer_0_z_overlap label" +msgid "Initial Layer Z Overlap" +msgstr "Initial Layer Z Overlap" + +#: fdmprinter.json +msgctxt "layer_0_z_overlap description" +msgid "" +"Make the first and second layer of the object overlap in the Z direction to " +"compensate for the filament lost in the airgap. All models above the first " +"model layer will be shifted down by this amount." +msgstr "Make the first and second layer of the object overlap in the Z direction to compensate for the filament lost in the airgap. All models above the first model layer will be shifted down by this amount." diff --git a/resources/i18n/es/fdmprinter.json.po b/resources/i18n/es/fdmprinter.json.po index a3e79fa69a..2c1f044147 100644 --- a/resources/i18n/es/fdmprinter.json.po +++ b/resources/i18n/es/fdmprinter.json.po @@ -2414,3 +2414,16 @@ msgid "" "which in turn results in less upward connections with the next layer. Only " "applies to Wire Printing." msgstr "Distancia entre la tobera y líneas descendentes en horizontal. Cuanto mayor sea la holgura, menos pronunciado será el ángulo de las líneas descendentes en diagonal, lo que a su vez se traduce en menos conexiones ascendentes con la siguiente capa. Solo se aplica a la impresión de alambre." + +#: fdmprinter.json +msgctxt "layer_0_z_overlap label" +msgid "Initial Layer Z Overlap" +msgstr "Superposición de las capas iniciales en Z" + +#: fdmprinter.json +msgctxt "layer_0_z_overlap description" +msgid "" +"Make the first and second layer of the object overlap in the Z direction to " +"compensate for the filament lost in the airgap. All models above the first " +"model layer will be shifted down by this amount." +msgstr "La superposición entre la primera y segunda capa del objeto para compensar la pérdida de material en el hueco de aire. Todas las capas por encima de la primera capa se desplazan hacia abajo por esta cantidad." diff --git a/resources/i18n/fdmprinter.json.pot b/resources/i18n/fdmprinter.json.pot index b7c6f07b46..b8870ef252 100644 --- a/resources/i18n/fdmprinter.json.pot +++ b/resources/i18n/fdmprinter.json.pot @@ -2414,3 +2414,16 @@ msgid "" "which in turn results in less upward connections with the next layer. Only " "applies to Wire Printing." msgstr "" + +#: fdmprinter.json +msgctxt "layer_0_z_overlap label" +msgid "Initial Layer Z Overlap" +msgstr "" + +#: fdmprinter.json +msgctxt "layer_0_z_overlap description" +msgid "" +"Make the first and second layer of the object overlap in the Z direction to " +"compensate for the filament lost in the airgap. All models above the first " +"model layer will be shifted down by this amount." +msgstr "" diff --git a/resources/i18n/fi/fdmprinter.json.po b/resources/i18n/fi/fdmprinter.json.po index ad12060cea..cc402b0e54 100644 --- a/resources/i18n/fi/fdmprinter.json.po +++ b/resources/i18n/fi/fdmprinter.json.po @@ -2414,3 +2414,16 @@ msgid "" "which in turn results in less upward connections with the next layer. Only " "applies to Wire Printing." msgstr "Suuttimen ja vaakasuoraan laskevien linjojen välinen etäisyys. Suurempi väli aiheuttaa vähemmän jyrkän kulman diagonaalisesti laskeviin linjoihin, mikä puolestaan johtaa harvempiin yläliitoksiin seuraavan kerroksen kanssa. Koskee vain rautalankamallin tulostusta." + +#: fdmprinter.json +msgctxt "layer_0_z_overlap label" +msgid "Initial Layer Z Overlap" +msgstr "Z Päällekkäisyys Alkukerroksen" + +#: fdmprinter.json +msgctxt "layer_0_z_overlap description" +msgid "" +"Make the first and second layer of the object overlap in the Z direction to " +"compensate for the filament lost in the airgap. All models above the first " +"model layer will be shifted down by this amount." +msgstr "Tee ensimmäinen ja toinen kerros esineen päällekkäisyys Z-suunnassa kompensoimiseksi filamentti hävisi ilmaväli. Kaikki mallit yläpuolella ensimmäinen malli kerros on siirtynyt alaspäin tämän määrän." diff --git a/resources/i18n/fr/fdmprinter.json.po b/resources/i18n/fr/fdmprinter.json.po index 7a49440b04..f8e10fa5f4 100644 --- a/resources/i18n/fr/fdmprinter.json.po +++ b/resources/i18n/fr/fdmprinter.json.po @@ -2414,3 +2414,16 @@ msgid "" "which in turn results in less upward connections with the next layer. Only " "applies to Wire Printing." msgstr "Distance entre la buse et les lignes descendantes horizontalement. Un espacement plus important génère des lignes diagonalement descendantes avec un angle moins abrupt, qui génère alors des connexions moins ascendantes avec la couche suivante. Uniquement applicable à l'impression filaire." + +#: fdmprinter.json +msgctxt "layer_0_z_overlap label" +msgid "Initial Layer Z Overlap" +msgstr "" + +#: fdmprinter.json +msgctxt "layer_0_z_overlap description" +msgid "" +"Make the first and second layer of the object overlap in the Z direction to " +"compensate for the filament lost in the airgap. All models above the first " +"model layer will be shifted down by this amount." +msgstr "La première et la deuxième couche de l'objet se chevauchent dans la direction Z pour compenser le filament perdu dans l'entrefer. Toutes les chouches au-dessus de la première couce du modèle seront décalées de ce montant." diff --git a/resources/i18n/it/fdmprinter.json.po b/resources/i18n/it/fdmprinter.json.po index b0e04c4308..40b5e36916 100644 --- a/resources/i18n/it/fdmprinter.json.po +++ b/resources/i18n/it/fdmprinter.json.po @@ -2414,3 +2414,18 @@ msgid "" "which in turn results in less upward connections with the next layer. Only " "applies to Wire Printing." msgstr "Indica la distanza tra l'ugello e le linee diagonali verso il basso. Un maggior gioco risulta in linee diagonali verso il basso con un minor angolo di inclinazione, cosa che a sua volta si traduce in meno collegamenti verso l'alto con lo strato successivo. Applicabile solo alla funzione Wire Printing." + +#: fdmprinter.json +#, fuzzy +msgctxt "layer_0_z_overlap label" +msgid "Initial Layer Z Overlap" +msgstr "Z Sovrapposizione Primo Strato" + +#: fdmprinter.json +#, fuzzy +msgctxt "layer_0_z_overlap description" +msgid "" +"Make the first and second layer of the object overlap in the Z direction to " +"compensate for the filament lost in the airgap. All models above the first " +"model layer will be shifted down by this amount." +msgstr "Effettuare il primo e secondo strato di sovrapposizione oggetto nella direzione Z per compensare il filamento perso nel traferro. Tutti i modelli sopra il primo strato del modello saranno spostate verso il basso di questa quantità." diff --git a/resources/i18n/nl/fdmprinter.json.po b/resources/i18n/nl/fdmprinter.json.po index ff8f896a74..2c6e8a1df8 100644 --- a/resources/i18n/nl/fdmprinter.json.po +++ b/resources/i18n/nl/fdmprinter.json.po @@ -2414,3 +2414,16 @@ msgid "" "which in turn results in less upward connections with the next layer. Only " "applies to Wire Printing." msgstr "De afstand tussen de nozzle en horizontaal neergaande lijnen. Een grotere tussenruimte zorgt voor diagonaal neerwaarts gaande lijnen met een minder steile hoek. Hierdoor ontstaan minder opwaartse verbindingen met de volgende laag. Alleen van toepassing op Draadprinten." + +#: fdmprinter.json +msgctxt "layer_0_z_overlap label" +msgid "Initial Layer Z Overlap" +msgstr "Z Overlap Eerste Laag" + +#: fdmprinter.json +msgctxt "layer_0_z_overlap description" +msgid "" +"Make the first and second layer of the object overlap in the Z direction to " +"compensate for the filament lost in the airgap. All models above the first " +"model layer will be shifted down by this amount." +msgstr "Laat de eerste en tweede laag overlappen in de Z-richting om te compenseren voor verloren materiaal in de luchtlaag. Alle stukjes model boven de eerste laag worden met deze hoveelheid naar beneden verschoven." From 021bb97fc4b11cb4d85eafb727fa3955e42301f2 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 12 May 2016 14:03:03 +0200 Subject: [PATCH 182/424] Add a preference for automatic update checking CURA-1540 --- resources/qml/GeneralPage.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index b2ff44b15a..9138fffc45 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -30,8 +30,10 @@ UM.PreferencesPage UM.Preferences.resetPreference("general/language") UM.Preferences.resetPreference("physics/automatic_push_free") UM.Preferences.resetPreference("mesh/scale_to_fit") + UM.Preferences.resetPreference("info/automatic_update_check") UM.Preferences.resetPreference("info/send_slice_info") pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) + checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) var defaultLanguage = UM.Preferences.getValue("general/language") @@ -150,6 +152,20 @@ UM.PreferencesPage } } + UM.TooltipArea { + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") + + CheckBox + { + id: checkUpdatesCheckbox + text: catalog.i18nc("@option:check","Check for updates on start") + checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check")) + onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked) + } + } + UM.TooltipArea { width: childrenRect.width height: childrenRect.height From 44f5559db3a54bdbf9d7e9bd01e8a5dacd7e3674 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 12 May 2016 15:18:13 +0200 Subject: [PATCH 183/424] Moved addMachine to machineManager CURA-1278 --- cura/MachineManagerModel.py | 12 ++++++++++++ resources/qml/AddMachineDialog.qml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 2df28c1f92..da14864118 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -2,6 +2,7 @@ from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal from UM.Application import Application from UM.Settings.ContainerRegistry import ContainerRegistry +from UM.Settings.ContainerStack import ContainerStack class MachineManagerModel(QObject): def __init__(self, parent = None): @@ -19,6 +20,17 @@ class MachineManagerModel(QObject): if containers: Application.getInstance().setGlobalContainerStack(containers[0]) + @pyqtSlot(str, str) + def addMachine(self,name, definition_id): + definitions = ContainerRegistry.getInstance().findDefinitionContainers(id=definition_id) + if definitions: + new_global_stack = ContainerStack(name) + new_global_stack.addMetaDataEntry("type", "machine") + ContainerRegistry.getInstance().addContainer(new_global_stack) + # If a definition is found, its a list. Should only have one item. + new_global_stack.addContainer(definitions[0]) + Application.getInstance().setGlobalContainerStack(new_global_stack) + @pyqtProperty(str, notify = globalContainerChanged) def activeMachineName(self): return Application.getInstance().getGlobalContainerStack().getName() diff --git a/resources/qml/AddMachineDialog.qml b/resources/qml/AddMachineDialog.qml index 476df2178c..4a5e14f183 100644 --- a/resources/qml/AddMachineDialog.qml +++ b/resources/qml/AddMachineDialog.qml @@ -161,7 +161,7 @@ UM.Dialog { base.visible = false var item = machineList.model.getItem(machineList.currentIndex); - machineList.model.setNewGlobalStackFromDefinition(machineName.text, item.id) + Cura.MachineManager.addMachine(machineName.text, item.id) } } From 0de4f466dc1e76420461c3a7afbad21e260d9d11 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 12 May 2016 15:38:59 +0200 Subject: [PATCH 184/424] Codestyle & Documentation --- cura/CuraApplication.py | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f381faa482..eced8ce42f 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -295,7 +295,9 @@ class CuraApplication(QtApplication): @pyqtSlot(str) def setJobName(self, name): - name = os.path.splitext(name)[0] #when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its extension. This cuts the extension off if nescessary. + # when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its + # extension. This cuts the extension off if necessary. + name = os.path.splitext(name)[0] if self._job_name != name: self._job_name = name self.jobNameChanged.emit() @@ -330,7 +332,7 @@ class CuraApplication(QtApplication): node = self.getController().getScene().findObject(object_id) - if not node and object_id != 0: #Workaround for tool handles overlapping the selected object + if not node and object_id != 0: # Workaround for tool handles overlapping the selected object node = Selection.getSelectedObject(0) if node: @@ -349,7 +351,7 @@ class CuraApplication(QtApplication): def multiplyObject(self, object_id, count): node = self.getController().getScene().findObject(object_id) - if not node and object_id != 0: #Workaround for tool handles overlapping the selected object + if not node and object_id != 0: # Workaround for tool handles overlapping the selected object node = Selection.getSelectedObject(0) if node: @@ -371,7 +373,7 @@ class CuraApplication(QtApplication): @pyqtSlot("quint64") def centerObject(self, object_id): node = self.getController().getScene().findObject(object_id) - if not node and object_id != 0: #Workaround for tool handles overlapping the selected object + if not node and object_id != 0: # Workaround for tool handles overlapping the selected object node = Selection.getSelectedObject(0) if not node: @@ -384,7 +386,7 @@ class CuraApplication(QtApplication): op = SetTransformOperation(node, Vector()) op.push() - ## Delete all mesh data on the scene. + ## Delete all nodes containing mesh data in the scene. @pyqtSlot() def deleteAll(self): if not self.getController().getToolsEnabled(): @@ -395,9 +397,9 @@ class CuraApplication(QtApplication): if type(node) is not SceneNode: continue if not node.getMeshData() and not node.callDecoration("isGroup"): - continue #Node that doesnt have a mesh and is not a group. + continue # Node that doesnt have a mesh and is not a group. if node.getParent() and node.getParent().callDecoration("isGroup"): - continue #Grouped nodes don't need resetting as their parent (the group) is resetted) + continue # Grouped nodes don't need resetting as their parent (the group) is resetted) nodes.append(node) if nodes: op = GroupedOperation() @@ -415,9 +417,9 @@ class CuraApplication(QtApplication): if type(node) is not SceneNode: continue if not node.getMeshData() and not node.callDecoration("isGroup"): - continue #Node that doesnt have a mesh and is not a group. + continue # Node that doesnt have a mesh and is not a group. if node.getParent() and node.getParent().callDecoration("isGroup"): - continue #Grouped nodes don't need resetting as their parent (the group) is resetted) + continue # Grouped nodes don't need resetting as their parent (the group) is resetted) nodes.append(node) @@ -437,9 +439,9 @@ class CuraApplication(QtApplication): if type(node) is not SceneNode: continue if not node.getMeshData() and not node.callDecoration("isGroup"): - continue #Node that doesnt have a mesh and is not a group. + continue # Node that doesnt have a mesh and is not a group. if node.getParent() and node.getParent().callDecoration("isGroup"): - continue #Grouped nodes don't need resetting as their parent (the group) is resetted) + continue # Grouped nodes don't need resetting as their parent (the group) is resetted) nodes.append(node) if nodes: @@ -478,7 +480,7 @@ class CuraApplication(QtApplication): ## Get logging data of the backend engine # \returns \type{string} Logging data - @pyqtSlot(result=str) + @pyqtSlot(result = str) def getEngineLog(self): log = "" @@ -513,7 +515,6 @@ class CuraApplication(QtApplication): if not self.getMachineManager().getWorkingProfile(): return None return self.getMachineManager().getWorkingProfile().getSettingValue(key) - #return self.getActiveMachine().getSettingValueByKey(key) ## Change setting by key value pair @pyqtSlot(str, "QVariant") @@ -561,20 +562,20 @@ class CuraApplication(QtApplication): op.addOperation(SetParentOperation(node, group_node)) op.push() - # Deselect individual nodes and select the groupnode instead + # Deselect individual nodes and select the group-node instead for node in group_node.getChildren(): Selection.remove(node) Selection.add(group_node) @pyqtSlot() def ungroupSelected(self): - selected_objects = Selection.getAllSelectedObjects()[:] #clone the list + selected_objects = Selection.getAllSelectedObjects()[:] # clone the list for node in selected_objects: if node.callDecoration("isGroup"): op = GroupedOperation() group_parent = node.getParent() - children = node.getChildren()[:] #clone the list + children = node.getChildren()[:] # clone the list for child in children: # Set the parent of the children to the parent of the group-node op.addOperation(SetParentOperation(child, group_parent)) @@ -584,7 +585,8 @@ class CuraApplication(QtApplication): child.callDecoration("setConvexHull", None) op.push() - # Note: The group removes itself from the scene once all its children have left it, see GroupDecorator._onChildrenChanged + # Note: The group removes itself from the scene once all its children have left it, + # see GroupDecorator._onChildrenChanged def _createSplashScreen(self): return CuraSplashScreen.CuraSplashScreen() @@ -601,7 +603,7 @@ class CuraApplication(QtApplication): op = AddSceneNodeOperation(node, self.getController().getScene().getRoot()) op.push() - self.getController().getScene().sceneChanged.emit(node) #Force scene change. + self.getController().getScene().sceneChanged.emit(node) #F orce scene change. def _onJobFinished(self, job): if type(job) is not ReadMeshJob or not job.getResult(): @@ -625,9 +627,6 @@ class CuraApplication(QtApplication): def _reloadMeshFinished(self, job): # TODO; This needs to be fixed properly. We now make the assumption that we only load a single mesh! job._node.setMeshData(job.getResult().getMeshData()) - #job.getResult().setParent(self.getController().getScene().getRoot()) - #job._node.setParent(self.getController().getScene().getRoot()) - #job._node.meshDataChanged.emit(job._node) def _openFile(self, file): job = ReadMeshJob(os.path.abspath(file)) From 5f0c96d4a56f1cdb1160ac1e1886737525485353 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Thu, 12 May 2016 16:54:34 +0200 Subject: [PATCH 185/424] Correctly filter the input to the convex hull function for duplicates. Contributes to CURA-1512 --- cura/ConvexHullJob.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index 2a943253fb..92fcc66ecd 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -45,10 +45,19 @@ class ConvexHullJob(Job): # This is done to greatly speed up further convex hull calculations as the convex hull # becomes much less complex when dealing with highly detailed models. vertex_data = numpy.round(vertex_data, 1) - duplicates = (vertex_data[:,0] == vertex_data[:,1]) | (vertex_data[:,1] == vertex_data[:,2]) | (vertex_data[:,0] == vertex_data[:,2]) - vertex_data = numpy.delete(vertex_data, numpy.where(duplicates), axis = 0) - hull = Polygon(vertex_data[:, [0, 2]]) + vertex_data = vertex_data[:, [0, 2]] # Drop the Y components to project to 2D. + + # Grab the set of unique points. + # + # This basically finds the unique rows in the array by treating them as opaque groups of bytes + # which are as long as the 2 float64s in each row, and giving this view to numpy.unique() to munch. + # See http://stackoverflow.com/questions/16970982/find-unique-rows-in-numpy-array + tmp = numpy.ascontiguousarray(vertex_data).view(numpy.dtype((numpy.void, vertex_data.dtype.itemsize * vertex_data.shape[1]))) + _, idx = numpy.unique(tmp, return_index=True) + vertex_data = vertex_data[idx] # Select the unique rows by index. + + hull = Polygon(vertex_data) # First, calculate the normal convex hull around the points hull = hull.getConvexHull() From 89c0644e4be66dcab9853321b17fb8710c0b64ec Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 12 May 2016 17:01:47 +0200 Subject: [PATCH 186/424] Added activeMaterial property CURA-1278 --- cura/MachineManagerModel.py | 22 ++++++++++++++++++++++ resources/qml/SidebarHeader.qml | 9 +++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index da14864118..aef7d37af9 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -3,13 +3,18 @@ from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal from UM.Application import Application from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.ContainerStack import ContainerStack +from UM.Settings.InstanceContainer import InstanceContainer class MachineManagerModel(QObject): def __init__(self, parent = None): super().__init__(parent) Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerChanged) + ## When the global container is changed, active material probably needs to be updated. + self.globalContainerChanged.connect(self.activeMaterialChanged) + globalContainerChanged = pyqtSignal() + activeMaterialChanged = pyqtSignal() def _onGlobalContainerChanged(self): self.globalContainerChanged.emit() @@ -27,8 +32,19 @@ class MachineManagerModel(QObject): new_global_stack = ContainerStack(name) new_global_stack.addMetaDataEntry("type", "machine") ContainerRegistry.getInstance().addContainer(new_global_stack) + + variant_instance_container = InstanceContainer(name + "_variant") + material_instance_container = InstanceContainer("test_material") + material_instance_container.addMetaDataEntry("type", "material") + material_instance_container.setDefinition(definitions[0]) + #material_instance_container.setMetaData({"type","material"}) + quality_instance_container = InstanceContainer(name + "_quality") + current_settings_instance_container = InstanceContainer(name + "_current_settings") + ContainerRegistry.getInstance().addContainer(material_instance_container) + # If a definition is found, its a list. Should only have one item. new_global_stack.addContainer(definitions[0]) + new_global_stack.addContainer(material_instance_container) Application.getInstance().setGlobalContainerStack(new_global_stack) @pyqtProperty(str, notify = globalContainerChanged) @@ -39,6 +55,12 @@ class MachineManagerModel(QObject): def activeMachineId(self): return Application.getInstance().getGlobalContainerStack().getId() + @pyqtProperty(str, notify = activeMaterialChanged) + def activeMaterialName(self): + material = Application.getInstance().getGlobalContainerStack().findContainer({"type":"material"}) + if material: + return material.getName() + @pyqtSlot(str, str) def renameMachine(self, machine_id, new_name): containers = ContainerRegistry.getInstance().findContainerStacks(id = machine_id) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 83188007cf..6b1c4166b7 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -172,8 +172,8 @@ Item ToolButton { id: materialSelection - text: UM.MachineManager.activeMaterial - tooltip: UM.MachineManager.activeMaterial + text: Cura.MachineManager.activeMaterialName + tooltip: Cura.MachineManager.activeMaterialName visible: UM.MachineManager.hasMaterials height: UM.Theme.getSize("setting_control").height @@ -187,6 +187,11 @@ Item Instantiator { id: materialSelectionInstantiator + model: UM.InstanceContainersModel + { + filter: {"type": "material"} + } + //model: UM.InstancesModel {filter: {"type":"material"}} // model: UM.MachineMaterialsModel { id: machineMaterialsModel } MenuItem { From f5e63f2e718762e083b7d9fe5efce7731d904c30 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 12 May 2016 17:38:43 +0200 Subject: [PATCH 187/424] Changing the material is now possible CURA-1278 --- cura/MachineManagerModel.py | 13 +++++++++++++ resources/qml/SidebarHeader.qml | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index aef7d37af9..49c2288a98 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -17,8 +17,14 @@ class MachineManagerModel(QObject): activeMaterialChanged = pyqtSignal() def _onGlobalContainerChanged(self): + Application.getInstance().getGlobalContainerStack().containersChanged.connect(self._onInstanceContainersChanged) self.globalContainerChanged.emit() + def _onInstanceContainersChanged(self, container): + container_type = container.getMetaDataEntry("type") + if container_type == "material": + self.activeMaterialChanged.emit() + @pyqtSlot(str) def setActiveMachine(self, stack_id): containers = ContainerRegistry.getInstance().findContainerStacks(id = stack_id) @@ -61,6 +67,13 @@ class MachineManagerModel(QObject): if material: return material.getName() + @pyqtSlot(str) + def setActiveMaterial(self, material_id): + containers = ContainerRegistry.getInstance().findInstanceContainers(id=material_id) + old_material = Application.getInstance().getGlobalContainerStack().findContainer({"type":"material"}) + material_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_material) + Application.getInstance().getGlobalContainerStack().replaceContainer(material_index, containers[0]) + @pyqtSlot(str, str) def renameMachine(self, machine_id, new_name): containers = ContainerRegistry.getInstance().findContainerStacks(id = machine_id) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 6b1c4166b7..7feeb32d43 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -201,14 +201,14 @@ Item exclusiveGroup: materialSelectionMenuGroup; onTriggered: { - UM.MachineManager.setActiveMaterial(machineMaterialsModel.getItem(index).name); - if (typeof(model) !== "undefined" && !model.active) { + Cura.MachineManager.setActiveMaterial(model.id); + /*if (typeof(model) !== "undefined" && !model.active) { //Selecting a material was canceled; undo menu selection materialSelectionInstantiator.model.setProperty(index, "active", false); - var activeMaterialName = UM.MachineManager.activeMaterial; + var activeMaterialName = Cura.MachineManager.activeMaterialName var activeMaterialIndex = materialSelectionInstantiator.model.find("name", activeMaterialName); materialSelectionInstantiator.model.setProperty(activeMaterialIndex, "active", true); - } + }*/ } } onObjectAdded: materialSelectionMenu.insertItem(index, object) From 8a4fdf8fb345c1ab90d7b6add7293fbce795f62b Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 12 May 2016 17:50:02 +0200 Subject: [PATCH 188/424] JSON remove: removed Remove Overlapping Wall Parts (CURA-996) --- resources/machines/fdmprinter.json | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index c4c2253812..6527de04d8 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -452,33 +452,6 @@ "visible": false, "inherit": false }, - "remove_overlapping_walls_enabled": { - "label": "Remove Overlapping Wall Parts", - "description": "Remove parts of a wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin parts and sharp corners in models.", - "type": "boolean", - "default": false, - "visible": false, - "enabled": "False", - "children": { - "remove_overlapping_walls_0_enabled": { - "label": "Remove Overlapping Outer Wall Parts", - "description": "Remove parts of an outer wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin pieces in a model and sharp corners.", - "type": "boolean", - "default": false, - "visible": false, - "inherit": true, - "enabled": "False" - }, - "remove_overlapping_walls_x_enabled": { - "label": "Remove Overlapping Inner Wall Parts", - "description": "Remove parts of an inner wall that would otherwise overlap and cause over-extrusion. These overlaps occur in thin pieces in a model and sharp corners.", - "type": "boolean", - "default": true, - "visible": false, - "inherit": false - } - } - }, "fill_perimeter_gaps": { "label": "Fill Gaps Between Walls", "description": "Fills the gaps between walls when overlapping inner wall parts are removed.", From e57ca0aa53def8342cfc18971cafbe4b39caffec Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 12 May 2016 17:51:53 +0200 Subject: [PATCH 189/424] JSON remove: removed Fill Gaps Between Walls (CURA-996) --- resources/machines/fdmprinter.json | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 6527de04d8..ba374072bc 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -452,19 +452,6 @@ "visible": false, "inherit": false }, - "fill_perimeter_gaps": { - "label": "Fill Gaps Between Walls", - "description": "Fills the gaps between walls when overlapping inner wall parts are removed.", - "type": "enum", - "options": { - "nowhere": "Nowhere", - "everywhere": "Everywhere", - "skin": "Skin" - }, - "default": "everywhere", - "visible": false, - "enabled": "remove_overlapping_walls_x_enabled" - }, "travel_compensate_overlapping_walls_enabled": { "label": "Compensate Wall Overlaps", "description": "Compensate the flow for parts of a wall being printed where there is already a wall in place.", From 52ea8e76d2fd3f9bd915af3e664e9d00258f0d7a Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 12 May 2016 20:12:43 +0200 Subject: [PATCH 190/424] lil: multiple_mesh_overlap can now be changed per object --- resources/machines/dual_extrusion_printer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json index 05096ffdd0..6506f0c7f8 100644 --- a/resources/machines/dual_extrusion_printer.json +++ b/resources/machines/dual_extrusion_printer.json @@ -204,8 +204,7 @@ "unit": "mm", "default": 0.15, "min_value": "0", - "max_value_warning": "1.0", - "global_only": true + "max_value_warning": "1.0" }, "ooze_shield_enabled": { "label": "Enable Ooze Shield", From b3e741e90cba70db672ffb653a1d5f3cb797ee6d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 13 May 2016 10:16:58 +0200 Subject: [PATCH 191/424] Added variant selection CURA-1278 --- cura/MachineManagerModel.py | 33 +++++++++++++++++++++++++++++---- resources/qml/SidebarHeader.qml | 14 +++++++++----- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 49c2288a98..c7cd4a6758 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -12,9 +12,11 @@ class MachineManagerModel(QObject): ## When the global container is changed, active material probably needs to be updated. self.globalContainerChanged.connect(self.activeMaterialChanged) + self.globalContainerChanged.connect(self.activeVariantChanged) globalContainerChanged = pyqtSignal() activeMaterialChanged = pyqtSignal() + activeVariantChanged = pyqtSignal() def _onGlobalContainerChanged(self): Application.getInstance().getGlobalContainerStack().containersChanged.connect(self._onInstanceContainersChanged) @@ -24,6 +26,8 @@ class MachineManagerModel(QObject): container_type = container.getMetaDataEntry("type") if container_type == "material": self.activeMaterialChanged.emit() + elif container_type == "variant": + self.activeVariantChanged.emit() @pyqtSlot(str) def setActiveMachine(self, stack_id): @@ -39,18 +43,24 @@ class MachineManagerModel(QObject): new_global_stack.addMetaDataEntry("type", "machine") ContainerRegistry.getInstance().addContainer(new_global_stack) - variant_instance_container = InstanceContainer(name + "_variant") + ## DEBUG CODE material_instance_container = InstanceContainer("test_material") material_instance_container.addMetaDataEntry("type", "material") material_instance_container.setDefinition(definitions[0]) - #material_instance_container.setMetaData({"type","material"}) + + variant_instance_container = InstanceContainer("test_variant") + variant_instance_container.addMetaDataEntry("type", "variant") + variant_instance_container.setDefinition(definitions[0]) + quality_instance_container = InstanceContainer(name + "_quality") current_settings_instance_container = InstanceContainer(name + "_current_settings") ContainerRegistry.getInstance().addContainer(material_instance_container) + ContainerRegistry.getInstance().addContainer(variant_instance_container) # If a definition is found, its a list. Should only have one item. new_global_stack.addContainer(definitions[0]) new_global_stack.addContainer(material_instance_container) + new_global_stack.addContainer(variant_instance_container) Application.getInstance().setGlobalContainerStack(new_global_stack) @pyqtProperty(str, notify = globalContainerChanged) @@ -71,8 +81,23 @@ class MachineManagerModel(QObject): def setActiveMaterial(self, material_id): containers = ContainerRegistry.getInstance().findInstanceContainers(id=material_id) old_material = Application.getInstance().getGlobalContainerStack().findContainer({"type":"material"}) - material_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_material) - Application.getInstance().getGlobalContainerStack().replaceContainer(material_index, containers[0]) + if old_material: + material_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_material) + Application.getInstance().getGlobalContainerStack().replaceContainer(material_index, containers[0]) + + @pyqtSlot(str) + def setActiveVariant(self, variant_id): + containers = ContainerRegistry.getInstance().findInstanceContainers(id=variant_id) + old_variant = Application.getInstance().getGlobalContainerStack().findContainer({"type": "variant"}) + if old_variant: + variant_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_variant) + Application.getInstance().getGlobalContainerStack().replaceContainer(variant_index, containers[0]) + + @pyqtProperty(str, notify = activeVariantChanged) + def activeVariantName(self): + variant = Application.getInstance().getGlobalContainerStack().findContainer({"type": "variant"}) + if variant: + return variant.getName() @pyqtSlot(str, str) def renameMachine(self, machine_id, new_name): diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 7feeb32d43..e4c8e8bb02 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -128,8 +128,8 @@ Item ToolButton { id: variantSelection - text: UM.MachineManager.activeMachineVariant - tooltip: UM.MachineManager.activeMachineVariant; + text: Cura.MachineManager.activeVariantName + tooltip: Cura.MachineManager.activeVariantName; visible: UM.MachineManager.hasVariants height: UM.Theme.getSize("setting_control").height @@ -143,6 +143,10 @@ Item Instantiator { id: variantSelectionInstantiator + model: UM.InstanceContainersModel + { + filter: {"type": "variant"} + } // model: UM.MachineVariantsModel { id: variantsModel } MenuItem { @@ -152,14 +156,14 @@ Item exclusiveGroup: variantSelectionMenuGroup; onTriggered: { - UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name); - if (typeof(model) !== "undefined" && !model.active) { + Cura.MachineManager.setActiveVariant(model.id); + /*if (typeof(model) !== "undefined" && !model.active) { //Selecting a variant was canceled; undo menu selection variantSelectionInstantiator.model.setProperty(index, "active", false); var activeMachineVariantName = UM.MachineManager.activeMachineVariant; var activeMachineVariantIndex = variantSelectionInstantiator.model.find("name", activeMachineVariantName); variantSelectionInstantiator.model.setProperty(activeMachineVariantIndex, "active", true); - } + }*/ } } onObjectAdded: variantsSelectionMenu.insertItem(index, object) From f3384b043db92bf38d31eb9755c3b527123e6fe0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 13 May 2016 11:26:08 +0200 Subject: [PATCH 192/424] Only variants of active machine are now shown CURA-1278 --- cura/MachineManagerModel.py | 4 ++++ resources/qml/SidebarHeader.qml | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index c7cd4a6758..53fcd1662e 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -105,6 +105,10 @@ class MachineManagerModel(QObject): if containers: containers[0].setName(new_name) + @pyqtProperty(str, notify=globalContainerChanged) + def activeMachineDefinitionId(self): + return Application.getInstance().getGlobalContainerStack().getContainers()[-1].getId() + @pyqtSlot(str) def removeMachine(self, machine_id): ContainerRegistry.getInstance().removeContainer(machine_id) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index e4c8e8bb02..258ca8221c 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -145,9 +145,12 @@ Item id: variantSelectionInstantiator model: UM.InstanceContainersModel { - filter: {"type": "variant"} + filter: + { + "type": "variant", + "definition": Cura.MachineManager.activeMachineDefinitionId //Only show variants of this machine + } } -// model: UM.MachineVariantsModel { id: variantsModel } MenuItem { text: model.name; From 6ffde62bcf8f7fcecacbd9a7ce3e7591096ddf91 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 13 May 2016 11:40:18 +0200 Subject: [PATCH 193/424] Added stubs for hasVariants & hasMaterials CURA-1278 --- cura/MachineManagerModel.py | 11 +++++++++++ resources/qml/SidebarHeader.qml | 13 +++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 53fcd1662e..28ae06e26b 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -113,6 +113,17 @@ class MachineManagerModel(QObject): def removeMachine(self, machine_id): ContainerRegistry.getInstance().removeContainer(machine_id) + @pyqtProperty(bool) + def hasMaterials(self): + # Todo: Still hardcoded. + # We should implement this properly when it's clear how a machine notifies us if it can handle materials + return True + + @pyqtProperty(bool) + def hasVariants(self): + # Todo: Still hardcoded. + # We should implement this properly when it's clear how a machine notifies us if it can handle variants + return True def createMachineManagerModel(engine, script_engine): diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 258ca8221c..fcf05a49ca 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -104,12 +104,12 @@ Item anchors.topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 width: base.width height: visible ? UM.Theme.getSize("sidebar_setup").height : 0 - visible: UM.MachineManager.hasVariants || UM.MachineManager.hasMaterials + visible: Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials Label{ id: variantLabel - text: (UM.MachineManager.hasVariants && UM.MachineManager.hasMaterials) ? catalog.i18nc("@label","Nozzle & Material:"): - UM.MachineManager.hasVariants ? catalog.i18nc("@label","Nozzle:") : catalog.i18nc("@label","Material:"); + text: (Cura.MachineManager.hasVariants && Cura.MachineManager.hasMaterials) ? catalog.i18nc("@label","Nozzle & Material:"): + Cura.MachineManager.hasVariants ? catalog.i18nc("@label","Nozzle:") : catalog.i18nc("@label","Material:"); anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter @@ -118,7 +118,8 @@ Item color: UM.Theme.getColor("text"); } - Rectangle { + Rectangle + { anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter @@ -130,7 +131,7 @@ Item id: variantSelection text: Cura.MachineManager.activeVariantName tooltip: Cura.MachineManager.activeVariantName; - visible: UM.MachineManager.hasVariants + visible: Cura.MachineManager.hasVariants height: UM.Theme.getSize("setting_control").height width: materialSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width @@ -181,7 +182,7 @@ Item id: materialSelection text: Cura.MachineManager.activeMaterialName tooltip: Cura.MachineManager.activeMaterialName - visible: UM.MachineManager.hasMaterials + visible: Cura.MachineManager.hasMaterials height: UM.Theme.getSize("setting_control").height width: variantSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width From 5dbe0bdc0379950eb4066afbbf5fdc8864bca2d5 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 13 May 2016 11:46:54 +0200 Subject: [PATCH 194/424] Machine variants can now be selected from dropdown menu CURA-1278 --- resources/qml/Cura.qml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 4314dc21e6..250dcf050e 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -193,13 +193,20 @@ UM.MainWindow Instantiator { -// model: UM.MachineVariantsModel { } + model: UM.InstanceContainersModel + { + filter: + { + "type": "variant", + "definition": Cura.MachineManager.activeMachineDefinitionId //Only show variants of this machine + } + } MenuItem { text: model.name; checkable: true; checked: model.active; exclusiveGroup: machineVariantsGroup; - onTriggered: UM.MachineManager.setActiveMachineVariant(model.name) + onTriggered: Cura.MachineManager.setActiveVariant(model.id) } onObjectAdded: machineMenu.insertItem(index, object) onObjectRemoved: machineMenu.removeItem(object) @@ -207,7 +214,7 @@ UM.MainWindow ExclusiveGroup { id: machineVariantsGroup; } -// MenuSeparator { visible: UM.MachineManager.hasVariants; } + MenuSeparator { visible: Cura.MachineManager.hasVariants; } MenuItem { action: Actions.addMachine; } MenuItem { action: Actions.configureMachines; } From dd24e488a834bc29ab5f096721b2698e3cfd29a3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 13 May 2016 12:04:38 +0200 Subject: [PATCH 195/424] Materials & variants are now correctly checked when active CURA-1278 --- cura/MachineManagerModel.py | 13 +++++++++++++ resources/qml/Cura.qml | 2 +- resources/qml/SidebarHeader.qml | 6 ++---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 28ae06e26b..2ff80efc3d 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -77,6 +77,12 @@ class MachineManagerModel(QObject): if material: return material.getName() + @pyqtProperty(str, notify=activeMaterialChanged) + def activeMaterialId(self): + material = Application.getInstance().getGlobalContainerStack().findContainer({"type": "material"}) + if material: + return material.getId() + @pyqtSlot(str) def setActiveMaterial(self, material_id): containers = ContainerRegistry.getInstance().findInstanceContainers(id=material_id) @@ -99,6 +105,13 @@ class MachineManagerModel(QObject): if variant: return variant.getName() + @pyqtProperty(str, notify = activeVariantChanged) + def activeVariantId(self): + variant = Application.getInstance().getGlobalContainerStack().findContainer({"type": "variant"}) + if variant: + return variant.getId() + + @pyqtSlot(str, str) def renameMachine(self, machine_id, new_name): containers = ContainerRegistry.getInstance().findContainerStacks(id = machine_id) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 250dcf050e..2d1fbe3305 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -204,7 +204,7 @@ UM.MainWindow MenuItem { text: model.name; checkable: true; - checked: model.active; + checked: model.id == Cura.MachineManager.activeVariantId; exclusiveGroup: machineVariantsGroup; onTriggered: Cura.MachineManager.setActiveVariant(model.id) } diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index fcf05a49ca..ff6db0703b 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -156,7 +156,7 @@ Item { text: model.name; checkable: true; - checked: model.active; + checked: model.id == Cura.MachineManager.activeVariantId; exclusiveGroup: variantSelectionMenuGroup; onTriggered: { @@ -199,13 +199,11 @@ Item { filter: {"type": "material"} } - //model: UM.InstancesModel {filter: {"type":"material"}} -// model: UM.MachineMaterialsModel { id: machineMaterialsModel } MenuItem { text: model.name; checkable: true; - checked: model.active; + checked: model.id == Cura.MachineManager.activeMaterialId; exclusiveGroup: materialSelectionMenuGroup; onTriggered: { From f9adb2c601be147dc9afce75db982cf369998afd Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 13 May 2016 13:05:58 +0200 Subject: [PATCH 196/424] Reset stored layer data as soon as a new slice operation starts This prevents layer view showing a combination of stale and fresh data Fixes CURA-1370 (and CURA-1519) --- plugins/CuraEngineBackend/CuraEngineBackend.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index c5b38034b5..32e9f8da65 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -118,6 +118,7 @@ class CuraEngineBackend(Backend): ## Perform a slice of the scene. def slice(self): + self._stored_layer_data = [] if not self._enabled: return From 3d94d2437274f1bfe001fbb25a3bf4ffdc2a8971 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 13 May 2016 13:28:00 +0200 Subject: [PATCH 197/424] JSON feat: skin overlap (CURA-967) --- resources/machines/fdmprinter.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 7171d140ff..53e60beb26 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -573,6 +573,29 @@ } } }, + "skin_overlap": { + "label": "Skin Overlap Percentage", + "description": "The amount of overlap between the skin and the walls. A slight overlap allows the walls to connect firmly to the skin.", + "unit": "%", + "type": "float", + "default": 5, + "min_value_warning": "-50", + "max_value_warning": "100", + "visible": false, + "children": { + "skin_overlap_mm": { + "label": "Skin Overlap", + "description": "The amount of overlap between the skin and the walls. A slight overlap allows the walls to connect firmly to the skin.", + "unit": "mm", + "type": "float", + "default": 0.02, + "min_value_warning": "-0.5 * machine_nozzle_size", + "max_value_warning": "machine_nozzle_size", + "inherit_function": "skin_line_width * parent_value / 100", + "visible": false + } + } + }, "infill_wipe_dist": { "label": "Infill Wipe Distance", "description": "Distance of a travel move inserted after every infill line, to make the infill stick to the walls better. This option is similar to infill overlap, but without extrusion and only on one end of the infill line.", From c832b92e6f1effada7c044b528272224b51621a7 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 13 May 2016 13:37:43 +0200 Subject: [PATCH 198/424] JSON fix: made infill/skin overlap disabled for concentric pattern (CURA-967) --- resources/machines/fdmprinter.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 53e60beb26..c872437f7d 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -555,10 +555,11 @@ "unit": "%", "type": "float", "default": 10, - "inherit_function": "10 if infill_sparse_density < 95 else 0", + "inherit_function": "10 if infill_sparse_density < 95 and infill_pattern != \"concentric\" else 0", "min_value_warning": "-50", "max_value_warning": "100", "visible": false, + "enabled": "infill_pattern != \"concentric\"", "children": { "infill_overlap_mm": { "label": "Infill Overlap", @@ -568,8 +569,9 @@ "default": 0.04, "min_value_warning": "-0.5 * machine_nozzle_size", "max_value_warning": "machine_nozzle_size", - "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 else 0", - "visible": false + "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 and infill_pattern != \"concentric\" else 0", + "visible": false, + "enabled": "infill_pattern != \"concentric\"" } } }, @@ -581,7 +583,9 @@ "default": 5, "min_value_warning": "-50", "max_value_warning": "100", + "inherit_function": "5 if top_bottom_pattern != \"concentric\" else 0", "visible": false, + "enabled": "top_bottom_pattern != \"concentric\"", "children": { "skin_overlap_mm": { "label": "Skin Overlap", @@ -591,8 +595,9 @@ "default": 0.02, "min_value_warning": "-0.5 * machine_nozzle_size", "max_value_warning": "machine_nozzle_size", - "inherit_function": "skin_line_width * parent_value / 100", - "visible": false + "inherit_function": "skin_line_width * parent_value / 100 if top_bottom_pattern != \"concentric\" else 0", + "visible": false, + "enabled": "top_bottom_pattern != \"concentric\"" } } }, From ed498317855ca758faf1272749ade6a33a9ee62e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 13 May 2016 15:24:49 +0200 Subject: [PATCH 199/424] Last active machine is now restored upon restart CURA-1278 --- cura/CuraApplication.py | 1 - cura/MachineManagerModel.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 8c6681de8c..e161a242e0 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -110,7 +110,6 @@ class CuraApplication(QtApplication): Resources.addType(self.ResourceTypes.QmlFiles, "qml") Resources.addType(self.ResourceTypes.Firmware, "firmware") - Preferences.getInstance().addPreference("cura/active_machine", "") Preferences.getInstance().addPreference("cura/active_mode", "simple") Preferences.getInstance().addPreference("cura/recent_files", "") Preferences.getInstance().addPreference("cura/categories_expanded", "") diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 2ff80efc3d..dc330ac3bc 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -5,6 +5,8 @@ from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.ContainerStack import ContainerStack from UM.Settings.InstanceContainer import InstanceContainer +from UM.Preferences import Preferences + class MachineManagerModel(QObject): def __init__(self, parent = None): super().__init__(parent) @@ -14,11 +16,21 @@ class MachineManagerModel(QObject): self.globalContainerChanged.connect(self.activeMaterialChanged) self.globalContainerChanged.connect(self.activeVariantChanged) + Preferences.getInstance().addPreference("cura/active_machine", "") + + active_machine_id = Preferences.getInstance().getValue("cura/active_machine") + if active_machine_id != "": + # An active machine was saved, so restore it. + self.setActiveMachine(active_machine_id) + pass + + globalContainerChanged = pyqtSignal() activeMaterialChanged = pyqtSignal() activeVariantChanged = pyqtSignal() def _onGlobalContainerChanged(self): + Preferences.getInstance().setValue("cura/active_machine", Application.getInstance().getGlobalContainerStack().getId()) Application.getInstance().getGlobalContainerStack().containersChanged.connect(self._onInstanceContainersChanged) self.globalContainerChanged.emit() From bfbb48268a19461992db642a02fba1a348fd45fa Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 13 May 2016 15:48:56 +0200 Subject: [PATCH 200/424] Added material stubs CURA-1278 --- resources/instances/abs.inst.cfg | 12 ++++++++++++ resources/instances/cpe.inst.cfg | 11 +++++++++++ resources/instances/pla.inst.cfg | 10 ++++++++++ 3 files changed, 33 insertions(+) create mode 100644 resources/instances/abs.inst.cfg create mode 100644 resources/instances/cpe.inst.cfg create mode 100644 resources/instances/pla.inst.cfg diff --git a/resources/instances/abs.inst.cfg b/resources/instances/abs.inst.cfg new file mode 100644 index 0000000000..0d64e81437 --- /dev/null +++ b/resources/instances/abs.inst.cfg @@ -0,0 +1,12 @@ +[general] +version = 2 +name = ABS +definition = fdmprinter + +[metadata] +type = material + +[values] +material_print_temperature = 250 +material_bed_temperature = 80 +material_flow = 107 diff --git a/resources/instances/cpe.inst.cfg b/resources/instances/cpe.inst.cfg new file mode 100644 index 0000000000..ca30cba046 --- /dev/null +++ b/resources/instances/cpe.inst.cfg @@ -0,0 +1,11 @@ +[general] +version = 2 +name = CPE +definition = fdmprinter + +[metadata] +type = material + +[values] +material_print_temperature = 250 +material_bed_temperature = 70 \ No newline at end of file diff --git a/resources/instances/pla.inst.cfg b/resources/instances/pla.inst.cfg new file mode 100644 index 0000000000..dfa9c62469 --- /dev/null +++ b/resources/instances/pla.inst.cfg @@ -0,0 +1,10 @@ +[general] +version = 2 +name = PLA +definition = fdmprinter + +[metadata] +type = material + +[values] +material_bed_temperature = 60 From ad7531ededf08985f132d14b65b6076601a546cc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 13 May 2016 15:56:41 +0200 Subject: [PATCH 201/424] Added quality instances stubs CURA_1278 --- resources/instances/high_quality.inst.cfg | 9 +++++++++ resources/instances/normal_quality.inst.cfg | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 resources/instances/high_quality.inst.cfg create mode 100644 resources/instances/normal_quality.inst.cfg diff --git a/resources/instances/high_quality.inst.cfg b/resources/instances/high_quality.inst.cfg new file mode 100644 index 0000000000..2e860cf380 --- /dev/null +++ b/resources/instances/high_quality.inst.cfg @@ -0,0 +1,9 @@ +[general] +version = 2 +name = high +definition = fdmprinter + +[metadata] +type = quality + +[values] diff --git a/resources/instances/normal_quality.inst.cfg b/resources/instances/normal_quality.inst.cfg new file mode 100644 index 0000000000..6bb23d841c --- /dev/null +++ b/resources/instances/normal_quality.inst.cfg @@ -0,0 +1,9 @@ +[general] +version = 2 +name = normal +definition = fdmprinter + +[metadata] +type = quality + +[values] From 5df7c519c20cfc3da470e46499a9b3a87f20d1fe Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 13 May 2016 17:29:49 +0200 Subject: [PATCH 202/424] Removed option to turn off automatic updated check from GeneralPage.qml UpdateChecker is not a required plugin, so we cannot rely on there being functionality to automatically check for updates. Note that the preference is still there, so the user can still turn off automatic update checking by editing the cura.cfg file. CURA-1540 --- resources/qml/GeneralPage.qml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index 9138fffc45..b2ff44b15a 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -30,10 +30,8 @@ UM.PreferencesPage UM.Preferences.resetPreference("general/language") UM.Preferences.resetPreference("physics/automatic_push_free") UM.Preferences.resetPreference("mesh/scale_to_fit") - UM.Preferences.resetPreference("info/automatic_update_check") UM.Preferences.resetPreference("info/send_slice_info") pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) - checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) var defaultLanguage = UM.Preferences.getValue("general/language") @@ -152,20 +150,6 @@ UM.PreferencesPage } } - UM.TooltipArea { - width: childrenRect.width - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") - - CheckBox - { - id: checkUpdatesCheckbox - text: catalog.i18nc("@option:check","Check for updates on start") - checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check")) - onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked) - } - } - UM.TooltipArea { width: childrenRect.width height: childrenRect.height From da872871bd5cbbacf325bb6b006011028b37cd51 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 13 May 2016 18:35:41 +0200 Subject: [PATCH 203/424] Add back option to turn off automatic update check if the UpdateChecker plugin is available CURA-1540 --- resources/qml/GeneralPage.qml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index b2ff44b15a..3db56d4699 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -36,6 +36,11 @@ UM.PreferencesPage scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) var defaultLanguage = UM.Preferences.getValue("general/language") setDefaultLanguage(defaultLanguage) + + if (UM.Models.pluginsModel.find("id", "UpdateChecker") > -1) { + UM.Preferences.resetPreference("info/automatic_update_check") + checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) + } } ColumnLayout @@ -150,6 +155,21 @@ UM.PreferencesPage } } + UM.TooltipArea { + visible: UM.Models.pluginsModel.find("id", "UpdateChecker") > -1 + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") + + CheckBox + { + id: checkUpdatesCheckbox + text: catalog.i18nc("@option:check","Check for updates on start") + checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check")) + onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked) + } + } + UM.TooltipArea { width: childrenRect.width height: childrenRect.height From 12638f3601eb95217a9ee74858f19a2ae1bca3ef Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 13 May 2016 19:04:32 +0200 Subject: [PATCH 204/424] Make machine prefix for jobname optional CURA-1480 --- cura/CuraApplication.py | 1 + resources/qml/GeneralPage.qml | 18 +++++++++++++++++- resources/qml/JobSpecs.qml | 6 +++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f381faa482..996e1f59a3 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -114,6 +114,7 @@ class CuraApplication(QtApplication): Preferences.getInstance().addPreference("cura/active_mode", "simple") Preferences.getInstance().addPreference("cura/recent_files", "") Preferences.getInstance().addPreference("cura/categories_expanded", "") + Preferences.getInstance().addPreference("cura/jobname_prefix", True) Preferences.getInstance().addPreference("view/center_on_select", True) Preferences.getInstance().addPreference("mesh/scale_to_fit", True) Preferences.getInstance().addPreference("mesh/scale_tiny_meshes", True) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index 3db56d4699..4f597ff32b 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -31,9 +31,11 @@ UM.PreferencesPage UM.Preferences.resetPreference("physics/automatic_push_free") UM.Preferences.resetPreference("mesh/scale_to_fit") UM.Preferences.resetPreference("info/send_slice_info") + UM.Preferences.resetPreference("cura/jobname_prefix") pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) + prefixJobNameCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/jobname_prefix")) var defaultLanguage = UM.Preferences.getValue("general/language") setDefaultLanguage(defaultLanguage) @@ -116,7 +118,7 @@ UM.PreferencesPage UM.TooltipArea { width: childrenRect.width height: childrenRect.height - text: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect.") + text: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect?") CheckBox { @@ -183,5 +185,19 @@ UM.PreferencesPage onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked) } } + + UM.TooltipArea { + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip", "Should a prefix based on the printer name be added to the print job name automatically?") + + CheckBox + { + id: prefixJobNameCheckbox + text: catalog.i18nc("@option:check", "Add machine prefix to job name") + checked: boolCheck(UM.Preferences.getValue("cura/jobname_prefix")) + onCheckedChanged: UM.Preferences.setValue("cura/jobname_prefix", checked) + } + } } } diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index fac4fd841d..99b2d00c36 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -31,6 +31,7 @@ Rectangle { function createFileName(){ var splitMachineName = UM.MachineManager.activeMachineInstance.split(" ") var abbrMachine = '' + if ((UM.Preferences.getValue("cura/jobname_prefix"))) { for (var i = 0; i < splitMachineName.length; i++){ if (splitMachineName[i].search(/ultimaker/i) != -1){ abbrMachine += 'UM' @@ -48,7 +49,10 @@ Rectangle { } } } - printJobTextfield.text = abbrMachine + '_' + base.fileBaseName + printJobTextfield.text = abbrMachine + '_' + base.fileBaseName + } else { + printJobTextfield.text = base.fileBaseName + } } Connections { From 481b350cfd66bb204a5b9a513ca3d1be1a38ab2f Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Sat, 14 May 2016 18:42:23 +0200 Subject: [PATCH 205/424] BQ Hephestos2: Removing override of support_enable "support_enable" is already set as "enabled": false in fdmprinter.json. So this line is unneeded here. --- resources/machines/bq_hephestos_2.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json index 8b1ed34caa..1655c28009 100644 --- a/resources/machines/bq_hephestos_2.json +++ b/resources/machines/bq_hephestos_2.json @@ -58,6 +58,5 @@ "skirt_minimal_length": { "default": 30.0, "visible": false }, "skirt_gap": { "default": 6.0 }, "cool_fan_full_at_height": { "default": 0.4, "visible": false }, - "support_enable": { "default": false } } } From c83a5a30cc2e5e9c7500715a12ce9d835a25b43a Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Mon, 16 May 2016 11:13:39 +0200 Subject: [PATCH 206/424] BQ Hephestos2: Removing machine_gcode_flavor This is already default at https://github.com/Ultimaker/Cura/blob/master/resources/machines/fdmprinter.json#L115 --- resources/machines/bq_hephestos_2.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json index 8b1ed34caa..4bb665cdc6 100644 --- a/resources/machines/bq_hephestos_2.json +++ b/resources/machines/bq_hephestos_2.json @@ -30,9 +30,6 @@ "machine_center_is_zero": { "default": false }, - "machine_gcode_flavor": { - "default": "RepRap" - }, "machine_platform_offset": { "default": [6, 1320, 0] }, From adc699c63be3f3ce312d19a40a398382c11288b2 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 12 May 2016 01:41:29 +0200 Subject: [PATCH 207/424] Add a SettingPropertyProvider object to the setting items --- resources/qml/Settings/SettingView.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 66ff30fa11..946d995f2a 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -37,6 +37,7 @@ ScrollView property var definition: model property var settingDefinitionsModel: definitionsModel + property var propertyProvider: provider asynchronous: true @@ -61,6 +62,18 @@ ScrollView } } + UM.SettingPropertyProvider + { + id: provider + + containerStackId: "" + + key: model.key + + watchedProperties: [ "value", "enabled", "state", "validationState" ] + + } + Connections { target: item From 08afad8973af1bed559f2040d6444e41840fc44f Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 17:46:22 +0200 Subject: [PATCH 208/424] Remove get/setSettingValue from CuraApplication They are unused and should not be used anyway --- cura/CuraApplication.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index e161a242e0..e0d086e954 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -511,20 +511,6 @@ class CuraApplication(QtApplication): def expandedCategories(self): return Preferences.getInstance().getValue("cura/categories_expanded").split(";") - @pyqtSlot(str, result = "QVariant") - def getSettingValue(self, key): - if not self._global_container_stack: - return None - return self._global_container_stack.getValue(key) - - ## Change setting by key value pair - @pyqtSlot(str, "QVariant") - def setSettingValue(self, key, value): - if not self.getMachineManager().getWorkingProfile(): - return - - self.getMachineManager().getWorkingProfile().setSettingValue(key, value) - @pyqtSlot() def mergeSelected(self): self.groupSelected() From efdf1d78d1e0930bc50738ac75a874442c4b4b4c Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:11:51 +0200 Subject: [PATCH 209/424] Add a "Current Settings" instance container to the stack on stack creation --- cura/MachineManagerModel.py | 43 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index dc330ac3bc..dcdae87dbf 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -1,12 +1,10 @@ from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal from UM.Application import Application -from UM.Settings.ContainerRegistry import ContainerRegistry -from UM.Settings.ContainerStack import ContainerStack -from UM.Settings.InstanceContainer import InstanceContainer - from UM.Preferences import Preferences +import UM.Settings + class MachineManagerModel(QObject): def __init__(self, parent = None): super().__init__(parent) @@ -43,36 +41,42 @@ class MachineManagerModel(QObject): @pyqtSlot(str) def setActiveMachine(self, stack_id): - containers = ContainerRegistry.getInstance().findContainerStacks(id = stack_id) + containers = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = stack_id) if containers: Application.getInstance().setGlobalContainerStack(containers[0]) @pyqtSlot(str, str) def addMachine(self,name, definition_id): - definitions = ContainerRegistry.getInstance().findDefinitionContainers(id=definition_id) + definitions = UM.Settings.ContainerRegistry.getInstance().findDefinitionContainers(id=definition_id) if definitions: - new_global_stack = ContainerStack(name) + new_global_stack = UM.Settings.ContainerStack(name) new_global_stack.addMetaDataEntry("type", "machine") - ContainerRegistry.getInstance().addContainer(new_global_stack) + UM.Settings.ContainerRegistry.getInstance().addContainer(new_global_stack) ## DEBUG CODE - material_instance_container = InstanceContainer("test_material") + material_instance_container = UM.Settings.InstanceContainer("test_material") material_instance_container.addMetaDataEntry("type", "material") material_instance_container.setDefinition(definitions[0]) - variant_instance_container = InstanceContainer("test_variant") + variant_instance_container = UM.Settings.InstanceContainer("test_variant") variant_instance_container.addMetaDataEntry("type", "variant") variant_instance_container.setDefinition(definitions[0]) - quality_instance_container = InstanceContainer(name + "_quality") - current_settings_instance_container = InstanceContainer(name + "_current_settings") - ContainerRegistry.getInstance().addContainer(material_instance_container) - ContainerRegistry.getInstance().addContainer(variant_instance_container) + quality_instance_container = UM.Settings.InstanceContainer(name + "_quality") + UM.Settings.ContainerRegistry.getInstance().addContainer(material_instance_container) + UM.Settings.ContainerRegistry.getInstance().addContainer(variant_instance_container) + + current_settings_instance_container = UM.Settings.InstanceContainer(name + "_current_settings") + current_settings_instance_container.addMetaDataEntry("machine", name) + current_settings_instance_container.setDefinition(definitions[0]) + UM.Settings.ContainerRegistry.getInstance().addContainer(current_settings_instance_container) # If a definition is found, its a list. Should only have one item. new_global_stack.addContainer(definitions[0]) new_global_stack.addContainer(material_instance_container) new_global_stack.addContainer(variant_instance_container) + new_global_stack.addContainer(current_settings_instance_container) + Application.getInstance().setGlobalContainerStack(new_global_stack) @pyqtProperty(str, notify = globalContainerChanged) @@ -97,7 +101,7 @@ class MachineManagerModel(QObject): @pyqtSlot(str) def setActiveMaterial(self, material_id): - containers = ContainerRegistry.getInstance().findInstanceContainers(id=material_id) + containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=material_id) old_material = Application.getInstance().getGlobalContainerStack().findContainer({"type":"material"}) if old_material: material_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_material) @@ -105,7 +109,7 @@ class MachineManagerModel(QObject): @pyqtSlot(str) def setActiveVariant(self, variant_id): - containers = ContainerRegistry.getInstance().findInstanceContainers(id=variant_id) + containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=variant_id) old_variant = Application.getInstance().getGlobalContainerStack().findContainer({"type": "variant"}) if old_variant: variant_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_variant) @@ -126,7 +130,7 @@ class MachineManagerModel(QObject): @pyqtSlot(str, str) def renameMachine(self, machine_id, new_name): - containers = ContainerRegistry.getInstance().findContainerStacks(id = machine_id) + containers = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = machine_id) if containers: containers[0].setName(new_name) @@ -136,7 +140,7 @@ class MachineManagerModel(QObject): @pyqtSlot(str) def removeMachine(self, machine_id): - ContainerRegistry.getInstance().removeContainer(machine_id) + UM.Settings.ContainerRegistry.getInstance().removeContainer(machine_id) @pyqtProperty(bool) def hasMaterials(self): @@ -150,6 +154,5 @@ class MachineManagerModel(QObject): # We should implement this properly when it's clear how a machine notifies us if it can handle variants return True - def createMachineManagerModel(engine, script_engine): - return MachineManagerModel() \ No newline at end of file + return MachineManagerModel() From 5ff5ed385654f88ebf9840e85d41085d070e2b04 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:12:10 +0200 Subject: [PATCH 210/424] Add an "activeDefinitionId" property to MachineManager --- cura/MachineManagerModel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index dcdae87dbf..040625a159 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -127,6 +127,9 @@ class MachineManagerModel(QObject): if variant: return variant.getId() + @pyqtProperty(str, notify = globalContainerChanged) + def activeDefinitionId(self): + return Application.getInstance().getGlobalContainerStack().getBottom().id @pyqtSlot(str, str) def renameMachine(self, machine_id, new_name): From 442d2b6e718ac75f2703bacb8031673d21c9f429 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:12:28 +0200 Subject: [PATCH 211/424] Use the right tooltip for SettingCategory --- resources/qml/Settings/SettingCategory.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index 871b5c0036..56a20aec3b 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -51,7 +51,6 @@ Button { UM.SimpleButton { - // This button shows when the setting has an inherited function, but is overriden by profile. id: inheritButton; anchors.verticalCenter: parent.verticalCenter @@ -71,7 +70,7 @@ Button { iconSource: UM.Theme.getIcon("notice") onEntered: { - base.showTooltip(catalog.i18nc("@label", "This setting is normally calculated, but it currently has an absolute value set.\n\nClick to restore the calculated value.")) + base.showTooltip(catalog.i18nc("@label","Some hidden settings use values different from their normal calculated value.\n\nClick to make these settings visible.")) } onExited: { From b1df8e9448ce00f5c63e14468a6e08ff071a2c70 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:13:20 +0200 Subject: [PATCH 212/424] Use MachineManager and PropertyProvider to restore several bits of behavioiur --- resources/qml/Settings/SettingView.qml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 946d995f2a..6b09c8b9a3 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -7,6 +7,7 @@ import QtQuick.Controls.Styles 1.1 import QtQuick.Layouts 1.1 import UM 1.2 as UM +import Cura 1.0 as Cura import ".." @@ -26,14 +27,18 @@ ScrollView id: contents spacing: UM.Theme.getSize("default_lining").height; - model: UM.SettingDefinitionsModel { id: definitionsModel; containerId: "fdmprinter" } + model: UM.SettingDefinitionsModel { id: definitionsModel; containerId: Cura.MachineManager.activeDefinitionId } delegate: Loader { id: delegate width: UM.Theme.getSize("sidebar").width; - height: UM.Theme.getSize("section").height; + height: provider.properties.enabled ? UM.Theme.getSize("section").height : 0 + Behavior on height { NumberAnimation { duration: 100 } } + opacity: provider.properties.enabled ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: 100 } } + enabled: provider.properties.enabled property var definition: model property var settingDefinitionsModel: definitionsModel @@ -66,12 +71,10 @@ ScrollView { id: provider - containerStackId: "" - + containerStackId: Cura.MachineManager.activeMachineId key: model.key - watchedProperties: [ "value", "enabled", "state", "validationState" ] - + storeIndex: 0 } Connections From e4fe1c6e210ff0be5902c701e874322bd51eed24 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:13:46 +0200 Subject: [PATCH 213/424] Add PropertyProviders to SidebarSimple and use them for property values --- resources/qml/SidebarSimple.qml | 53 +++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 0e877ab09b..9c68c2ef81 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -6,7 +6,8 @@ import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.1 import QtQuick.Layouts 1.1 -import UM 1.1 as UM +import UM 1.2 as UM +import Cura 1.0 as Cura Item { @@ -56,12 +57,7 @@ Item Repeater { id: infillListView property int activeIndex: { - if(!UM.ActiveProfile.valid) - { - return -1; - } - -// var density = parseInt(UM.ActiveProfile.settingValues.getValue("infill_sparse_density")); + var density = parseInt(infillDensity.properties.value) for(var i = 0; i < infillModel.count; ++i) { if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax ) @@ -116,7 +112,7 @@ Item onClicked: { if (infillListView.activeIndex != index) { -// UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage) + infillDensity.setPropertyValue("value", model.percentage) } } onEntered: { @@ -213,13 +209,14 @@ Item text: catalog.i18nc("@option:check","Generate Brim"); style: UM.Theme.styles.checkbox; -// checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("adhesion_type") == "brim" : false; + checked: platformAdhesionType.properties.value == "brim" + MouseArea { anchors.fill: parent hoverEnabled: true onClicked: { -// UM.MachineManager.setSettingValue("adhesion_type", !parent.checked?"brim":"skirt") + platformAdhesionType.setPropertyValue("value", !parent.checked ? "brim" : "skirt") } onEntered: { @@ -246,13 +243,13 @@ Item text: catalog.i18nc("@option:check","Generate Support Structure"); style: UM.Theme.styles.checkbox; -// checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_enable") : false; + checked: supportEnabled.properties.value == "True" MouseArea { anchors.fill: parent hoverEnabled: true onClicked: { -// UM.MachineManager.setSettingValue("support_enable", !parent.checked) + supportEnabled.setPropertyValue("value", !parent.checked) } onEntered: { @@ -371,4 +368,36 @@ Item onLinkActivated: Qt.openUrlExternally(link) } } + + UM.SettingPropertyProvider + { + id: infillDensity + + containerStackId: Cura.MachineManager.activeMachineId + key: "infill_sparse_density" + watchedProperties: [ "value" ] + storeIndex: 0 + + onPropertiesChanged: console.log(properties.value) + } + + UM.SettingPropertyProvider + { + id: platformAdhesionType + + containerStackId: Cura.MachineManager.activeMachineId + key: "adhesion_type" + watchedProperties: [ "value" ] + storeIndex: 0 + } + + UM.SettingPropertyProvider + { + id: supportEnabled + + containerStackId: Cura.MachineManager.activeMachineId + key: "support_enable" + watchedProperties: [ "value" ] + storeIndex: 0 + } } From 5b31634d3ca4010c9712c54aca34448346d51f1d Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:14:21 +0200 Subject: [PATCH 214/424] Make SettingTextField work --- resources/qml/Settings/SettingTextField.qml | 54 +++++++++++---------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 1b28ebadcc..3cbd21387b 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -31,19 +31,19 @@ SettingItem { return UM.Theme.getColor("setting_control_disabled") } - switch(definition.validationState) + switch(propertyProvider.properties.validationState) { - case 0: + case "ValidatorState.Exception": return UM.Theme.getColor("setting_validation_error") - case 1: + case "ValidatorState.MinimumError": return UM.Theme.getColor("setting_validation_error") - case 2: + case "ValidatorState.MaximumError": return UM.Theme.getColor("setting_validation_error") - case 3: + case "ValidatorState.MinimumWarning": return UM.Theme.getColor("setting_validation_warning") - case 4: + case "ValidatorState.MaximumWarning": return UM.Theme.getColor("setting_validation_warning") - case 5: + case "ValidatorState.Valid": return UM.Theme.getColor("setting_validation_ok") default: @@ -56,8 +56,7 @@ SettingItem anchors.fill: parent; anchors.margins: UM.Theme.getSize("default_lining").width; color: UM.Theme.getColor("setting_control_highlight") - opacity: 0.35 -// opacity: !control.hovered ? 0 : valid == 5 ? 1.0 : 0.35; + opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35; } Label @@ -93,19 +92,22 @@ SettingItem Keys.onReleased: { - text = text.replace(",", ".") // User convenience. We use dots for decimal values - if(parseFloat(text) != base.parentValue) - { - base.valueChanged(parseFloat(text)); - } +// text = text.replace(",", ".") // User convenience. We use dots for decimal values +// if(parseFloat(text) != base.parentValue) +// { +// base.valueChanged(parseFloat(text)); +// } + + propertyProvider.setPropertyValue("value", text) } onEditingFinished: { - if(parseFloat(text) != base.parentValue) - { - base.valueChanged(parseFloat(text)); - } +// if(parseFloat(text) != base.parentValue) +// { +// base.valueChanged(parseFloat(text)); +// } + propertyProvider.setPropertyValue("value", text) } color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text") @@ -117,13 +119,13 @@ SettingItem validator: RegExpValidator { regExp: /[0-9.,-]{0,10}/ } -// Binding -// { -// target: input -// property: "text" -// value: format(base.parentValue) -// when: !input.activeFocus -// } + Binding + { + target: input + property: "text" + value: control.format(propertyProvider.properties.value) + when: !input.activeFocus + } } //Rounds a floating point number to 4 decimals. This prevents floating @@ -147,7 +149,7 @@ SettingItem //input: The string value to format. //return: The formatted string. function format(inputValue) { - return parseFloat(inputValue) ? roundFloat(parseFloat(inputValue), 4) : inputValue //If it's a float, round to four decimals. + return parseFloat(inputValue) ? roundFloat(parseFloat(inputValue), 4) : inputValue //If it's a float, round to four decimals. } } } From 06432c3b0b8a12238c6a79fd1e5535dbb51791ac Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:14:39 +0200 Subject: [PATCH 215/424] Make SettingCheckBox properly handle the value --- resources/qml/Settings/SettingCheckBox.qml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 0acacb95fb..6f0314160e 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -19,20 +19,19 @@ SettingItem property bool checked: { - if(value == "True") + switch(propertyProvider.properties.value) { - return true; - } - else if(value == "False") - { - return false; - } - else - { - return value; + case "True": + return true + case "False": + return false + default: + return propertyProvider.properties.value } } + onClicked: propertyProvider.setPropertyValue("value", !checked) + Rectangle { anchors From f5e97c50012e9ff55f3360fec8c0a72b3348a998 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:15:14 +0200 Subject: [PATCH 216/424] Make SettingComboBox work (mostly) properly = --- resources/qml/Settings/SettingComboBox.qml | 27 +++++++++------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index 0f332b2aee..c9f3cb727b 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -13,6 +13,8 @@ SettingItem contents: ComboBox { + id: control + model: definition.options textRole: "value"; @@ -83,32 +85,25 @@ SettingItem } } } -/* - onActivated: { - valueChanged(options.getItem(index).value); - } - onModelChanged: { - updateCurrentIndex(); - } + onActivated: provider.setPropertyValue("value", definition.options[index].key) + onModelChanged: updateCurrentIndex(); - Component.onCompleted: { - parent.parent.valueChanged.connect(updateCurrentIndex) + Connections + { + target: provider + onPropertiesChanged: control.updateCurrentIndex() } function updateCurrentIndex() { - if (!options) { - return; - } - - for(var i = 0; i < options.rowCount(); ++i) { - if(options.getItem(i).value == value) { + for(var i = 0; i < definition.options.length; ++i) { + if(definition.options[i].key == provider.properties.value) { currentIndex = i; return; } } currentIndex = -1; - }*/ + } } } From 3531e4c3e8671fb959fd677912b62b98075711ee Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:16:08 +0200 Subject: [PATCH 217/424] Nest all controls inside the mousearea of SettingItem This makes hover events work properly without all the hassle --- resources/qml/Settings/SettingItem.qml | 169 +++++++++++-------------- 1 file changed, 77 insertions(+), 92 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index d11b0b300a..ebbf93af84 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -16,7 +16,7 @@ Item { height: UM.Theme.getSize("section").height; property alias contents: controlContainer.children; - property bool hovered: false + property alias hovered: mouse.containsMouse signal contextMenuRequested() signal showTooltip(string text); @@ -52,118 +52,103 @@ Item { onTriggered: base.showTooltip(definition.description); } - } - Label - { - id: label; + Label + { + id: label; - anchors.left: parent.left; - anchors.leftMargin: (UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width) - anchors.right: settingControls.left; - anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left; + anchors.leftMargin: (UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width) + anchors.right: settingControls.left; + anchors.verticalCenter: parent.verticalCenter - height: UM.Theme.getSize("section").height; - verticalAlignment: Text.AlignVCenter; + height: UM.Theme.getSize("section").height; + verticalAlignment: Text.AlignVCenter; - text: definition.label - elide: Text.ElideMiddle; + text: definition.label + elide: Text.ElideMiddle; - color: UM.Theme.getColor("setting_control_text"); - font: UM.Theme.getFont("default"); - } - - Row - { - id: settingControls - - height: parent.height / 2 - spacing: UM.Theme.getSize("default_margin").width / 2 - - anchors { - right: controlContainer.left - rightMargin: UM.Theme.getSize("default_margin").width / 2 - verticalCenter: parent.verticalCenter + color: UM.Theme.getColor("setting_control_text"); + font: UM.Theme.getFont("default"); } - UM.SimpleButton + Row { - id: revertButton; + id: settingControls -// visible: base.overridden && base.is_enabled + height: parent.height / 2 + spacing: UM.Theme.getSize("default_margin").width / 2 - height: parent.height; - width: height; - - backgroundColor: UM.Theme.getColor("setting_control"); - hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight") - color: UM.Theme.getColor("setting_control_button") - hoverColor: UM.Theme.getColor("setting_control_button_hover") - - iconSource: UM.Theme.getIcon("reset") - - onClicked: { - base.resetRequested() - controlContainer.notifyReset(); + anchors { + right: controlContainer.left + rightMargin: UM.Theme.getSize("default_margin").width / 2 + verticalCenter: parent.verticalCenter } - onEntered: base.showTooltip(catalog.i18nc("@label", "This setting has a value that is different from the profile.\n\nClick to restore the value of the profile.")) - onExited: + UM.SimpleButton { - if(controlContainer.item && controlContainer.item.hovered) - { - return; + id: revertButton; + + visible: propertyProvider.properties.state == "InstanceState.User" + + height: parent.height; + width: height; + + backgroundColor: UM.Theme.getColor("setting_control"); + hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight") + color: UM.Theme.getColor("setting_control_button") + hoverColor: UM.Theme.getColor("setting_control_button_hover") + + iconSource: UM.Theme.getIcon("reset") + + onClicked: { + base.resetRequested() + controlContainer.notifyReset(); } - base.hovered = false; - base.hideTooltip(); + onEntered: base.showTooltip(catalog.i18nc("@label", "This setting has a value that is different from the profile.\n\nClick to restore the value of the profile.")) + onExited: base.showTooltip(definition.description); } + + UM.SimpleButton + { + // This button shows when the setting has an inherited function, but is overriden by profile. + id: inheritButton; + + //visible: has_profile_value && base.has_inherit_function && base.is_enabled + visible: propertyProvider.properties.state == "InstanceState.User" + + height: parent.height; + width: height; + + onClicked: { + base.resetToDefaultRequested(); + controlContainer.notifyReset(); + } + + backgroundColor: UM.Theme.getColor("setting_control"); + hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight") + color: UM.Theme.getColor("setting_control_button") + hoverColor: UM.Theme.getColor("setting_control_button_hover") + + iconSource: UM.Theme.getIcon("notice"); + + onEntered: base.showTooltip(catalog.i18nc("@label", "This setting is normally calculated, but it currently has an absolute value set.\n\nClick to restore the calculated value.")) + onExited: base.showTooltip(definition.description); + } + } - UM.SimpleButton + Item { - // This button shows when the setting has an inherited function, but is overriden by profile. - id: inheritButton; + id: controlContainer; -// visible: has_profile_value && base.has_inherit_function && base.is_enabled - height: parent.height; - width: height; - - onClicked: { - base.resetToDefaultRequested(); - controlContainer.notifyReset(); - } - - backgroundColor: UM.Theme.getColor("setting_control"); - hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight") - color: UM.Theme.getColor("setting_control_button") - hoverColor: UM.Theme.getColor("setting_control_button_hover") - - iconSource: UM.Theme.getIcon("notice"); - - onEntered: base.showTooltip(catalog.i18nc("@label", "This setting is normally calculated, but it currently has an absolute value set.\n\nClick to restore the calculated value.")) - - onExited: { - if(controlContainer.item && controlContainer.item.hovered) { - return; - } - - base.hovered = false; - base.hideTooltip(); - } + anchors.right: parent.right; + anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.verticalCenter: parent.verticalCenter; + width: UM.Theme.getSize("setting_control").width; + height: UM.Theme.getSize("setting_control").height } - - } - - Item - { - id: controlContainer; - - anchors.right: parent.right; - anchors.rightMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: parent.verticalCenter; - width: UM.Theme.getSize("setting_control").width; - height: UM.Theme.getSize("setting_control").height } UM.I18nCatalog { id: catalog; name: "cura" } From d1d2e1cea7f0e5f79dfa1bcea7d68a957fa7b289 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:16:28 +0200 Subject: [PATCH 218/424] Set the right defaults for setting visibility in Cura --- cura/CuraApplication.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index e0d086e954..5620d039c9 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -117,6 +117,39 @@ class CuraApplication(QtApplication): Preferences.getInstance().addPreference("mesh/scale_to_fit", True) Preferences.getInstance().setDefault("local_file/last_used_type", "text/x-gcode") + Preferences.getInstance().setDefault("general/visible_settings", """ + resolution + layer_height + shell + wall_thickness + top_bottom_thickness + infill + infill_sparse_density + material + material_print_temperature + material_bed_temperature + material_diameter + material_flow + retraction_enable + speed + speed_print + speed_travel + cooling + cool_fan_enabled + support + support_enable + support_type + support_roof_density + platform_adhesion + adhesion_type + brim_width + raft_airgap + layer_0_z_overlap + raft_surface_layers + blackmagic + print_sequence + """) + JobQueue.getInstance().jobFinished.connect(self._onJobFinished) self._recent_files = [] From 442b9f2af32dda8cf2e901a8df8e7d3baf44fb91 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Tue, 17 May 2016 09:43:14 +0200 Subject: [PATCH 219/424] Rename 'tmp' to something a bit more meaningful. Contributes to CURA-1512 --- cura/ConvexHullJob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index 92fcc66ecd..a60e6d339a 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -53,8 +53,8 @@ class ConvexHullJob(Job): # This basically finds the unique rows in the array by treating them as opaque groups of bytes # which are as long as the 2 float64s in each row, and giving this view to numpy.unique() to munch. # See http://stackoverflow.com/questions/16970982/find-unique-rows-in-numpy-array - tmp = numpy.ascontiguousarray(vertex_data).view(numpy.dtype((numpy.void, vertex_data.dtype.itemsize * vertex_data.shape[1]))) - _, idx = numpy.unique(tmp, return_index=True) + vertex_byte_view = numpy.ascontiguousarray(vertex_data).view(numpy.dtype((numpy.void, vertex_data.dtype.itemsize * vertex_data.shape[1]))) + _, idx = numpy.unique(vertex_byte_view, return_index=True) vertex_data = vertex_data[idx] # Select the unique rows by index. hull = Polygon(vertex_data) From 9bfe31aeef8b3646ba04050486ebe4141890da05 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 17 May 2016 10:39:10 +0200 Subject: [PATCH 220/424] Added quality type to setting stack CURA-1278 --- cura/MachineManagerModel.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 040625a159..08393ac829 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -13,10 +13,12 @@ class MachineManagerModel(QObject): ## When the global container is changed, active material probably needs to be updated. self.globalContainerChanged.connect(self.activeMaterialChanged) self.globalContainerChanged.connect(self.activeVariantChanged) + self.globalContainerChanged.connect(self.activeQualityChanged) Preferences.getInstance().addPreference("cura/active_machine", "") active_machine_id = Preferences.getInstance().getValue("cura/active_machine") + if active_machine_id != "": # An active machine was saved, so restore it. self.setActiveMachine(active_machine_id) @@ -26,6 +28,7 @@ class MachineManagerModel(QObject): globalContainerChanged = pyqtSignal() activeMaterialChanged = pyqtSignal() activeVariantChanged = pyqtSignal() + activeQualityChanged = pyqtSignal() def _onGlobalContainerChanged(self): Preferences.getInstance().setValue("cura/active_machine", Application.getInstance().getGlobalContainerStack().getId()) @@ -38,6 +41,8 @@ class MachineManagerModel(QObject): self.activeMaterialChanged.emit() elif container_type == "variant": self.activeVariantChanged.emit() + elif container_type == "quality": + self.activeQualityChanged.emit() @pyqtSlot(str) def setActiveMachine(self, stack_id): @@ -99,6 +104,18 @@ class MachineManagerModel(QObject): if material: return material.getId() + @pyqtProperty(str, notify=activeQualityChanged) + def activeQualityName(self): + quality = Application.getInstance().getGlobalContainerStack().findContainer({"type": "quality"}) + if quality: + return quality.getName() + + @pyqtProperty(str, notify=activeQualityChanged) + def activeQualityId(self): + quality = Application.getInstance().getGlobalContainerStack().findContainer({"type": "quality"}) + if quality: + return quality.getId() + @pyqtSlot(str) def setActiveMaterial(self, material_id): containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=material_id) From 59ec593db5632234de15876d662ab17aced33533 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 17 May 2016 10:49:06 +0200 Subject: [PATCH 221/424] Added way to change active quality CURA-1278 --- cura/MachineManagerModel.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 08393ac829..0109f5d261 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -70,6 +70,9 @@ class MachineManagerModel(QObject): quality_instance_container = UM.Settings.InstanceContainer(name + "_quality") UM.Settings.ContainerRegistry.getInstance().addContainer(material_instance_container) UM.Settings.ContainerRegistry.getInstance().addContainer(variant_instance_container) + UM.Settings.ContainerRegistry.getInstance().addContainer(quality_instance_container) + quality_instance_container.addMetaDataEntry("type", "quality") + quality_instance_container.setDefinition(definitions[0]) current_settings_instance_container = UM.Settings.InstanceContainer(name + "_current_settings") current_settings_instance_container.addMetaDataEntry("machine", name) @@ -80,6 +83,7 @@ class MachineManagerModel(QObject): new_global_stack.addContainer(definitions[0]) new_global_stack.addContainer(material_instance_container) new_global_stack.addContainer(variant_instance_container) + new_global_stack.addContainer(quality_instance_container) new_global_stack.addContainer(current_settings_instance_container) Application.getInstance().setGlobalContainerStack(new_global_stack) @@ -132,6 +136,14 @@ class MachineManagerModel(QObject): variant_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_variant) Application.getInstance().getGlobalContainerStack().replaceContainer(variant_index, containers[0]) + @pyqtSlot(str) + def setActiveQuality(self, quality_id): + containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = quality_id) + old_quality = Application.getInstance().getGlobalContainerStack().findContainer({"type": "quality"}) + if old_quality: + quality_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_quality) + Application.getInstance().getGlobalContainerStack().replaceContainer(quality_index, containers[0]) + @pyqtProperty(str, notify = activeVariantChanged) def activeVariantName(self): variant = Application.getInstance().getGlobalContainerStack().findContainer({"type": "variant"}) From 12fd002e67660d052482c6b9849c55b7e5b85b85 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 17 May 2016 10:50:01 +0200 Subject: [PATCH 222/424] Active quality is now displayed (and changable) again CURA-1278 --- resources/qml/ProfileSetup.qml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index 24668f43b0..95aed3685c 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -6,7 +6,8 @@ import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.1 import QtQuick.Layouts 1.1 -import UM 1.1 as UM +import UM 1.2 as UM +import Cura 1.0 as Cura Item{ id: base; @@ -41,13 +42,13 @@ Item{ property int rightMargin: customisedSettings.visible ? customisedSettings.width + UM.Theme.getSize("default_margin").width / 2 : 0 id: globalProfileSelection - text: UM.MachineManager.activeProfile + text: Cura.MachineManager.activeQualityName width: parent.width/100*55 height: UM.Theme.getSize("setting_control").height anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter - tooltip: UM.MachineManager.activeProfile + tooltip: Cura.MachineManager.activeQualityName style: UM.Theme.styles.sidebar_header_button menu: Menu @@ -56,7 +57,10 @@ Item{ Instantiator { id: profileSelectionInstantiator -// model: UM.ProfilesModel {} + model: UM.InstanceContainersModel + { + filter: {"type": "quality"} + } property int separatorIndex: -1 Loader { @@ -98,18 +102,18 @@ Item{ id: item text: model_data ? model_data.name : "" checkable: true; - checked: model_data ? model_data.active : false; + checked: Cura.MachineManager.activeQualityId == model_data.id exclusiveGroup: profileSelectionMenuGroup; onTriggered: { - UM.MachineManager.setActiveProfile(model_data.name); - if (!model_data.active) { + Cura.MachineManager.setActiveQuality(model_data.id); + /*if (!model_data.active) { //Selecting a profile was canceled; undo menu selection profileSelectionInstantiator.model.setProperty(model_index, "active", false); var activeProfileName = UM.MachineManager.activeProfile; var activeProfileIndex = profileSelectionInstantiator.model.find("name", activeProfileName); profileSelectionInstantiator.model.setProperty(activeProfileIndex, "active", true); - } + }*/ } } } From f24b56dc85d75dfd30fade67505d96fee0a1abdb Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 11:19:58 +0200 Subject: [PATCH 223/424] Move author and file formats to metadata The name can't be moved since it is not optional. Contributes to issue CURA-1278. --- resources/definitions/fdmprinter.def.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 00895fd056..11436bdcce 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1,15 +1,15 @@ { "id": "fdmprinter", + "name": "FDM Printer Base Description", "version": 2, "metadata": { + "author": "Ultimaker B.V.", "category": "Ultimaker", "manufacturer": "Ultimaker", + "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", "visible": false }, - "name": "FDM Printer Base Description", - "author": "Ultimaker B.V.", - "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", "settings": { "machine_settings": From 6d25d2112662b1c9df2f8a62f58a2ce5acbc6bcc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 17 May 2016 12:55:40 +0200 Subject: [PATCH 224/424] getting id of definition when none was found no longer causes exception CURA-1278 --- cura/MachineManagerModel.py | 9 ++++----- resources/qml/Cura.qml | 2 +- resources/qml/SidebarHeader.qml | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 0109f5d261..82c8cd1328 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -158,7 +158,10 @@ class MachineManagerModel(QObject): @pyqtProperty(str, notify = globalContainerChanged) def activeDefinitionId(self): - return Application.getInstance().getGlobalContainerStack().getBottom().id + definition = Application.getInstance().getGlobalContainerStack().getBottom() + if definition: + return definition.id + return None @pyqtSlot(str, str) def renameMachine(self, machine_id, new_name): @@ -166,10 +169,6 @@ class MachineManagerModel(QObject): if containers: containers[0].setName(new_name) - @pyqtProperty(str, notify=globalContainerChanged) - def activeMachineDefinitionId(self): - return Application.getInstance().getGlobalContainerStack().getContainers()[-1].getId() - @pyqtSlot(str) def removeMachine(self, machine_id): UM.Settings.ContainerRegistry.getInstance().removeContainer(machine_id) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 2d1fbe3305..ba42bdc051 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -198,7 +198,7 @@ UM.MainWindow filter: { "type": "variant", - "definition": Cura.MachineManager.activeMachineDefinitionId //Only show variants of this machine + "definition": Cura.MachineManager.activeDefinitionId //Only show variants of this machine } } MenuItem { diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index ff6db0703b..5284178ba7 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -149,7 +149,7 @@ Item filter: { "type": "variant", - "definition": Cura.MachineManager.activeMachineDefinitionId //Only show variants of this machine + "definition": Cura.MachineManager.activeDefinitionId //Only show variants of this machine } } MenuItem From 0e5dcca81d4fe3bcf7351ff006343d99b9e5adbb Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 11:46:25 +0200 Subject: [PATCH 225/424] Add definition for BQ Prusa i3 Hephestos Contributes to issue CURA-1278. --- resources/definitions/bq_hephestos.def.json | 88 +++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 resources/definitions/bq_hephestos.def.json diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json new file mode 100644 index 0000000000..22655a24f0 --- /dev/null +++ b/resources/definitions/bq_hephestos.def.json @@ -0,0 +1,88 @@ +{ + "id": "bq_hephestos", + "name": "BQ Prusa i3 Hephestos", + "version": 2, + "inherits": "fdmprinter", + "metadata": + { + "author": "BQ", + "manufacturer": "BQ", + "category": "Other", + "file_formats": "text/x-gcode" + }, + + "settings": { + "machine_start_gcode": { + "value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 215 + }, + "machine_depth": { + "value": 210 + }, + "machine_height": { + "value": 180 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [0, -82, 0] + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_thickness": { + "value": 1.0 + }, + "top_bottom_thickness": { + "value": 1.0 + }, + "bottom_thickness": { + "value": 1.0 + }, + "material_print_temperature": { + "value": 220 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 40.0 + }, + "speed_infill": { + "value": 40.0 + }, + "speed_wall": { + "value": 35.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "speed_travel": { + "value": 120.0 + }, + "speed_layer_0": { + "value": 20.0 + }, + "support_enable": { + "value": true + } + } +} \ No newline at end of file From b62e382cf2964e768082dff6f8b84e76a6eb5d34 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 11:52:28 +0200 Subject: [PATCH 226/424] Add platform for BQ Prusa i3 Hephestos Forgot this one when converting it. Contributes to issue CURA-1278. --- resources/definitions/bq_hephestos.def.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json index 22655a24f0..9958ef2b86 100644 --- a/resources/definitions/bq_hephestos.def.json +++ b/resources/definitions/bq_hephestos.def.json @@ -8,7 +8,8 @@ "author": "BQ", "manufacturer": "BQ", "category": "Other", - "file_formats": "text/x-gcode" + "file_formats": "text/x-gcode", + "platform": "bq_hephestos_platform.stl" }, "settings": { From 0b2b9bd332de6922c1b0219370ff6fa3d565f7f8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 11:55:56 +0200 Subject: [PATCH 227/424] Add definition for BQ Hephestos 2 Contributes to issue CURA-1278. --- resources/definitions/bq_hephestos_2.def.json | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 resources/definitions/bq_hephestos_2.def.json diff --git a/resources/definitions/bq_hephestos_2.def.json b/resources/definitions/bq_hephestos_2.def.json new file mode 100644 index 0000000000..cbaa41fb82 --- /dev/null +++ b/resources/definitions/bq_hephestos_2.def.json @@ -0,0 +1,117 @@ +{ + "id": "bq_hephestos_2", + "version": 1, + "name": "BQ Hephestos 2", + "inherits": "fdmprinter", + "metadata": { + "author": "BQ", + "manufacturer": "BQ", + "category": "Other", + "platform": "bq_hephestos_2_platform.stl", + "file_formats": "text/x-gcode" + }, + "manufacturer": "BQ", + "author": "BQ", + "platform": "bq_hephestos_2_platform.stl", + "file_formats": "text/x-gcode", + "inherits": "fdmprinter.json", + + "settings": { + "machine_start_gcode": { + "value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 210 + }, + "machine_depth": { + "value": 297 + }, + "machine_height": { + "value": 220 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [6, 1320, 0] + }, + "material_print_temperature": { + "value": 210.0 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_line_count": { + "value": 3 + }, + "wall_thickness": { + "value": 1.2 + }, + "top_bottom_thickness": { + "value": 1.2 + }, + "infill_sparse_density": { + "value": 20.0 + }, + "infill_overlap": { + "value": 15.0 + }, + "speed_print": { + "value": 60.0 + }, + "speed_travel": { + "value": 160.0 + }, + "speed_layer_0": { + "value": 30.0 + }, + "speed_wall_x": { + "value": 35.0 + }, + "speed_wall_0": { + "value": 30.0 + }, + "speed_infill": { + "value": 80.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "skirt_speed": { + "value": 35.0 + }, + "skirt_line_count": { + "value": 4 + }, + "skirt_minimal_length": { + "value": 30.0 + }, + "skirt_gap": { + "value": 6.0 + }, + "cool_fan_full_at_height": { + "value": 0.4 + }, + "support_enable": { + "value": false + } + } +} From 53c6ce11e708ed0c97b18a17c826935877d4b0e9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 11:57:31 +0200 Subject: [PATCH 228/424] Correct version number I should've changed this when converting the definition. Contributes to issue CURA-1278. --- resources/definitions/bq_hephestos_2.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/bq_hephestos_2.def.json b/resources/definitions/bq_hephestos_2.def.json index cbaa41fb82..2e084518ba 100644 --- a/resources/definitions/bq_hephestos_2.def.json +++ b/resources/definitions/bq_hephestos_2.def.json @@ -1,6 +1,6 @@ { "id": "bq_hephestos_2", - "version": 1, + "version": 2, "name": "BQ Hephestos 2", "inherits": "fdmprinter", "metadata": { From 6449062332e7204b81eefc3c128add8da7d6bc2e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 12:12:59 +0200 Subject: [PATCH 229/424] Add definition for BQ Prusa i3 Hephestos XL Contributes to issue CURA-1278. --- .../definitions/bq_hephestos_xl.def.json | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 resources/definitions/bq_hephestos_xl.def.json diff --git a/resources/definitions/bq_hephestos_xl.def.json b/resources/definitions/bq_hephestos_xl.def.json new file mode 100644 index 0000000000..c79227faea --- /dev/null +++ b/resources/definitions/bq_hephestos_xl.def.json @@ -0,0 +1,88 @@ +{ + "id": "bq_hephestos_xl", + "version": 2, + "name": "BQ Prusa i3 Hephestos XL", + "inherits": "fdmprinter", + "metadata": { + "manufacturer": "BQ", + "author": "BQ", + "category": "Other", + "file_formats": "text/x-code", + "platform": "bq_hephestos_platform.stl" + }, + + "settings": { + "machine_start_gcode": { + "default": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "default": 200 + }, + "machine_depth": { + "default": 300 + }, + "machine_height": { + "default": 180 + }, + "machine_heated_bed": { + "default": false + }, + "machine_center_is_zero": { + "default": false + }, + "machine_gcode_flavor": { + "default": "RepRap" + }, + "machine_platform_offset": { + "default": [0, -82, 0] + }, + "layer_height": { + "default": 0.2 + }, + "layer_height_0": { + "default": 0.2 + }, + "wall_thickness": { + "default": 1.0 + }, + "top_bottom_thickness": { + "default": 1.0 + }, + "bottom_thickness": { + "default": 1.0 + }, + "material_print_temperature": { + "default": 220 + }, + "material_bed_temperature": { + "default": 0 + }, + "material_diameter": { + "default": 1.75 + }, + "speed_print": { + "default": 40.0 + }, + "speed_infill": { + "default": 40.0 + }, + "speed_wall": { + "default": 35.0 + }, + "speed_topbottom": { + "default": 35.0 + }, + "speed_travel": { + "default": 120.0 + }, + "speed_layer_0": { + "default": 20.0 + }, + "support_enable": { + "default": true + } + } +} \ No newline at end of file From a16ff27ed69f3cf7318f3db529357b4b90058982 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 12:16:22 +0200 Subject: [PATCH 230/424] Fix definition 'default' -> 'value' Forgot that. Sorry. Contributes to issue CURA-1278. --- .../definitions/bq_hephestos_xl.def.json | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/resources/definitions/bq_hephestos_xl.def.json b/resources/definitions/bq_hephestos_xl.def.json index c79227faea..0d4bc13ea1 100644 --- a/resources/definitions/bq_hephestos_xl.def.json +++ b/resources/definitions/bq_hephestos_xl.def.json @@ -13,76 +13,76 @@ "settings": { "machine_start_gcode": { - "default": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + "value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" }, "machine_end_gcode": { - "default": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" + "value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" }, "machine_width": { - "default": 200 + "value": 200 }, "machine_depth": { - "default": 300 + "value": 300 }, "machine_height": { - "default": 180 + "value": 180 }, "machine_heated_bed": { - "default": false + "value": false }, "machine_center_is_zero": { - "default": false + "value": false }, "machine_gcode_flavor": { - "default": "RepRap" + "value": "RepRap" }, "machine_platform_offset": { - "default": [0, -82, 0] + "value": [0, -82, 0] }, "layer_height": { - "default": 0.2 + "value": 0.2 }, "layer_height_0": { - "default": 0.2 + "value": 0.2 }, "wall_thickness": { - "default": 1.0 + "value": 1.0 }, "top_bottom_thickness": { - "default": 1.0 + "value": 1.0 }, "bottom_thickness": { - "default": 1.0 + "value": 1.0 }, "material_print_temperature": { - "default": 220 + "value": 220 }, "material_bed_temperature": { - "default": 0 + "value": 0 }, "material_diameter": { - "default": 1.75 + "value": 1.75 }, "speed_print": { - "default": 40.0 + "value": 40.0 }, "speed_infill": { - "default": 40.0 + "value": 40.0 }, "speed_wall": { - "default": 35.0 + "value": 35.0 }, "speed_topbottom": { - "default": 35.0 + "value": 35.0 }, "speed_travel": { - "default": 120.0 + "value": 120.0 }, "speed_layer_0": { - "default": 20.0 + "value": 20.0 }, "support_enable": { - "default": true + "value": true } } } \ No newline at end of file From 1c01eef409c599f43f4d597f7893f3cef1693052 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 12:20:35 +0200 Subject: [PATCH 231/424] Add definition for BQ Witbox Contributes to issue CURA-1278. --- resources/definitions/bq_witbox.def.json | 87 ++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 resources/definitions/bq_witbox.def.json diff --git a/resources/definitions/bq_witbox.def.json b/resources/definitions/bq_witbox.def.json new file mode 100644 index 0000000000..dfa8eb5712 --- /dev/null +++ b/resources/definitions/bq_witbox.def.json @@ -0,0 +1,87 @@ +{ + "id": "bq_witbox", + "version": 2, + "name": "BQ Witbox", + "inherits": "fdmprinter", + "metadata": { + "author": "BQ", + "manufacturer": "BQ", + "category": "Other", + "file_formats": "text/x-gcode", + "platform": "bq_witbox_platform.stl" + }, + "settings": { + "machine_start_gcode": { + "value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG90 ;set to absolute positioning\nG1 Z200 ;move the platform to the bottom\nG28 X0 Y0 ;move to the X/Y origin (Home)\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 297 + }, + "machine_depth": { + "value": 210 + }, + "machine_height": { + "value": 200 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [0, -145, -38] + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_thickness": { + "value": 1 + }, + "top_bottom_thickness": { + "value": 1 + }, + "bottom_thickness": { + "value": 1 + }, + "material_print_temperature": { + "value": 220 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 40 + }, + "speed_infill": { + "value": 40 + }, + "speed_wall": { + "value": 35 + }, + "speed_topbottom": { + "value": 35 + }, + "speed_travel": { + "value": 120 + }, + "speed_layer_0": { + "value": 20 + }, + "support_enable": { + "value": true + } + } +} \ No newline at end of file From ffcfba2caa87b120af44c54721c5ffda3ef491c3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 17 May 2016 14:46:51 +0200 Subject: [PATCH 232/424] Cura now handles saving of instances & stacks This is done because Cura has a fundamentally different strategy for this than Uranium. CURA-1278 --- cura/CuraApplication.py | 59 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 5620d039c9..39a25c34ad 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -15,7 +15,7 @@ from UM.Mesh.ReadMeshJob import ReadMeshJob from UM.Logger import Logger from UM.Preferences import Preferences from UM.JobQueue import JobQueue - +from UM.SaveFile import SaveFile from UM.Scene.Selection import Selection from UM.Scene.GroupDecorator import GroupDecorator @@ -25,6 +25,7 @@ from UM.Operations.GroupedOperation import GroupedOperation from UM.Operations.SetTransformOperation import SetTransformOperation from UM.Settings.SettingDefinition import SettingDefinition +from UM.Settings.ContainerRegistry import ContainerRegistry from UM.i18n import i18nCatalog @@ -47,6 +48,7 @@ import sys import os.path import numpy import copy +import urllib numpy.seterr(all="ignore") #WORKAROUND: GITHUB-88 GITHUB-385 GITHUB-612 @@ -67,6 +69,12 @@ class CuraApplication(QtApplication): class ResourceTypes: QmlFiles = Resources.UserType + 1 Firmware = Resources.UserType + 2 + QualityInstanceContainer = Resources.UserType + 3 + MaterialInstanceContainer = Resources.UserType + 4 + VariantInstanceContainer = Resources.UserType + 5 + UserInstanceContainer = Resources.UserType + 6 + MachineStack = Resources.UserType + 7 + Q_ENUMS(ResourceTypes) def __init__(self): @@ -110,6 +118,23 @@ class CuraApplication(QtApplication): Resources.addType(self.ResourceTypes.QmlFiles, "qml") Resources.addType(self.ResourceTypes.Firmware, "firmware") + SettingDefinition.addSupportedProperty("global_only", "bool") + + ## Add the 4 types of profiles to storage. + Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") + Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants") + Resources.addStorageType(self.ResourceTypes.MaterialInstanceContainer, "materials") + Resources.addStorageType(self.ResourceTypes.UserInstanceContainer, "user") + Resources.addStorageType(self.ResourceTypes.MachineStack, "machine_instances") + + ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.QualityInstanceContainer) + ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.VariantInstanceContainer) + ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.MaterialInstanceContainer) + ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.UserInstanceContainer) + ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.MachineStack) + + ContainerRegistry.getInstance().load() + Preferences.getInstance().addPreference("cura/active_mode", "simple") Preferences.getInstance().addPreference("cura/recent_files", "") Preferences.getInstance().addPreference("cura/categories_expanded", "") @@ -152,6 +177,8 @@ class CuraApplication(QtApplication): JobQueue.getInstance().jobFinished.connect(self._onJobFinished) + self.applicationShuttingDown.connect(self._onExit) + self._recent_files = [] files = Preferences.getInstance().getValue("cura/recent_files").split(";") for f in files: @@ -160,6 +187,34 @@ class CuraApplication(QtApplication): self._recent_files.append(QUrl.fromLocalFile(f)) + ## Cura has multiple locations where instance containers need to be saved, so we need to handle this differently. + def _onExit(self): + for instance in ContainerRegistry.getInstance().findInstanceContainers(): + data = instance.serialize() + file_name = urllib.parse.quote_plus(instance.getId()) + ".inst.cfg" + instance_type = instance.getMetaDataEntry("type") + path = None + if instance_type == "material": + path = Resources.getStoragePath(self.ResourceTypes.MaterialInstanceContainer, file_name) + elif instance_type == "quality": + path = Resources.getStoragePath(self.ResourceTypes.QualityInstanceContainer, file_name) + elif instance_type == "user": + path = Resources.getStoragePath(self.ResourceTypes.UserInstanceContainer, file_name) + elif instance_type == "variant": + path = Resources.getStoragePath(self.ResourceTypes.VariantInstanceContainer, file_name) + + if path: + with SaveFile(path, "wt", -1, "utf-8") as f: + f.write(data) + + for stack in ContainerRegistry.getInstance().findContainerStacks(): + data = stack.serialize() + file_name = urllib.parse.quote_plus(stack.getId()) + ".stack.cfg" + path = Resources.getStoragePath(self.ResourceTypes.MachineStack, file_name) + with SaveFile(path, "wt", -1, "utf-8") as f: + f.write(data) + + @pyqtSlot(result = QUrl) def getDefaultPath(self): return QUrl.fromLocalFile(os.path.expanduser("~/")) @@ -195,8 +250,6 @@ class CuraApplication(QtApplication): self.showSplashMessage(self._i18n_catalog.i18nc("@info:progress", "Setting up scene...")) - SettingDefinition.addSupportedProperty("global_only", "bool") - controller = self.getController() controller.setActiveView("SolidView") From c4c6be7c34e4d95129fb0e4645a8642b3bbe630c Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 17 May 2016 14:56:05 +0200 Subject: [PATCH 233/424] Improve code legibility CURA-1543 --- cura/CuraApplication.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 28a19a7718..de922d1984 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -557,11 +557,7 @@ class CuraApplication(QtApplication): group_node.setCenterPosition(center) # Move selected nodes into the group-node - op = GroupedOperation() - nodes = Selection.getAllSelectedObjects() - for node in nodes: - op.addOperation(SetParentOperation(node, group_node)) - op.push() + Selection.applyOperation(SetParentOperation, group_node) # Deselect individual nodes and select the group-node instead for node in group_node.getChildren(): @@ -570,13 +566,13 @@ class CuraApplication(QtApplication): @pyqtSlot() def ungroupSelected(self): - selected_objects = Selection.getAllSelectedObjects()[:] # clone the list + selected_objects = Selection.getAllSelectedObjects().copy() for node in selected_objects: if node.callDecoration("isGroup"): op = GroupedOperation() group_parent = node.getParent() - children = node.getChildren()[:] # clone the list + children = node.getChildren().copy() for child in children: # Set the parent of the children to the parent of the group-node op.addOperation(SetParentOperation(child, group_parent)) From f66f0658d9bd7305cdcb805dea7fdced02c78554 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 17 May 2016 15:45:21 +0200 Subject: [PATCH 234/424] Fixed mistakes in the definitions CURA-1278 --- resources/definitions/bq_hephestos.def.json | 150 ++++++------- resources/definitions/bq_hephestos_2.def.json | 199 +++++++++--------- .../definitions/bq_hephestos_xl.def.json | 151 ++++++------- resources/definitions/bq_witbox.def.json | 150 ++++++------- 4 files changed, 336 insertions(+), 314 deletions(-) diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json index 9958ef2b86..3b5b68c021 100644 --- a/resources/definitions/bq_hephestos.def.json +++ b/resources/definitions/bq_hephestos.def.json @@ -12,78 +12,84 @@ "platform": "bq_hephestos_platform.stl" }, - "settings": { - "machine_start_gcode": { - "value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "value": 215 - }, - "machine_depth": { - "value": 210 - }, - "machine_height": { - "value": 180 - }, - "machine_heated_bed": { - "value": false - }, - "machine_center_is_zero": { - "value": false - }, - "machine_gcode_flavor": { - "value": "RepRap" - }, - "machine_platform_offset": { - "value": [0, -82, 0] - }, - "layer_height": { - "value": 0.2 - }, - "layer_height_0": { - "value": 0.2 - }, - "wall_thickness": { - "value": 1.0 - }, - "top_bottom_thickness": { - "value": 1.0 - }, - "bottom_thickness": { - "value": 1.0 - }, - "material_print_temperature": { - "value": 220 - }, - "material_bed_temperature": { - "value": 0 - }, - "material_diameter": { - "value": 1.75 - }, - "speed_print": { - "value": 40.0 - }, - "speed_infill": { - "value": 40.0 - }, - "speed_wall": { - "value": 35.0 - }, - "speed_topbottom": { - "value": 35.0 - }, - "speed_travel": { - "value": 120.0 - }, - "speed_layer_0": { - "value": 20.0 - }, - "support_enable": { - "value": true + "overrides": { + "settings": { + "machine_start_gcode": { + "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 215 + }, + "machine_depth": { + "value": 210 + }, + "machine_height": { + "value": 180 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [ + 0, + -82, + 0 + ] + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_thickness": { + "value": 1.0 + }, + "top_bottom_thickness": { + "value": 1.0 + }, + "bottom_thickness": { + "value": 1.0 + }, + "material_print_temperature": { + "value": 220 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 40.0 + }, + "speed_infill": { + "value": 40.0 + }, + "speed_wall": { + "value": 35.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "speed_travel": { + "value": 120.0 + }, + "speed_layer_0": { + "value": 20.0 + }, + "support_enable": { + "value": true + } } } } \ No newline at end of file diff --git a/resources/definitions/bq_hephestos_2.def.json b/resources/definitions/bq_hephestos_2.def.json index 2e084518ba..3e9b640586 100644 --- a/resources/definitions/bq_hephestos_2.def.json +++ b/resources/definitions/bq_hephestos_2.def.json @@ -14,104 +14,109 @@ "author": "BQ", "platform": "bq_hephestos_2_platform.stl", "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - "settings": { - "machine_start_gcode": { - "value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" - }, - "machine_width": { - "value": 210 - }, - "machine_depth": { - "value": 297 - }, - "machine_height": { - "value": 220 - }, - "machine_heated_bed": { - "value": false - }, - "machine_center_is_zero": { - "value": false - }, - "machine_gcode_flavor": { - "value": "RepRap" - }, - "machine_platform_offset": { - "value": [6, 1320, 0] - }, - "material_print_temperature": { - "value": 210.0 - }, - "material_bed_temperature": { - "value": 0 - }, - "material_diameter": { - "value": 1.75 - }, - "layer_height": { - "value": 0.2 - }, - "layer_height_0": { - "value": 0.2 - }, - "wall_line_count": { - "value": 3 - }, - "wall_thickness": { - "value": 1.2 - }, - "top_bottom_thickness": { - "value": 1.2 - }, - "infill_sparse_density": { - "value": 20.0 - }, - "infill_overlap": { - "value": 15.0 - }, - "speed_print": { - "value": 60.0 - }, - "speed_travel": { - "value": 160.0 - }, - "speed_layer_0": { - "value": 30.0 - }, - "speed_wall_x": { - "value": 35.0 - }, - "speed_wall_0": { - "value": 30.0 - }, - "speed_infill": { - "value": 80.0 - }, - "speed_topbottom": { - "value": 35.0 - }, - "skirt_speed": { - "value": 35.0 - }, - "skirt_line_count": { - "value": 4 - }, - "skirt_minimal_length": { - "value": 30.0 - }, - "skirt_gap": { - "value": 6.0 - }, - "cool_fan_full_at_height": { - "value": 0.4 - }, - "support_enable": { - "value": false + "overrides": { + "settings": { + "machine_start_gcode": { + "default_value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default_value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 210 + }, + "machine_depth": { + "value": 297 + }, + "machine_height": { + "value": 220 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [ + 6, + 1320, + 0 + ] + }, + "material_print_temperature": { + "value": 210.0 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_line_count": { + "value": 3 + }, + "wall_thickness": { + "value": 1.2 + }, + "top_bottom_thickness": { + "value": 1.2 + }, + "infill_sparse_density": { + "value": 20.0 + }, + "infill_overlap": { + "value": 15.0 + }, + "speed_print": { + "value": 60.0 + }, + "speed_travel": { + "value": 160.0 + }, + "speed_layer_0": { + "value": 30.0 + }, + "speed_wall_x": { + "value": 35.0 + }, + "speed_wall_0": { + "value": 30.0 + }, + "speed_infill": { + "value": 80.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "skirt_speed": { + "value": 35.0 + }, + "skirt_line_count": { + "value": 4 + }, + "skirt_minimal_length": { + "value": 30.0 + }, + "skirt_gap": { + "value": 6.0 + }, + "cool_fan_full_at_height": { + "value": 0.4 + }, + "support_enable": { + "value": false + } } } } diff --git a/resources/definitions/bq_hephestos_xl.def.json b/resources/definitions/bq_hephestos_xl.def.json index 0d4bc13ea1..d810c49ea5 100644 --- a/resources/definitions/bq_hephestos_xl.def.json +++ b/resources/definitions/bq_hephestos_xl.def.json @@ -10,79 +10,84 @@ "file_formats": "text/x-code", "platform": "bq_hephestos_platform.stl" }, - - "settings": { - "machine_start_gcode": { - "value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "value": 200 - }, - "machine_depth": { - "value": 300 - }, - "machine_height": { - "value": 180 - }, - "machine_heated_bed": { - "value": false - }, - "machine_center_is_zero": { - "value": false - }, - "machine_gcode_flavor": { - "value": "RepRap" - }, - "machine_platform_offset": { - "value": [0, -82, 0] - }, - "layer_height": { - "value": 0.2 - }, - "layer_height_0": { - "value": 0.2 - }, - "wall_thickness": { - "value": 1.0 - }, - "top_bottom_thickness": { - "value": 1.0 - }, - "bottom_thickness": { - "value": 1.0 - }, - "material_print_temperature": { - "value": 220 - }, - "material_bed_temperature": { - "value": 0 - }, - "material_diameter": { - "value": 1.75 - }, - "speed_print": { - "value": 40.0 - }, - "speed_infill": { - "value": 40.0 - }, - "speed_wall": { - "value": 35.0 - }, - "speed_topbottom": { - "value": 35.0 - }, - "speed_travel": { - "value": 120.0 - }, - "speed_layer_0": { - "value": 20.0 - }, - "support_enable": { - "value": true + "overrides": { + "settings": { + "machine_start_gcode": { + "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 200 + }, + "machine_depth": { + "value": 300 + }, + "machine_height": { + "value": 180 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [ + 0, + -82, + 0 + ] + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_thickness": { + "value": 1.0 + }, + "top_bottom_thickness": { + "value": 1.0 + }, + "bottom_thickness": { + "value": 1.0 + }, + "material_print_temperature": { + "value": 220 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 40.0 + }, + "speed_infill": { + "value": 40.0 + }, + "speed_wall": { + "value": 35.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "speed_travel": { + "value": 120.0 + }, + "speed_layer_0": { + "value": 20.0 + }, + "support_enable": { + "value": true + } } } } \ No newline at end of file diff --git a/resources/definitions/bq_witbox.def.json b/resources/definitions/bq_witbox.def.json index dfa8eb5712..15ab9318ef 100644 --- a/resources/definitions/bq_witbox.def.json +++ b/resources/definitions/bq_witbox.def.json @@ -10,78 +10,84 @@ "file_formats": "text/x-gcode", "platform": "bq_witbox_platform.stl" }, - "settings": { - "machine_start_gcode": { - "value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG90 ;set to absolute positioning\nG1 Z200 ;move the platform to the bottom\nG28 X0 Y0 ;move to the X/Y origin (Home)\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "value": 297 - }, - "machine_depth": { - "value": 210 - }, - "machine_height": { - "value": 200 - }, - "machine_heated_bed": { - "value": false - }, - "machine_center_is_zero": { - "value": false - }, - "machine_gcode_flavor": { - "value": "RepRap" - }, - "machine_platform_offset": { - "value": [0, -145, -38] - }, - "layer_height": { - "value": 0.2 - }, - "layer_height_0": { - "value": 0.2 - }, - "wall_thickness": { - "value": 1 - }, - "top_bottom_thickness": { - "value": 1 - }, - "bottom_thickness": { - "value": 1 - }, - "material_print_temperature": { - "value": 220 - }, - "material_bed_temperature": { - "value": 0 - }, - "material_diameter": { - "value": 1.75 - }, - "speed_print": { - "value": 40 - }, - "speed_infill": { - "value": 40 - }, - "speed_wall": { - "value": 35 - }, - "speed_topbottom": { - "value": 35 - }, - "speed_travel": { - "value": 120 - }, - "speed_layer_0": { - "value": 20 - }, - "support_enable": { - "value": true + "overrides": { + "settings": { + "machine_start_gcode": { + "value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG90 ;set to absolute positioning\nG1 Z200 ;move the platform to the bottom\nG28 X0 Y0 ;move to the X/Y origin (Home)\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 297 + }, + "machine_depth": { + "value": 210 + }, + "machine_height": { + "value": 200 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [ + 0, + -145, + -38 + ] + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_thickness": { + "value": 1 + }, + "top_bottom_thickness": { + "value": 1 + }, + "bottom_thickness": { + "value": 1 + }, + "material_print_temperature": { + "value": 220 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 40 + }, + "speed_infill": { + "value": 40 + }, + "speed_wall": { + "value": 35 + }, + "speed_topbottom": { + "value": 35 + }, + "speed_travel": { + "value": 120 + }, + "speed_layer_0": { + "value": 20 + }, + "support_enable": { + "value": true + } } } } \ No newline at end of file From 5c1210dddf545aaa153c45d11791a61cf1892c6b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 17 May 2016 16:39:10 +0200 Subject: [PATCH 235/424] Removed settings subobject in overrides CURA-1278 --- resources/definitions/bq_hephestos.def.json | 152 +++++++------ resources/definitions/bq_hephestos_2.def.json | 200 +++++++++--------- .../definitions/bq_hephestos_xl.def.json | 152 +++++++------ resources/definitions/bq_witbox.def.json | 153 +++++++------- 4 files changed, 325 insertions(+), 332 deletions(-) diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json index 3b5b68c021..45bf520a14 100644 --- a/resources/definitions/bq_hephestos.def.json +++ b/resources/definitions/bq_hephestos.def.json @@ -13,83 +13,81 @@ }, "overrides": { - "settings": { - "machine_start_gcode": { - "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "value": 215 - }, - "machine_depth": { - "value": 210 - }, - "machine_height": { - "value": 180 - }, - "machine_heated_bed": { - "value": false - }, - "machine_center_is_zero": { - "value": false - }, - "machine_gcode_flavor": { - "value": "RepRap" - }, - "machine_platform_offset": { - "value": [ - 0, - -82, - 0 - ] - }, - "layer_height": { - "value": 0.2 - }, - "layer_height_0": { - "value": 0.2 - }, - "wall_thickness": { - "value": 1.0 - }, - "top_bottom_thickness": { - "value": 1.0 - }, - "bottom_thickness": { - "value": 1.0 - }, - "material_print_temperature": { - "value": 220 - }, - "material_bed_temperature": { - "value": 0 - }, - "material_diameter": { - "value": 1.75 - }, - "speed_print": { - "value": 40.0 - }, - "speed_infill": { - "value": 40.0 - }, - "speed_wall": { - "value": 35.0 - }, - "speed_topbottom": { - "value": 35.0 - }, - "speed_travel": { - "value": 120.0 - }, - "speed_layer_0": { - "value": 20.0 - }, - "support_enable": { - "value": true - } + "machine_start_gcode": { + "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 215 + }, + "machine_depth": { + "value": 210 + }, + "machine_height": { + "value": 180 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [ + 0, + -82, + 0 + ] + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_thickness": { + "value": 1.0 + }, + "top_bottom_thickness": { + "value": 1.0 + }, + "bottom_thickness": { + "value": 1.0 + }, + "material_print_temperature": { + "value": 220 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 40.0 + }, + "speed_infill": { + "value": 40.0 + }, + "speed_wall": { + "value": 35.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "speed_travel": { + "value": 120.0 + }, + "speed_layer_0": { + "value": 20.0 + }, + "support_enable": { + "value": true } } } \ No newline at end of file diff --git a/resources/definitions/bq_hephestos_2.def.json b/resources/definitions/bq_hephestos_2.def.json index 3e9b640586..7f92e081ff 100644 --- a/resources/definitions/bq_hephestos_2.def.json +++ b/resources/definitions/bq_hephestos_2.def.json @@ -16,107 +16,105 @@ "file_formats": "text/x-gcode", "overrides": { - "settings": { - "machine_start_gcode": { - "default_value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "default_value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" - }, - "machine_width": { - "value": 210 - }, - "machine_depth": { - "value": 297 - }, - "machine_height": { - "value": 220 - }, - "machine_heated_bed": { - "value": false - }, - "machine_center_is_zero": { - "value": false - }, - "machine_gcode_flavor": { - "value": "RepRap" - }, - "machine_platform_offset": { - "value": [ - 6, - 1320, - 0 - ] - }, - "material_print_temperature": { - "value": 210.0 - }, - "material_bed_temperature": { - "value": 0 - }, - "material_diameter": { - "value": 1.75 - }, - "layer_height": { - "value": 0.2 - }, - "layer_height_0": { - "value": 0.2 - }, - "wall_line_count": { - "value": 3 - }, - "wall_thickness": { - "value": 1.2 - }, - "top_bottom_thickness": { - "value": 1.2 - }, - "infill_sparse_density": { - "value": 20.0 - }, - "infill_overlap": { - "value": 15.0 - }, - "speed_print": { - "value": 60.0 - }, - "speed_travel": { - "value": 160.0 - }, - "speed_layer_0": { - "value": 30.0 - }, - "speed_wall_x": { - "value": 35.0 - }, - "speed_wall_0": { - "value": 30.0 - }, - "speed_infill": { - "value": 80.0 - }, - "speed_topbottom": { - "value": 35.0 - }, - "skirt_speed": { - "value": 35.0 - }, - "skirt_line_count": { - "value": 4 - }, - "skirt_minimal_length": { - "value": 30.0 - }, - "skirt_gap": { - "value": 6.0 - }, - "cool_fan_full_at_height": { - "value": 0.4 - }, - "support_enable": { - "value": false - } + "machine_start_gcode": { + "default_value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default_value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 210 + }, + "machine_depth": { + "value": 297 + }, + "machine_height": { + "value": 220 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [ + 6, + 1320, + 0 + ] + }, + "material_print_temperature": { + "value": 210.0 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_line_count": { + "value": 3 + }, + "wall_thickness": { + "value": 1.2 + }, + "top_bottom_thickness": { + "value": 1.2 + }, + "infill_sparse_density": { + "value": 20.0 + }, + "infill_overlap": { + "value": 15.0 + }, + "speed_print": { + "value": 60.0 + }, + "speed_travel": { + "value": 160.0 + }, + "speed_layer_0": { + "value": 30.0 + }, + "speed_wall_x": { + "value": 35.0 + }, + "speed_wall_0": { + "value": 30.0 + }, + "speed_infill": { + "value": 80.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "skirt_speed": { + "value": 35.0 + }, + "skirt_line_count": { + "value": 4 + }, + "skirt_minimal_length": { + "value": 30.0 + }, + "skirt_gap": { + "value": 6.0 + }, + "cool_fan_full_at_height": { + "value": 0.4 + }, + "support_enable": { + "value": false } } } diff --git a/resources/definitions/bq_hephestos_xl.def.json b/resources/definitions/bq_hephestos_xl.def.json index d810c49ea5..a0d8caa62e 100644 --- a/resources/definitions/bq_hephestos_xl.def.json +++ b/resources/definitions/bq_hephestos_xl.def.json @@ -11,83 +11,81 @@ "platform": "bq_hephestos_platform.stl" }, "overrides": { - "settings": { - "machine_start_gcode": { - "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "value": 200 - }, - "machine_depth": { - "value": 300 - }, - "machine_height": { - "value": 180 - }, - "machine_heated_bed": { - "value": false - }, - "machine_center_is_zero": { - "value": false - }, - "machine_gcode_flavor": { - "value": "RepRap" - }, - "machine_platform_offset": { - "value": [ - 0, - -82, - 0 - ] - }, - "layer_height": { - "value": 0.2 - }, - "layer_height_0": { - "value": 0.2 - }, - "wall_thickness": { - "value": 1.0 - }, - "top_bottom_thickness": { - "value": 1.0 - }, - "bottom_thickness": { - "value": 1.0 - }, - "material_print_temperature": { - "value": 220 - }, - "material_bed_temperature": { - "value": 0 - }, - "material_diameter": { - "value": 1.75 - }, - "speed_print": { - "value": 40.0 - }, - "speed_infill": { - "value": 40.0 - }, - "speed_wall": { - "value": 35.0 - }, - "speed_topbottom": { - "value": 35.0 - }, - "speed_travel": { - "value": 120.0 - }, - "speed_layer_0": { - "value": 20.0 - }, - "support_enable": { - "value": true - } + "machine_start_gcode": { + "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 200 + }, + "machine_depth": { + "value": 300 + }, + "machine_height": { + "value": 180 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [ + 0, + -82, + 0 + ] + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_thickness": { + "value": 1.0 + }, + "top_bottom_thickness": { + "value": 1.0 + }, + "bottom_thickness": { + "value": 1.0 + }, + "material_print_temperature": { + "value": 220 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 40.0 + }, + "speed_infill": { + "value": 40.0 + }, + "speed_wall": { + "value": 35.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "speed_travel": { + "value": 120.0 + }, + "speed_layer_0": { + "value": 20.0 + }, + "support_enable": { + "value": true } } } \ No newline at end of file diff --git a/resources/definitions/bq_witbox.def.json b/resources/definitions/bq_witbox.def.json index 15ab9318ef..e0d8bf774e 100644 --- a/resources/definitions/bq_witbox.def.json +++ b/resources/definitions/bq_witbox.def.json @@ -11,83 +11,82 @@ "platform": "bq_witbox_platform.stl" }, "overrides": { - "settings": { - "machine_start_gcode": { - "value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG90 ;set to absolute positioning\nG1 Z200 ;move the platform to the bottom\nG28 X0 Y0 ;move to the X/Y origin (Home)\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "value": 297 - }, - "machine_depth": { - "value": 210 - }, - "machine_height": { - "value": 200 - }, - "machine_heated_bed": { - "value": false - }, - "machine_center_is_zero": { - "value": false - }, - "machine_gcode_flavor": { - "value": "RepRap" - }, - "machine_platform_offset": { - "value": [ - 0, - -145, - -38 - ] - }, - "layer_height": { - "value": 0.2 - }, - "layer_height_0": { - "value": 0.2 - }, - "wall_thickness": { - "value": 1 - }, - "top_bottom_thickness": { - "value": 1 - }, - "bottom_thickness": { - "value": 1 - }, - "material_print_temperature": { - "value": 220 - }, - "material_bed_temperature": { - "value": 0 - }, - "material_diameter": { - "value": 1.75 - }, - "speed_print": { - "value": 40 - }, - "speed_infill": { - "value": 40 - }, - "speed_wall": { - "value": 35 - }, - "speed_topbottom": { - "value": 35 - }, - "speed_travel": { - "value": 120 - }, - "speed_layer_0": { - "value": 20 - }, - "support_enable": { - "value": true - } + "machine_start_gcode": { + "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG90 ;set to absolute positioning\nG1 Z200 ;move the platform to the bottom\nG28 X0 Y0 ;move to the X/Y origin (Home)\nM84 ;turn off steppers\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 297 + }, + "machine_depth": { + "value": 210 + }, + "machine_height": { + "value": 200 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [ + 0, + -145, + -38 + ] + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_thickness": { + "value": 1 + }, + "top_bottom_thickness": { + "value": 1 + }, + "bottom_thickness": { + "value": 1 + }, + "material_print_temperature": { + "value": 220 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 40 + }, + "speed_infill": { + "value": 40 + }, + "speed_wall": { + "value": 35 + }, + "speed_topbottom": { + "value": 35 + }, + "speed_travel": { + "value": 120 + }, + "speed_layer_0": { + "value": 20 + }, + "support_enable": { + "value": true } + } } \ No newline at end of file From a2862d8c24001c419ab834a9b5089d871d97946f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 17 May 2016 16:49:59 +0200 Subject: [PATCH 236/424] Moved offset to meta-data CURA-1278 --- resources/definitions/bq_hephestos.def.json | 16 ++++++++-------- resources/definitions/bq_hephestos_2.def.json | 14 +++++++------- resources/definitions/bq_hephestos_xl.def.json | 16 ++++++++-------- resources/definitions/bq_witbox.def.json | 16 ++++++++-------- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json index 45bf520a14..57fa85ab89 100644 --- a/resources/definitions/bq_hephestos.def.json +++ b/resources/definitions/bq_hephestos.def.json @@ -9,7 +9,14 @@ "manufacturer": "BQ", "category": "Other", "file_formats": "text/x-gcode", - "platform": "bq_hephestos_platform.stl" + "platform": "bq_hephestos_platform.stl", + "platform_offset": { + "value": [ + 0, + -82, + 0 + ] + } }, "overrides": { @@ -37,13 +44,6 @@ "machine_gcode_flavor": { "value": "RepRap" }, - "machine_platform_offset": { - "value": [ - 0, - -82, - 0 - ] - }, "layer_height": { "value": 0.2 }, diff --git a/resources/definitions/bq_hephestos_2.def.json b/resources/definitions/bq_hephestos_2.def.json index 7f92e081ff..dba849ac7e 100644 --- a/resources/definitions/bq_hephestos_2.def.json +++ b/resources/definitions/bq_hephestos_2.def.json @@ -8,6 +8,13 @@ "manufacturer": "BQ", "category": "Other", "platform": "bq_hephestos_2_platform.stl", + "platform_offset": { + "value": [ + 6, + 1320, + 0 + ] + }, "file_formats": "text/x-gcode" }, "manufacturer": "BQ", @@ -40,13 +47,6 @@ "machine_gcode_flavor": { "value": "RepRap" }, - "machine_platform_offset": { - "value": [ - 6, - 1320, - 0 - ] - }, "material_print_temperature": { "value": 210.0 }, diff --git a/resources/definitions/bq_hephestos_xl.def.json b/resources/definitions/bq_hephestos_xl.def.json index a0d8caa62e..6d4c7fdd52 100644 --- a/resources/definitions/bq_hephestos_xl.def.json +++ b/resources/definitions/bq_hephestos_xl.def.json @@ -8,7 +8,14 @@ "author": "BQ", "category": "Other", "file_formats": "text/x-code", - "platform": "bq_hephestos_platform.stl" + "platform": "bq_hephestos_platform.stl", + "platform_offset": { + "value": [ + 0, + -82, + 0 + ] + } }, "overrides": { "machine_start_gcode": { @@ -35,13 +42,6 @@ "machine_gcode_flavor": { "value": "RepRap" }, - "machine_platform_offset": { - "value": [ - 0, - -82, - 0 - ] - }, "layer_height": { "value": 0.2 }, diff --git a/resources/definitions/bq_witbox.def.json b/resources/definitions/bq_witbox.def.json index e0d8bf774e..d9529cdae6 100644 --- a/resources/definitions/bq_witbox.def.json +++ b/resources/definitions/bq_witbox.def.json @@ -8,7 +8,14 @@ "manufacturer": "BQ", "category": "Other", "file_formats": "text/x-gcode", - "platform": "bq_witbox_platform.stl" + "platform": "bq_witbox_platform.stl", + "platform_offset": { + "value": [ + 0, + -145, + -38 + ] + } }, "overrides": { "machine_start_gcode": { @@ -35,13 +42,6 @@ "machine_gcode_flavor": { "value": "RepRap" }, - "machine_platform_offset": { - "value": [ - 0, - -145, - -38 - ] - }, "layer_height": { "value": 0.2 }, From 20c7ce404de14e838f6418bcaad12ba548aa2734 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 13:43:34 +0200 Subject: [PATCH 237/424] Add definition for BQ Witbox 2 Contributes to issue CURA-1278. --- resources/definitions/bq_witbox_2.def.json | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 resources/definitions/bq_witbox_2.def.json diff --git a/resources/definitions/bq_witbox_2.def.json b/resources/definitions/bq_witbox_2.def.json new file mode 100644 index 0000000000..43e6968aba --- /dev/null +++ b/resources/definitions/bq_witbox_2.def.json @@ -0,0 +1,113 @@ +{ + "id": "bq_witbox_2", + "version": 2, + "name": "BQ Witbox 2", + "inherits": "fdmprinter", + "metadata": + { + "author": "BQ", + "manufacturer": "BQ", + "category": "Other", + "file_formats": "text/x-gcode", + "platform": "bq_witbox_platform.stl" + }, + + "settings": { + "machine_start_gcode": { + "value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" + }, + "machine_width": { + "value": 297 + }, + "machine_depth": { + "value": 210 + }, + "machine_height": { + "value": 200 + }, + "machine_heated_bed": { + "value": false + }, + "machine_center_is_zero": { + "value": false + }, + "machine_gcode_flavor": { + "value": "RepRap" + }, + "machine_platform_offset": { + "value": [0, -145, -38] + }, + "material_print_temperature": { + "value": 210.0 + }, + "material_bed_temperature": { + "value": 0 + }, + "material_diameter": { + "value": 1.75 + }, + "layer_height": { + "value": 0.2 + }, + "layer_height_0": { + "value": 0.2 + }, + "wall_line_count": { + "value": 3 + }, + "wall_thickness": { + "value": 1.2 + }, + "top_bottom_thickness": { + "value": 1.2 + }, + "infill_sparse_density": { + "value": 20.0 + }, + "infill_overlap": { + "value": 15.0 + }, + "speed_print": { + "value": 60.0 + }, + "speed_travel": { + "value": 160.0 + }, + "speed_layer_0": { + "value": 30.0 + }, + "speed_wall_x": { + "value": 35.0 + }, + "speed_wall_0": { + "value": 30.0 + }, + "speed_infill": { + "value": 80.0 + }, + "speed_topbottom": { + "value": 35.0 + }, + "skirt_speed": { + "value": 35.0 + }, + "skirt_line_count": { + "value": 4 + }, + "skirt_minimal_length": { + "value": 30.0 + }, + "skirt_gap": { + "value": 6.0 + }, + "cool_fan_full_at_height": { + "value": 0.4 + }, + "support_enable": { + "value": false + } + } +} \ No newline at end of file From f0e99122c7f98ca700c6965ee81d5f945e00f3fc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 13:57:07 +0200 Subject: [PATCH 238/424] Add definition for German RepRap Neo Contributes to issue CURA-1278. --- resources/definitions/grr_neo.def.json | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 resources/definitions/grr_neo.def.json diff --git a/resources/definitions/grr_neo.def.json b/resources/definitions/grr_neo.def.json new file mode 100644 index 0000000000..710303383b --- /dev/null +++ b/resources/definitions/grr_neo.def.json @@ -0,0 +1,62 @@ +{ + "id": "grr_neo", + "version": 2, + "name": "German RepRap Neo", + "inherits": "fdmprinter", + "metadata": { + "author": "Simon Cor", + "manufacturer": "German RepRap", + "category": "Other", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker.png", + "platform": "grr_neo_platform.stl" + }, + + "overrides": { + "machine_width": { + "value": 150 + }, + "machine_height": { + "value": 150 + }, + "machine_depth": { + "value": 150 + }, + "machine_center_is_zero": { + "value": false + }, + "machine_nozzle_size": { + "value": 0.5 + }, + "machine_nozzle_heat_up_speed": { + "value": 2 + }, + "machine_nozzle_cool_down_speed": { + "value": 2 + }, + "machine_head_shape_min_x": { + "value": 75 + }, + "machine_head_shape_min_y": { + "value": 18 + }, + "machine_head_shape_max_x": { + "value": 18 + }, + "machine_head_shape_max_y": { + "value": 35 + }, + "machine_nozzle_gantry_distance": { + "value": 55 + }, + "machine_gcode_flavor": { + "value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + }, + "machine_end_gcode": { + "value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + } + } +} \ No newline at end of file From fea09482b58418c0699187ffd37c83cfde2a19b5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 14:39:28 +0200 Subject: [PATCH 239/424] Translate definition for Innovo INVENTOR Contributes to issue CURA-1278. --- .../definitions/innovo_inventor.def.json | 103 ++++++++++++++++++ resources/machines/innovo-inventor.json | 44 -------- 2 files changed, 103 insertions(+), 44 deletions(-) create mode 100644 resources/definitions/innovo_inventor.def.json delete mode 100644 resources/machines/innovo-inventor.json diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json new file mode 100644 index 0000000000..30e5a53094 --- /dev/null +++ b/resources/definitions/innovo_inventor.def.json @@ -0,0 +1,103 @@ +{ + "id": "innovo-inventor", + "version": 2, + "name": "Innovo INVENTOR", + "inherits": "fdmprinter", + "metadata": { + "author": "AR", + "manufacturer": "Innovo", + "category": "Other", + "file_formats": "text/x-gcode", + "platform": "inventor_platform.stl" + }, + "settings": { + "machine_width": { + "value": 340 + }, + "machine_height": { + "value": 290 + }, + "machine_depth": { + "value": 300 + }, + "machine_heated_bed": { + "value": true + }, + "machine_center_is_zero": { + "value": false + }, + "machine_nozzle_size": { + "value": 0.4 + }, + "machine_head_shape_min_x": { + "value": 43.7 + }, + "machine_head_shape_min_y": { + "value": 19.2 + }, + "machine_head_shape_max_x": { + "value": 43.7 + }, + "machine_head_shape_max_y": { + "value": 55 + }, + "machine_nozzle_gantry_distance": { + "value": 82.3 + }, + "machine_nozzle_offset_x_1": { + "value": 0 + }, + "machine_nozzle_offset_y_1": { + "value": 15 + }, + "machine_gcode_flavor": { + "value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "value": "G28 ; Home extruder\nM107 ; Turn off fan\nG90 ; Absolute positioning\nM82 ; Extruder in absolute mode\n{IF_BED}M190 S{BED}\n{IF_EXT0}M104 T0 S{TEMP0}\n{IF_EXT0}M109 T0 S{TEMP0}\n{IF_EXT1}M104 T1 S{TEMP1}\n{IF_EXT1}M109 T1 S{TEMP1}\nG32 S3 ; auto level\nG92 E0 ; Reset extruder position" + }, + "machine_end_gcode": { + "value": "M104 S0\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors" + }, + "machine_platform_offset": { + "value": [-180, -0.25, 160] + }, + "layer_height": { + "value": 0.15 + }, + "wall_thickness": { + "value": 0.8 + }, + "top_bottom_thickness": { + "value": 0.3 + }, + "material_print_temperature": { + "value": 215 + }, + "material_bed_temperature": { + "value": 60 + }, + "material_diameter": { + "value": 1.75 + }, + "speed_print": { + "value": 60 + }, + "speed_infill": { + "value": 100 + }, + "speed_topbottom": { + "value": 30 + }, + "speed_travel": { + "value": 150 + }, + "speed_layer_0": { + "value": 30.0, + "min_value": 0.1 + }, + "infill_overlap": { + "value": 10.0 + } + } +} \ No newline at end of file diff --git a/resources/machines/innovo-inventor.json b/resources/machines/innovo-inventor.json deleted file mode 100644 index a37143a8d7..0000000000 --- a/resources/machines/innovo-inventor.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "id": "innovo-inventor", - "version": 1, - "name": "Innovo INVENTOR", - "manufacturer": "Other", - "author": "AR", - "platform": "inventor_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "machine_settings": { - "machine_width": {"default": 340}, - "machine_height": {"default": 290}, - "machine_depth": {"default": 300}, - "machine_heated_bed": { "default": true}, - "machine_center_is_zero": {"default": false}, - "machine_nozzle_size": {"default": 0.4}, - "machine_head_shape_min_x": {"default": 43.7}, - "machine_head_shape_min_y": {"default": 19.2}, - "machine_head_shape_max_x": {"default": 43.7}, - "machine_head_shape_max_y": {"default": 55}, - "machine_nozzle_gantry_distance": {"default": 82.3}, - "machine_nozzle_offset_x_1": {"default": 0}, - "machine_nozzle_offset_y_1": {"default": 15}, - "machine_gcode_flavor": {"default": "RepRap (Marlin/Sprinter)"}, - "machine_start_gcode": {"default": "G28 ; Home extruder\nM107 ; Turn off fan\nG90 ; Absolute positioning\nM82 ; Extruder in absolute mode\n{IF_BED}M190 S{BED}\n{IF_EXT0}M104 T0 S{TEMP0}\n{IF_EXT0}M109 T0 S{TEMP0}\n{IF_EXT1}M104 T1 S{TEMP1}\n{IF_EXT1}M109 T1 S{TEMP1}\nG32 S3 ; auto level\nG92 E0 ; Reset extruder position"}, - "machine_end_gcode": {"default": "M104 S0\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors"}, - "machine_platform_offset": {"default": [-180, -0.25, 160]} - }, - "overrides": { - "layer_height": { "default": 0.15}, - "wall_thickness": { "default": 0.8}, - "top_bottom_thickness": { "default": 0.3, "visible": true}, - "material_print_temperature": { "default": 215, "visible": true}, - "material_bed_temperature": { "default": 60, "visible": true}, - "material_diameter": { "default": 1.75, "visible": true}, - "speed_print": { "default": 60.0, "visible": true}, - "speed_infill": { "default": 100.0, "visible": true }, - "speed_topbottom": { "default": 30.0, "visible": true }, - "speed_travel": { "default": 150.0, "visible": true }, - "speed_layer_0": { "min_value": 0.1, "default": 30.0, "visible": true }, - "infill_overlap": { "default": 10.0 } - } -} \ No newline at end of file From 8cf05fd2fc1f20cf924703041b97eb1f8b7d5465 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 14:40:22 +0200 Subject: [PATCH 240/424] Remove old machine definitions These have already been translated. I should've added these to their respective commits, I guess. Contributes to issue CURA-1278. --- resources/machines/bq_hephestos.json | 55 --------------------- resources/machines/bq_hephestos_2.json | 63 ------------------------- resources/machines/bq_hephestos_xl.json | 55 --------------------- resources/machines/bq_witbox.json | 55 --------------------- resources/machines/bq_witbox_2.json | 63 ------------------------- resources/machines/grr_neo.json | 37 --------------- 6 files changed, 328 deletions(-) delete mode 100644 resources/machines/bq_hephestos.json delete mode 100644 resources/machines/bq_hephestos_2.json delete mode 100644 resources/machines/bq_hephestos_xl.json delete mode 100644 resources/machines/bq_witbox.json delete mode 100644 resources/machines/bq_witbox_2.json delete mode 100644 resources/machines/grr_neo.json diff --git a/resources/machines/bq_hephestos.json b/resources/machines/bq_hephestos.json deleted file mode 100644 index e3aa354b75..0000000000 --- a/resources/machines/bq_hephestos.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "id": "bq_hephestos", - "version": 1, - "name": "BQ Prusa i3 Hephestos", - "manufacturer": "Other", - "author": "BQ", - "platform": "bq_hephestos_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_start_gcode": { - "default": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "default": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "default": 215 - }, - "machine_depth": { - "default": 210 - }, - "machine_height": { - "default": 180 - }, - "machine_heated_bed": { - "default": false - }, - "machine_center_is_zero": { - "default": false - }, - "machine_gcode_flavor": { - "default": "RepRap" - }, - "machine_platform_offset": { - "default": [0, -82, 0] - }, - "layer_height": { "default": 0.2 }, - "layer_height_0": { "default": 0.2, "visible": false }, - "wall_thickness": { "default": 1.0, "visible": false }, - "top_bottom_thickness": { "default": 1.0, "visible": false}, - "bottom_thickness": { "default": 1.0, "visible": false }, - "material_print_temperature": { "default": 220, "visible": true }, - "material_bed_temperature": { "default": 0, "visible": false }, - "material_diameter": { "default": 1.75, "visible": true }, - "speed_print": { "default": 40.0}, - "speed_infill": { "default": 40.0, "visible": true }, - "speed_wall": { "default": 35.0, "visible": true}, - "speed_topbottom": { "default": 35.0, "visible": true }, - "speed_travel": { "default": 120.0 }, - "speed_layer_0": { "default": 20.0, "visible": false }, - "support_enable": { "default": true } - } -} diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json deleted file mode 100644 index 8b1ed34caa..0000000000 --- a/resources/machines/bq_hephestos_2.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "id": "bq_hephestos_2", - "version": 1, - "name": "BQ Hephestos 2", - "manufacturer": "Other", - "author": "BQ", - "platform": "bq_hephestos_2_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_start_gcode": { - "default": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "default": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" - }, - "machine_width": { - "default": 210 - }, - "machine_depth": { - "default": 297 - }, - "machine_height": { - "default": 220 - }, - "machine_heated_bed": { - "default": false - }, - "machine_center_is_zero": { - "default": false - }, - "machine_gcode_flavor": { - "default": "RepRap" - }, - "machine_platform_offset": { - "default": [6, 1320, 0] - }, - "material_print_temperature": { "default": 210.0, "visible": true }, - "material_bed_temperature": { "default": 0 }, - "material_diameter": { "default": 1.75 }, - "layer_height": { "default": 0.2 }, - "layer_height_0": { "default": 0.2, "visible": true }, - "wall_line_count": { "default": 3, "visible": false }, - "wall_thickness": { "default": 1.2, "visible": false }, - "top_bottom_thickness": { "default": 1.2, "visible": false }, - "infill_sparse_density": { "default": 20.0 }, - "infill_overlap": { "default": 15.0, "visible": false }, - "speed_print": { "default": 60.0 }, - "speed_travel": { "default": 160.0 }, - "speed_layer_0": { "default": 30.0, "visible": true }, - "speed_wall_x": { "default": 35.0, "visible": false }, - "speed_wall_0": { "default": 30.0, "visible": false }, - "speed_infill": { "default": 80.0, "visible": true }, - "speed_topbottom": { "default": 35.0, "visible": false }, - "skirt_speed": { "default": 35.0, "visible": false }, - "skirt_line_count": { "default": 4 }, - "skirt_minimal_length": { "default": 30.0, "visible": false }, - "skirt_gap": { "default": 6.0 }, - "cool_fan_full_at_height": { "default": 0.4, "visible": false }, - "support_enable": { "default": false } - } -} diff --git a/resources/machines/bq_hephestos_xl.json b/resources/machines/bq_hephestos_xl.json deleted file mode 100644 index 5ce1dc3a7f..0000000000 --- a/resources/machines/bq_hephestos_xl.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "id": "bq_hephestos_xl", - "version": 1, - "name": "BQ Prusa i3 Hephestos XL", - "manufacturer": "Other", - "author": "BQ", - "platform": "bq_hephestos_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_start_gcode": { - "default": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "default": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "default": 200 - }, - "machine_depth": { - "default": 300 - }, - "machine_height": { - "default": 180 - }, - "machine_heated_bed": { - "default": false - }, - "machine_center_is_zero": { - "default": false - }, - "machine_gcode_flavor": { - "default": "RepRap" - }, - "machine_platform_offset": { - "default": [0, -82, 0] - }, - "layer_height": { "default": 0.2 }, - "layer_height_0": { "default": 0.2, "visible": false }, - "wall_thickness": { "default": 1.0, "visible": false }, - "top_bottom_thickness": { "default": 1.0, "visible": false}, - "bottom_thickness": { "default": 1.0, "visible": false }, - "material_print_temperature": { "default": 220, "visible": true }, - "material_bed_temperature": { "default": 0, "visible": false }, - "material_diameter": { "default": 1.75, "visible": true }, - "speed_print": { "default": 40.0}, - "speed_infill": { "default": 40.0, "visible": true }, - "speed_wall": { "default": 35.0, "visible": true}, - "speed_topbottom": { "default": 35.0, "visible": true }, - "speed_travel": { "default": 120.0 }, - "speed_layer_0": { "default": 20.0, "visible": false }, - "support_enable": { "default": true } - } -} diff --git a/resources/machines/bq_witbox.json b/resources/machines/bq_witbox.json deleted file mode 100644 index 83ac707ff6..0000000000 --- a/resources/machines/bq_witbox.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "id": "bq_witbox", - "version": 1, - "name": "BQ Witbox", - "manufacturer": "Other", - "author": "BQ", - "platform": "bq_witbox_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_start_gcode": { - "default": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "default": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG90 ;set to absolute positioning\nG1 Z200 ;move the platform to the bottom\nG28 X0 Y0 ;move to the X/Y origin (Home)\nM84 ;turn off steppers\n; -- end of END GCODE --" - }, - "machine_width": { - "default": 297 - }, - "machine_depth": { - "default": 210 - }, - "machine_height": { - "default": 200 - }, - "machine_heated_bed": { - "default": false - }, - "machine_center_is_zero": { - "default": false - }, - "machine_gcode_flavor": { - "default": "RepRap" - }, - "machine_platform_offset": { - "default": [0, -145, -38] - }, - "layer_height": { "default": 0.2 }, - "layer_height_0": { "default": 0.2, "visible": false }, - "wall_thickness": { "default": 1.0, "visible": false }, - "top_bottom_thickness": { "default": 1.0, "visible": false}, - "bottom_thickness": { "default": 1.0, "visible": false }, - "material_print_temperature": { "default": 220, "visible": true }, - "material_bed_temperature": { "default": 0, "visible": false }, - "material_diameter": { "default": 1.75, "visible": true }, - "speed_print": { "default": 40.0}, - "speed_infill": { "default": 40.0, "visible": true }, - "speed_wall": { "default": 35.0, "visible": true}, - "speed_topbottom": { "default": 35.0, "visible": true }, - "speed_travel": { "default": 120.0 }, - "speed_layer_0": { "default": 20.0, "visible": false }, - "support_enable": { "default": true } - } -} diff --git a/resources/machines/bq_witbox_2.json b/resources/machines/bq_witbox_2.json deleted file mode 100644 index 61ce18a161..0000000000 --- a/resources/machines/bq_witbox_2.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "id": "bq_witbox_2", - "version": 1, - "name": "BQ Witbox 2", - "manufacturer": "Other", - "author": "BQ", - "platform": "bq_witbox_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_start_gcode": { - "default": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" - }, - "machine_end_gcode": { - "default": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" - }, - "machine_width": { - "default": 297 - }, - "machine_depth": { - "default": 210 - }, - "machine_height": { - "default": 200 - }, - "machine_heated_bed": { - "default": false - }, - "machine_center_is_zero": { - "default": false - }, - "machine_gcode_flavor": { - "default": "RepRap" - }, - "machine_platform_offset": { - "default": [0, -145, -38] - }, - "material_print_temperature": { "default": 210.0, "visible": true }, - "material_bed_temperature": { "default": 0 }, - "material_diameter": { "default": 1.75 }, - "layer_height": { "default": 0.2 }, - "layer_height_0": { "default": 0.2, "visible": true }, - "wall_line_count": { "default": 3, "visible": false }, - "wall_thickness": { "default": 1.2, "visible": false }, - "top_bottom_thickness": { "default": 1.2, "visible": false }, - "infill_sparse_density": { "default": 20.0 }, - "infill_overlap": { "default": 15.0, "visible": false }, - "speed_print": { "default": 60.0 }, - "speed_travel": { "default": 160.0 }, - "speed_layer_0": { "default": 30.0, "visible": true }, - "speed_wall_x": { "default": 35.0, "visible": false }, - "speed_wall_0": { "default": 30.0, "visible": false }, - "speed_infill": { "default": 80.0, "visible": true }, - "speed_topbottom": { "default": 35.0, "visible": false }, - "skirt_speed": { "default": 35.0, "visible": false }, - "skirt_line_count": { "default": 4 }, - "skirt_minimal_length": { "default": 30.0, "visible": false }, - "skirt_gap": { "default": 6.0 }, - "cool_fan_full_at_height": { "default": 0.4, "visible": false }, - "support_enable": { "default": false } - } -} diff --git a/resources/machines/grr_neo.json b/resources/machines/grr_neo.json deleted file mode 100644 index e2eb9aae73..0000000000 --- a/resources/machines/grr_neo.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "id": "grr_neo", - "version": 1, - "name": "German RepRap Neo", - "manufacturer": "Other", - "author": "Other", - "icon": "icon_ultimaker.png", - "platform": "grr_neo_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - "visible": "true", - - "overrides": { - "machine_width": { "default": 150 }, - "machine_height": { "default": 150 }, - "machine_depth": { "default": 150 }, - "machine_center_is_zero": { "default": false }, - "machine_nozzle_size": { "default": 0.5 }, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_head_shape_min_x": { "default": 75 }, - "machine_head_shape_min_y": { "default": 18 }, - "machine_head_shape_max_x": { "default": 18 }, - "machine_head_shape_max_y": { "default": 35 }, - "machine_nozzle_gantry_distance": { "default": 55 }, - "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, - - "machine_start_gcode": { - "default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." - }, - "machine_end_gcode": { - "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" - }, - - "material_bed_temperature": { "visible": false } - } -} From 8606961c3fcae83abffa2b28d1dc23e2126d978c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 14:42:01 +0200 Subject: [PATCH 241/424] Fix name of author Contributes to issue CURA-1278. --- resources/definitions/innovo_inventor.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index 30e5a53094..ce3c27ee14 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -4,7 +4,7 @@ "name": "Innovo INVENTOR", "inherits": "fdmprinter", "metadata": { - "author": "AR", + "author": "Adam Rumjahn", "manufacturer": "Innovo", "category": "Other", "file_formats": "text/x-gcode", From 2cf025c91aefa56cb59643b96e3945dbb220248a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 15:50:41 +0200 Subject: [PATCH 242/424] Translate definition for M180 Contributes to issue CURA-1278. --- resources/definitions/m180.def.json | 58 +++++++++++++++++++++++++++++ resources/machines/m180.json | 39 ------------------- 2 files changed, 58 insertions(+), 39 deletions(-) create mode 100644 resources/definitions/m180.def.json delete mode 100644 resources/machines/m180.json diff --git a/resources/definitions/m180.def.json b/resources/definitions/m180.def.json new file mode 100644 index 0000000000..7938ff79cb --- /dev/null +++ b/resources/definitions/m180.def.json @@ -0,0 +1,58 @@ +{ + "id": "m180", + "version": 2, + "name": "Malyan M180", + "inherits": "fdmprinter", + "metadata": { + "author": "Ruben Dulek", + "manufacturer": "Malyan", + "category": "Other", + "file_formats": "application/x3g" + }, + + "overrides": { + "settings": { + "machine_width": { + "default_value": 230 + }, + "machine_height": { + "default_value": 165 + }, + "machine_depth": { + "default_value": 145 + }, + "machine_center_is_zero": { + "default_value": true + }, + "machine_nozzle_size": { + "default_value": 0.4, + "min_value": "0.001" + }, + "machine_head_with_fans_polygon": { + "default_value": [ + [ -75, 35 ], + [ -75, -18 ], + [ 18, -18 ], + [ 18, 35 ] + ] + }, + "gantry_height": { + "default_value": 55 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": "M136\nM73 P0\nM103\nG21\nG90\nM320\n;(**** begin homing ****)\nG162 X Y F4000\nG161 Z F3500\nG92 Z-5\nG1 Z0.0\nG161 Z F100\nM132 X Y Z A B\n;(**** end homing ****)\nG92 X147 Y66 Z5\nG1 X105 Y-60 Z10 F4000.0\nG130 X127 Y127 A127 B127\nG0 X105 Y-60\nG1 Z0.3 F300\nG92 E0\nG1 X100 E10 F300\nG92 E0\nG1 Z0.0 F300\nM320" + }, + "machine_end_gcode": { + "default_value": "G92 Z0\nG1 Z10 F400\nM18\nM109 S0 T0\nM104 S0 T0\nM73 P100 (end build progress)\nG162 X Y F3000\nM18" + }, + "material_diameter": { + "default_value": 1.75, + "min_value_warning": "1.5", + "max_value_warning": "2.0" + } + } + } +} \ No newline at end of file diff --git a/resources/machines/m180.json b/resources/machines/m180.json deleted file mode 100644 index 7e31577ac2..0000000000 --- a/resources/machines/m180.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "id": "m180", - "version": 1, - "name": "Malyan M180", - "manufacturer": "Other", - "icon": "icon_ultimaker.png", - "platform": "", - "file_formats": "application/x3g", - "inherits": "fdmprinter.json", - - "machine_settings": { - "machine_width": { "default": 230 }, - "machine_height": { "default": 165 }, - "machine_depth": { "default": 145 }, - "machine_center_is_zero": { "default": true }, - "machine_nozzle_size": { "default": 0.4, "min_value": "0.001" }, - "machine_head_with_fans_polygon": { - "default": [ - [ -75, 35 ], - [ -75, -18 ], - [ 18, -18 ], - [ 18, 35 ] - ] - }, - "gantry_height": { "default": 55 }, - "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, - "machine_start_gcode": { "default": "M136\nM73 P0\nM103\nG21\nG90\nM320\n;(**** begin homing ****)\nG162 X Y F4000\nG161 Z F3500\nG92 Z-5\nG1 Z0.0\nG161 Z F100\nM132 X Y Z A B\n;(**** end homing ****)\nG92 X147 Y66 Z5\nG1 X105 Y-60 Z10 F4000.0\nG130 X127 Y127 A127 B127\nG0 X105 Y-60\nG1 Z0.3 F300\nG92 E0\nG1 X100 E10 F300\nG92 E0\nG1 Z0.0 F300\nM320" }, - "machine_end_gcode": { "default": "G92 Z0\nG1 Z10 F400\nM18\nM109 S0 T0\nM104 S0 T0\nM73 P100 (end build progress)\nG162 X Y F3000\nM18" } - }, - - "overrides": { - "material_bed_temperature": { "visible": "True" }, - "material_diameter": { - "default": 1.75, - "min_value_warning": "1.5", - "max_value_warning": "2.0" - } - } -} From 6c74350c6e0cc0bc26db7a6a0c54d82b3e6066e1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 17:40:56 +0200 Subject: [PATCH 243/424] Merge Contributes to issue CURA-1278. --- resources/definitions/bq_hephestos.def.json | 45 ++++++++++----------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json index 57fa85ab89..ad2fe851bb 100644 --- a/resources/definitions/bq_hephestos.def.json +++ b/resources/definitions/bq_hephestos.def.json @@ -3,8 +3,7 @@ "name": "BQ Prusa i3 Hephestos", "version": 2, "inherits": "fdmprinter", - "metadata": - { + "metadata": { "author": "BQ", "manufacturer": "BQ", "category": "Other", @@ -27,67 +26,67 @@ "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" }, "machine_width": { - "value": 215 + "default_value": 215 }, "machine_depth": { - "value": 210 + "default_value": 210 }, "machine_height": { - "value": 180 + "default_value": 180 }, "machine_heated_bed": { - "value": false + "default_value": false }, "machine_center_is_zero": { - "value": false + "default_value": false }, "machine_gcode_flavor": { - "value": "RepRap" + "default_value": "RepRap" }, "layer_height": { - "value": 0.2 + "default_value": 0.2 }, "layer_height_0": { - "value": 0.2 + "default_value": 0.2 }, "wall_thickness": { - "value": 1.0 + "default_value": 1.0 }, "top_bottom_thickness": { - "value": 1.0 + "default_value": 1.0 }, "bottom_thickness": { - "value": 1.0 + "default_value": 1.0 }, "material_print_temperature": { - "value": 220 + "default_value": 220 }, "material_bed_temperature": { - "value": 0 + "default_value": 0 }, "material_diameter": { - "value": 1.75 + "default_value": 1.75 }, "speed_print": { - "value": 40.0 + "default_value": 40.0 }, "speed_infill": { - "value": 40.0 + "default_value": 40.0 }, "speed_wall": { - "value": 35.0 + "default_value": 35.0 }, "speed_topbottom": { - "value": 35.0 + "default_value": 35.0 }, "speed_travel": { - "value": 120.0 + "default_value": 120.0 }, "speed_layer_0": { - "value": 20.0 + "default_value": 20.0 }, "support_enable": { - "value": true + "default_value": true } } } \ No newline at end of file From ad1b08c080886573539e130d87777c305fead41f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:01:02 +0200 Subject: [PATCH 244/424] Put settings in overrides JSON category Not in a subcategory of settings or anything. Contributes to issue CURA-1278. --- resources/definitions/m180.def.json | 82 ++++++++++++++--------------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/resources/definitions/m180.def.json b/resources/definitions/m180.def.json index 7938ff79cb..36d8be6e1f 100644 --- a/resources/definitions/m180.def.json +++ b/resources/definitions/m180.def.json @@ -11,48 +11,46 @@ }, "overrides": { - "settings": { - "machine_width": { - "default_value": 230 - }, - "machine_height": { - "default_value": 165 - }, - "machine_depth": { - "default_value": 145 - }, - "machine_center_is_zero": { - "default_value": true - }, - "machine_nozzle_size": { - "default_value": 0.4, - "min_value": "0.001" - }, - "machine_head_with_fans_polygon": { - "default_value": [ - [ -75, 35 ], - [ -75, -18 ], - [ 18, -18 ], - [ 18, 35 ] - ] - }, - "gantry_height": { - "default_value": 55 - }, - "machine_gcode_flavor": { - "default_value": "RepRap (Marlin/Sprinter)" - }, - "machine_start_gcode": { - "default_value": "M136\nM73 P0\nM103\nG21\nG90\nM320\n;(**** begin homing ****)\nG162 X Y F4000\nG161 Z F3500\nG92 Z-5\nG1 Z0.0\nG161 Z F100\nM132 X Y Z A B\n;(**** end homing ****)\nG92 X147 Y66 Z5\nG1 X105 Y-60 Z10 F4000.0\nG130 X127 Y127 A127 B127\nG0 X105 Y-60\nG1 Z0.3 F300\nG92 E0\nG1 X100 E10 F300\nG92 E0\nG1 Z0.0 F300\nM320" - }, - "machine_end_gcode": { - "default_value": "G92 Z0\nG1 Z10 F400\nM18\nM109 S0 T0\nM104 S0 T0\nM73 P100 (end build progress)\nG162 X Y F3000\nM18" - }, - "material_diameter": { - "default_value": 1.75, - "min_value_warning": "1.5", - "max_value_warning": "2.0" - } + "machine_width": { + "default_value": 230 + }, + "machine_height": { + "default_value": 165 + }, + "machine_depth": { + "default_value": 145 + }, + "machine_center_is_zero": { + "default_value": true + }, + "machine_nozzle_size": { + "default_value": 0.4, + "min_value": "0.001" + }, + "machine_head_with_fans_polygon": { + "default_value": [ + [ -75, 35 ], + [ -75, -18 ], + [ 18, -18 ], + [ 18, 35 ] + ] + }, + "gantry_height": { + "default_value": 55 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": "M136\nM73 P0\nM103\nG21\nG90\nM320\n;(**** begin homing ****)\nG162 X Y F4000\nG161 Z F3500\nG92 Z-5\nG1 Z0.0\nG161 Z F100\nM132 X Y Z A B\n;(**** end homing ****)\nG92 X147 Y66 Z5\nG1 X105 Y-60 Z10 F4000.0\nG130 X127 Y127 A127 B127\nG0 X105 Y-60\nG1 Z0.3 F300\nG92 E0\nG1 X100 E10 F300\nG92 E0\nG1 Z0.0 F300\nM320" + }, + "machine_end_gcode": { + "default_value": "G92 Z0\nG1 Z10 F400\nM18\nM109 S0 T0\nM104 S0 T0\nM73 P100 (end build progress)\nG162 X Y F3000\nM18" + }, + "material_diameter": { + "default_value": 1.75, + "min_value_warning": "1.5", + "max_value_warning": "2.0" } } } \ No newline at end of file From 232e4fbe0df3f73834aadd2c81f8ebaafbd10c33 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:01:42 +0200 Subject: [PATCH 245/424] Put settings in overrides JSON category Not in a subcategory of settings or anything. Contributes to issue CURA-1278. --- resources/definitions/bq_hephestos.def.json | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json index ad2fe851bb..09081f4814 100644 --- a/resources/definitions/bq_hephestos.def.json +++ b/resources/definitions/bq_hephestos.def.json @@ -43,6 +43,9 @@ "machine_gcode_flavor": { "default_value": "RepRap" }, + "machine_platform_offset": { + "default_value": [ 0, -82, 0 ] + }, "layer_height": { "default_value": 0.2 }, @@ -50,13 +53,13 @@ "default_value": 0.2 }, "wall_thickness": { - "default_value": 1.0 + "default_value": 1 }, "top_bottom_thickness": { - "default_value": 1.0 + "default_value": 1 }, "bottom_thickness": { - "default_value": 1.0 + "default_value": 1 }, "material_print_temperature": { "default_value": 220 @@ -68,22 +71,22 @@ "default_value": 1.75 }, "speed_print": { - "default_value": 40.0 + "default_value": 40 }, "speed_infill": { - "default_value": 40.0 + "default_value": 40 }, "speed_wall": { - "default_value": 35.0 + "default_value": 35 }, "speed_topbottom": { - "default_value": 35.0 + "default_value": 35 }, "speed_travel": { - "default_value": 120.0 + "default_value": 120 }, "speed_layer_0": { - "default_value": 20.0 + "default_value": 20 }, "support_enable": { "default_value": true From d29e36694586188b4b7ba10826dd71afc00a2819 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:10:12 +0200 Subject: [PATCH 246/424] Fix BQ Hephestos 2 definition The settings were in the wrong category. They were defined by value instead of default value, and the metadata was in there double. Contributes to issue CURA-1278. --- resources/definitions/bq_hephestos_2.def.json | 65 +++++++++---------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/resources/definitions/bq_hephestos_2.def.json b/resources/definitions/bq_hephestos_2.def.json index dba849ac7e..578f166bcb 100644 --- a/resources/definitions/bq_hephestos_2.def.json +++ b/resources/definitions/bq_hephestos_2.def.json @@ -17,10 +17,6 @@ }, "file_formats": "text/x-gcode" }, - "manufacturer": "BQ", - "author": "BQ", - "platform": "bq_hephestos_2_platform.stl", - "file_formats": "text/x-gcode", "overrides": { "machine_start_gcode": { @@ -30,91 +26,94 @@ "default_value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" }, "machine_width": { - "value": 210 + "default_value": 210 }, "machine_depth": { - "value": 297 + "default_value": 297 }, "machine_height": { - "value": 220 + "default_value": 220 }, "machine_heated_bed": { - "value": false + "default_value": false }, "machine_center_is_zero": { - "value": false + "default_value": false }, "machine_gcode_flavor": { - "value": "RepRap" + "default_value": "RepRap" + }, + "machine_platform_offset": { + "default_value": [6, 1320, 0] }, "material_print_temperature": { - "value": 210.0 + "default_value": 210 }, "material_bed_temperature": { - "value": 0 + "default_value": 0 }, "material_diameter": { - "value": 1.75 + "default_value": 1.75 }, "layer_height": { - "value": 0.2 + "default_value": 0.2 }, "layer_height_0": { - "value": 0.2 + "default_value": 0.2 }, "wall_line_count": { - "value": 3 + "default_value": 3 }, "wall_thickness": { - "value": 1.2 + "default_value": 1.2 }, "top_bottom_thickness": { - "value": 1.2 + "default_value": 1.2 }, "infill_sparse_density": { - "value": 20.0 + "default_value": 20 }, "infill_overlap": { - "value": 15.0 + "default_value": 15 }, "speed_print": { - "value": 60.0 + "default_value": 60 }, "speed_travel": { - "value": 160.0 + "default_value": 160 }, "speed_layer_0": { - "value": 30.0 + "default_value": 30 }, "speed_wall_x": { - "value": 35.0 + "default_value": 35 }, "speed_wall_0": { - "value": 30.0 + "default_value": 30 }, "speed_infill": { - "value": 80.0 + "default_value": 80 }, "speed_topbottom": { - "value": 35.0 + "default_value": 35 }, "skirt_speed": { - "value": 35.0 + "default_value": 35 }, "skirt_line_count": { - "value": 4 + "default_value": 4 }, "skirt_minimal_length": { - "value": 30.0 + "default_value": 30 }, "skirt_gap": { - "value": 6.0 + "default_value": 6 }, "cool_fan_full_at_height": { - "value": 0.4 + "default_value": 0.4 }, "support_enable": { - "value": false + "default_value": false } } } From caa108c3cfda8d803bf5613355baae4ebbd8b34a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:12:52 +0200 Subject: [PATCH 247/424] Default value and overrides category The settings must be in the 'overrides' category, not in the 'settings' category. Also, define a default value rather than a value. Contributes to issue CURA-1278. --- .../definitions/bq_hephestos_xl.def.json | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/resources/definitions/bq_hephestos_xl.def.json b/resources/definitions/bq_hephestos_xl.def.json index 6d4c7fdd52..ce7a95b799 100644 --- a/resources/definitions/bq_hephestos_xl.def.json +++ b/resources/definitions/bq_hephestos_xl.def.json @@ -17,6 +17,7 @@ ] } }, + "overrides": { "machine_start_gcode": { "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" @@ -25,67 +26,70 @@ "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --" }, "machine_width": { - "value": 200 + "default_value": 200 }, "machine_depth": { - "value": 300 + "default_value": 300 }, "machine_height": { - "value": 180 + "default_value": 180 }, "machine_heated_bed": { - "value": false + "default_value": false }, "machine_center_is_zero": { - "value": false + "default_value": false }, "machine_gcode_flavor": { - "value": "RepRap" + "default_value": "RepRap" + }, + "machine_platform_offset": { + "default_value": [0, -82, 0] }, "layer_height": { - "value": 0.2 + "default_value": 0.2 }, "layer_height_0": { - "value": 0.2 + "default_value": 0.2 }, "wall_thickness": { - "value": 1.0 + "default_value": 1 }, "top_bottom_thickness": { - "value": 1.0 + "default_value": 1 }, "bottom_thickness": { - "value": 1.0 + "default_value": 1 }, "material_print_temperature": { - "value": 220 + "default_value": 220 }, "material_bed_temperature": { - "value": 0 + "default_value": 0 }, "material_diameter": { - "value": 1.75 + "default_value": 1.75 }, "speed_print": { - "value": 40.0 + "default_value": 40 }, "speed_infill": { - "value": 40.0 + "default_value": 40 }, "speed_wall": { - "value": 35.0 + "default_value": 35 }, "speed_topbottom": { - "value": 35.0 + "default_value": 35 }, "speed_travel": { - "value": 120.0 + "default_value": 120 }, "speed_layer_0": { - "value": 20.0 + "default_value": 20 }, "support_enable": { - "value": true + "default_value": true } } } \ No newline at end of file From dc82a9004797b9dd13812e0e4d740509194ad0b2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:14:12 +0200 Subject: [PATCH 248/424] Default value and overrides category The settings must be in the 'overrides' category, not in the 'settings' category. Also, define a default value rather than a value. Contributes to issue CURA-1278. --- resources/definitions/bq_hephestos.def.json | 3 -- resources/definitions/bq_hephestos_2.def.json | 3 -- .../definitions/bq_hephestos_xl.def.json | 3 -- resources/definitions/bq_witbox.def.json | 43 ++++++++++--------- 4 files changed, 22 insertions(+), 30 deletions(-) diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json index 09081f4814..b9f0f3dca5 100644 --- a/resources/definitions/bq_hephestos.def.json +++ b/resources/definitions/bq_hephestos.def.json @@ -43,9 +43,6 @@ "machine_gcode_flavor": { "default_value": "RepRap" }, - "machine_platform_offset": { - "default_value": [ 0, -82, 0 ] - }, "layer_height": { "default_value": 0.2 }, diff --git a/resources/definitions/bq_hephestos_2.def.json b/resources/definitions/bq_hephestos_2.def.json index 578f166bcb..e072fbf1db 100644 --- a/resources/definitions/bq_hephestos_2.def.json +++ b/resources/definitions/bq_hephestos_2.def.json @@ -43,9 +43,6 @@ "machine_gcode_flavor": { "default_value": "RepRap" }, - "machine_platform_offset": { - "default_value": [6, 1320, 0] - }, "material_print_temperature": { "default_value": 210 }, diff --git a/resources/definitions/bq_hephestos_xl.def.json b/resources/definitions/bq_hephestos_xl.def.json index ce7a95b799..224d219504 100644 --- a/resources/definitions/bq_hephestos_xl.def.json +++ b/resources/definitions/bq_hephestos_xl.def.json @@ -43,9 +43,6 @@ "machine_gcode_flavor": { "default_value": "RepRap" }, - "machine_platform_offset": { - "default_value": [0, -82, 0] - }, "layer_height": { "default_value": 0.2 }, diff --git a/resources/definitions/bq_witbox.def.json b/resources/definitions/bq_witbox.def.json index d9529cdae6..3d021cc529 100644 --- a/resources/definitions/bq_witbox.def.json +++ b/resources/definitions/bq_witbox.def.json @@ -17,6 +17,7 @@ ] } }, + "overrides": { "machine_start_gcode": { "default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --" @@ -25,67 +26,67 @@ "default_value": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG90 ;set to absolute positioning\nG1 Z200 ;move the platform to the bottom\nG28 X0 Y0 ;move to the X/Y origin (Home)\nM84 ;turn off steppers\n; -- end of END GCODE --" }, "machine_width": { - "value": 297 + "default_value": 297 }, "machine_depth": { - "value": 210 + "default_value": 210 }, "machine_height": { - "value": 200 + "default_value": 200 }, "machine_heated_bed": { - "value": false + "default_value": false }, "machine_center_is_zero": { - "value": false + "default_value": false }, "machine_gcode_flavor": { - "value": "RepRap" + "default_value": "RepRap" }, "layer_height": { - "value": 0.2 + "default_value": 0.2 }, "layer_height_0": { - "value": 0.2 + "default_value": 0.2 }, "wall_thickness": { - "value": 1 + "default_value": 1 }, "top_bottom_thickness": { - "value": 1 + "default_value": 1 }, "bottom_thickness": { - "value": 1 + "default_value": 1 }, "material_print_temperature": { - "value": 220 + "default_value": 220 }, "material_bed_temperature": { - "value": 0 + "default_value": 0 }, "material_diameter": { - "value": 1.75 + "default_value": 1.75 }, "speed_print": { - "value": 40 + "default_value": 40 }, "speed_infill": { - "value": 40 + "default_value": 40 }, "speed_wall": { - "value": 35 + "default_value": 35 }, "speed_topbottom": { - "value": 35 + "default_value": 35 }, "speed_travel": { - "value": 120 + "default_value": 120 }, "speed_layer_0": { - "value": 20 + "default_value": 20 }, "support_enable": { - "value": true + "default_value": true } } From 9aaa81be50704e7a0835444ec922b349247196df Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:15:43 +0200 Subject: [PATCH 249/424] Default value and overrides category The settings must be in the 'overrides' category, not in the 'settings' category. Also, define a default value rather than a value. Contributes to issue CURA-1278. --- resources/definitions/bq_witbox_2.def.json | 69 +++++++++++----------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/resources/definitions/bq_witbox_2.def.json b/resources/definitions/bq_witbox_2.def.json index 43e6968aba..58f70c95b7 100644 --- a/resources/definitions/bq_witbox_2.def.json +++ b/resources/definitions/bq_witbox_2.def.json @@ -3,8 +3,7 @@ "version": 2, "name": "BQ Witbox 2", "inherits": "fdmprinter", - "metadata": - { + "metadata": { "author": "BQ", "manufacturer": "BQ", "category": "Other", @@ -12,102 +11,102 @@ "platform": "bq_witbox_platform.stl" }, - "settings": { + "overrides": { "machine_start_gcode": { - "value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" + "default_value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" }, "machine_end_gcode": { - "value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" + "default_value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" }, "machine_width": { - "value": 297 + "default_value": 297 }, "machine_depth": { - "value": 210 + "default_value": 210 }, "machine_height": { - "value": 200 + "default_value": 200 }, "machine_heated_bed": { - "value": false + "default_value": false }, "machine_center_is_zero": { - "value": false + "default_value": false }, "machine_gcode_flavor": { - "value": "RepRap" + "default_value": "RepRap" }, "machine_platform_offset": { - "value": [0, -145, -38] + "default_value": [0, -145, -38] }, "material_print_temperature": { - "value": 210.0 + "default_value": 210 }, "material_bed_temperature": { - "value": 0 + "default_value": 0 }, "material_diameter": { - "value": 1.75 + "default_value": 1.75 }, "layer_height": { - "value": 0.2 + "default_value": 0.2 }, "layer_height_0": { - "value": 0.2 + "default_value": 0.2 }, "wall_line_count": { - "value": 3 + "default_value": 3 }, "wall_thickness": { - "value": 1.2 + "default_value": 1.2 }, "top_bottom_thickness": { - "value": 1.2 + "default_value": 1.2 }, "infill_sparse_density": { - "value": 20.0 + "default_value": 20 }, "infill_overlap": { - "value": 15.0 + "default_value": 15 }, "speed_print": { - "value": 60.0 + "default_value": 60 }, "speed_travel": { - "value": 160.0 + "default_value": 160 }, "speed_layer_0": { - "value": 30.0 + "default_value": 30 }, "speed_wall_x": { - "value": 35.0 + "default_value": 35 }, "speed_wall_0": { - "value": 30.0 + "default_value": 30 }, "speed_infill": { - "value": 80.0 + "default_value": 80 }, "speed_topbottom": { - "value": 35.0 + "default_value": 35 }, "skirt_speed": { - "value": 35.0 + "default_value": 35 }, "skirt_line_count": { - "value": 4 + "default_value": 4 }, "skirt_minimal_length": { - "value": 30.0 + "default_value": 30 }, "skirt_gap": { - "value": 6.0 + "default_value": 6 }, "cool_fan_full_at_height": { - "value": 0.4 + "default_value": 0.4 }, "support_enable": { - "value": false + "default_value": false } } } \ No newline at end of file From 0298e3adcae95f72554e0b4aff3918b86817e6ad Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:16:43 +0200 Subject: [PATCH 250/424] Use default value instead of value Contributes to issue CURA-1278. --- resources/definitions/grr_neo.def.json | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/definitions/grr_neo.def.json b/resources/definitions/grr_neo.def.json index 710303383b..3fb6804c40 100644 --- a/resources/definitions/grr_neo.def.json +++ b/resources/definitions/grr_neo.def.json @@ -14,49 +14,49 @@ "overrides": { "machine_width": { - "value": 150 + "default_value": 150 }, "machine_height": { - "value": 150 + "default_value": 150 }, "machine_depth": { - "value": 150 + "default_value": 150 }, "machine_center_is_zero": { - "value": false + "default_value": false }, "machine_nozzle_size": { - "value": 0.5 + "default_value": 0.5 }, "machine_nozzle_heat_up_speed": { - "value": 2 + "default_value": 2 }, "machine_nozzle_cool_down_speed": { - "value": 2 + "default_value": 2 }, "machine_head_shape_min_x": { - "value": 75 + "default_value": 75 }, "machine_head_shape_min_y": { - "value": 18 + "default_value": 18 }, "machine_head_shape_max_x": { - "value": 18 + "default_value": 18 }, "machine_head_shape_max_y": { - "value": 35 + "default_value": 35 }, "machine_nozzle_gantry_distance": { - "value": 55 + "default_value": 55 }, "machine_gcode_flavor": { - "value": "RepRap (Marlin/Sprinter)" + "default_value": "RepRap (Marlin/Sprinter)" }, "machine_start_gcode": { - "value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." }, "machine_end_gcode": { - "value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" } } } \ No newline at end of file From 45382dc088a33bcced404fd5088be63fa8db70b5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:17:44 +0200 Subject: [PATCH 251/424] Default value and overrides category The settings must be in the 'overrides' category, not in the 'settings' category. Also, define a default value rather than a value. Contributes to issue CURA-1278. --- .../definitions/innovo_inventor.def.json | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index ce3c27ee14..5ab8d4f2e1 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -10,94 +10,95 @@ "file_formats": "text/x-gcode", "platform": "inventor_platform.stl" }, - "settings": { + + "overrides": { "machine_width": { - "value": 340 + "default_value": 340 }, "machine_height": { - "value": 290 + "default_value": 290 }, "machine_depth": { - "value": 300 + "default_value": 300 }, "machine_heated_bed": { - "value": true + "default_value": true }, "machine_center_is_zero": { - "value": false + "default_value": false }, "machine_nozzle_size": { - "value": 0.4 + "default_value": 0.4 }, "machine_head_shape_min_x": { - "value": 43.7 + "default_value": 43.7 }, "machine_head_shape_min_y": { - "value": 19.2 + "default_value": 19.2 }, "machine_head_shape_max_x": { - "value": 43.7 + "default_value": 43.7 }, "machine_head_shape_max_y": { - "value": 55 + "default_value": 55 }, "machine_nozzle_gantry_distance": { - "value": 82.3 + "default_value": 82.3 }, "machine_nozzle_offset_x_1": { - "value": 0 + "default_value": 0 }, "machine_nozzle_offset_y_1": { - "value": 15 + "default_value": 15 }, "machine_gcode_flavor": { - "value": "RepRap (Marlin/Sprinter)" + "default_value": "RepRap (Marlin/Sprinter)" }, "machine_start_gcode": { - "value": "G28 ; Home extruder\nM107 ; Turn off fan\nG90 ; Absolute positioning\nM82 ; Extruder in absolute mode\n{IF_BED}M190 S{BED}\n{IF_EXT0}M104 T0 S{TEMP0}\n{IF_EXT0}M109 T0 S{TEMP0}\n{IF_EXT1}M104 T1 S{TEMP1}\n{IF_EXT1}M109 T1 S{TEMP1}\nG32 S3 ; auto level\nG92 E0 ; Reset extruder position" + "default_value": "G28 ; Home extruder\nM107 ; Turn off fan\nG90 ; Absolute positioning\nM82 ; Extruder in absolute mode\n{IF_BED}M190 S{BED}\n{IF_EXT0}M104 T0 S{TEMP0}\n{IF_EXT0}M109 T0 S{TEMP0}\n{IF_EXT1}M104 T1 S{TEMP1}\n{IF_EXT1}M109 T1 S{TEMP1}\nG32 S3 ; auto level\nG92 E0 ; Reset extruder position" }, "machine_end_gcode": { - "value": "M104 S0\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors" + "default_value": "M104 S0\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors" }, "machine_platform_offset": { - "value": [-180, -0.25, 160] + "default_value": [-180, -0.25, 160] }, "layer_height": { - "value": 0.15 + "default_value": 0.15 }, "wall_thickness": { - "value": 0.8 + "default_value": 0.8 }, "top_bottom_thickness": { - "value": 0.3 + "default_value": 0.3 }, "material_print_temperature": { - "value": 215 + "default_value": 215 }, "material_bed_temperature": { - "value": 60 + "default_value": 60 }, "material_diameter": { - "value": 1.75 + "default_value": 1.75 }, "speed_print": { - "value": 60 + "default_value": 60 }, "speed_infill": { - "value": 100 + "default_value": 100 }, "speed_topbottom": { - "value": 30 + "default_value": 30 }, "speed_travel": { - "value": 150 + "default_value": 150 }, "speed_layer_0": { - "value": 30.0, + "default_value": 30.0, "min_value": 0.1 }, "infill_overlap": { - "value": 10.0 + "default_value": 10.0 } } } \ No newline at end of file From e13878b3436d5472bb3d53f433412d676e535d31 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:27:35 +0200 Subject: [PATCH 252/424] Translate definition for 3DMaker Starter Contributes to issue CURA-1278. --- resources/definitions/maker_starter.def.json | 190 +++++++++++++++++++ resources/machines/maker_starter.json | 81 -------- 2 files changed, 190 insertions(+), 81 deletions(-) create mode 100644 resources/definitions/maker_starter.def.json delete mode 100644 resources/machines/maker_starter.json diff --git a/resources/definitions/maker_starter.def.json b/resources/definitions/maker_starter.def.json new file mode 100644 index 0000000000..81ad45698e --- /dev/null +++ b/resources/definitions/maker_starter.def.json @@ -0,0 +1,190 @@ +{ + "id": "maker_starter", + "version": 2, + "name": "3DMaker Starter", + "inherits": "fdmprinter", + "metadata": { + "author": "tvlgiao", + "manufacturer": "3DMaker", + "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj", + "icon": "icon_ultimaker2.png", + "platform": "makerstarter_platform.stl" + }, + + "overrides": { + "machine_width": { + "default": 210 + }, + "machine_depth": { + "default": 185 + }, + "machine_height": { + "default": 200 + }, + "machine_heated_bed": { + "default": false + }, + "machine_center_is_zero": { + "default": false + }, + "machine_nozzle_size": { + "default": 0.4 + }, + "machine_nozzle_heat_up_speed": { + "default": 2 + }, + "machine_nozzle_cool_down_speed": { + "default": 2 + }, + "machine_head_shape_min_x": { + "default": 0 + }, + "machine_head_shape_min_y": { + "default": 0 + }, + "machine_head_shape_max_x": { + "default": 0 + }, + "machine_head_shape_max_y": { + "default": 0 + }, + "machine_nozzle_gantry_distance": { + "default": 55 + }, + "machine_gcode_flavor": { + "default": "RepRap" + }, + "machine_disallowed_areas": { + "default": [] + }, + "machine_platform_offset": { + "default": [0, 0, 0] + }, + "machine_nozzle_tip_outer_diameter": { + "default": 1 + }, + "machine_nozzle_head_distance": { + "default": 3 + }, + "machine_nozzle_expansion_angle": { + "default": 45 + }, + "layer_height": { + "default": 0.2 + }, + "layer_height_0": { + "default": 0.2 + }, + "wall_line_count": { + "default": 2 + }, + "top_layers": { + "default": 4 + }, + "bottom_layers": { + "default": 4 + }, + "speed_print": { + "default": 50 + }, + "speed_wall": { + "default": 30 + }, + "speed_wall_0": { + "default": 30 + }, + "speed_wall_x": { + "default": 30 + }, + "speed_topbottom": { + "default": 50 + }, + "speed_support": { + "default": 50 + }, + "speed_travel": { + "default": 120 + }, + "speed_layer_0": { + "default": 20 + }, + "skirt_speed": { + "default": 15 + }, + "speed_slowdown_layers": { + "default": 4 + }, + "infill_sparse_density": { + "default": 20 + }, + "cool_fan_speed_min": { + "default": 50 + }, + "cool_fan_speed_max": { + "default": 100 + }, + "cool_fan_full_layer": { + "default": 4 + }, + "cool_min_layer_time": { + "default": 5 + }, + "cool_min_layer_time_fan_speed_max": { + "default": 10 + }, + "support_type": { + "default": "Everywhere" + }, + "support_angle": { + "default": 45 + }, + "support_xy_distance": { + "default": 1 + }, + "support_z_distance": { + "default": 0.2 + }, + "support_top_distance": { + "default": 0.2 + }, + "support_bottom_distance": { + "default": 0.24 + }, + "support_pattern": { + "default": "ZigZag" + }, + "support_infill_rate": { + "default": 15 + }, + "adhesion_type": { + "default": "Raft" + }, + "skirt_minimal_length": { + "default": 100 + }, + "raft_base_line_spacing": { + "default": 2 + }, + "raft_base_thickness": { + "default": 0.3 + }, + "raft_base_line_width": { + "default": 2 + }, + "raft_base_speed": { + "default": 15 + }, + "raft_interface_thickness": { + "default": 0.24 + }, + "raft_interface_line_width": { + "default": 0.6 + }, + "raft_airgap": { + "default": 0.2 + }, + "raft_surface_layers": { + "default": 2 + } + } +} \ No newline at end of file diff --git a/resources/machines/maker_starter.json b/resources/machines/maker_starter.json deleted file mode 100644 index 1d6dfa6a18..0000000000 --- a/resources/machines/maker_starter.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "id": "maker_starter", - "version": 1, - "name": "3DMaker Starter", - "manufacturer": "Other", - "author": "Other", - "icon": "icon_ultimaker2.png", - "platform": "makerstarter_platform.stl", - "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_width": { "default": 210 }, - "machine_depth": { "default": 185 }, - "machine_height": { "default": 200 }, - "machine_heated_bed": { "default": false }, - - "machine_center_is_zero": { "default": false }, - "machine_nozzle_size": { "default": 0.4 }, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_head_shape_min_x": { "default": 0 }, - "machine_head_shape_min_y": { "default": 0 }, - "machine_head_shape_max_x": { "default": 0 }, - "machine_head_shape_max_y": { "default": 0 }, - "machine_nozzle_gantry_distance": { "default": 55 }, - "machine_gcode_flavor": { "default": "RepRap" }, - "machine_disallowed_areas": { "default": []}, - "machine_platform_offset": { "default": [0.0, 0.0, 0.0] }, - - "machine_nozzle_tip_outer_diameter": { "default": 1.0 }, - "machine_nozzle_head_distance": { "default": 3.0 }, - "machine_nozzle_expansion_angle": { "default": 45 }, - - "layer_height": { "default": 0.2 }, - "layer_height_0": { "default": 0.2, "visible": false }, - "wall_line_count": { "default": 2, "visible": true }, - "top_layers": { "default": 4, "visible": true }, - "bottom_layers": { "default": 4, "visible": true }, - "material_print_temperature": { "visible": false }, - "material_bed_temperature": { "visible": false }, - "material_diameter": { "default": 1.75, "visible": false }, - "material_flow": { "visible": false }, - "speed_print": { "default": 50.0 }, - "speed_wall": { "default": 30.0 }, - "speed_wall_0": { "default": 30.0 }, - "speed_wall_x": { "default": 30.0 }, - "speed_topbottom": { "default": 50.0 }, - "speed_support": { "default": 50.0 }, - "speed_travel": { "default": 120.0 }, - "speed_layer_0": { "default": 20.0 }, - "skirt_speed": { "default": 15.0 }, - "speed_slowdown_layers": { "default": 4 }, - "infill_sparse_density": { "default": 20.0 }, - "cool_fan_speed_min": { "default": 50.0 }, - "cool_fan_speed_max": { "default": 100.0 }, - "cool_fan_full_layer": { "default": 4, "visible": true }, - "cool_min_layer_time": { "default": 5.0 }, - "cool_min_layer_time_fan_speed_max": { "default": 10.0 }, - "support_type": { "default": "Everywhere" }, - "support_angle": { "default": 45.0, "visible": true }, - "support_xy_distance": { "default": 1 }, - "support_z_distance": { "default": 0.2 }, - "support_top_distance": { "default": 0.2 }, - "support_bottom_distance": { "default": 0.24 }, - "support_pattern": { "default": "ZigZag" }, - "support_infill_rate": { "default": 15, "visible": true }, - "adhesion_type": { "default": "Raft" }, - "skirt_minimal_length": { "default": 100.0 }, - "raft_base_line_spacing": { "default": 2.0 }, - "raft_base_thickness": { "default": 0.3 }, - "raft_base_line_width": { "default": 2.0 }, - "raft_base_speed": { "default": 15.0 }, - "raft_interface_thickness": { "default": 0.24 }, - "raft_interface_line_width": { "default": 0.6 }, - "raft_airgap": { "default": 0.2 }, - "raft_surface_layers": { "default": 2 } - } -} - - From da03eab355d3fed2d0dea94d1e5dd36f0f8dceec Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:30:28 +0200 Subject: [PATCH 253/424] Use default value rather than 'default' Default is outdated. Contributes to issue CURA-1278. --- resources/definitions/maker_starter.def.json | 116 +++++++++---------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/resources/definitions/maker_starter.def.json b/resources/definitions/maker_starter.def.json index 81ad45698e..376fea8c29 100644 --- a/resources/definitions/maker_starter.def.json +++ b/resources/definitions/maker_starter.def.json @@ -13,178 +13,178 @@ "overrides": { "machine_width": { - "default": 210 + "default_value": 210 }, "machine_depth": { - "default": 185 + "default_value": 185 }, "machine_height": { - "default": 200 + "default_value": 200 }, "machine_heated_bed": { - "default": false + "default_value": false }, "machine_center_is_zero": { - "default": false + "default_value": false }, "machine_nozzle_size": { - "default": 0.4 + "default_value": 0.4 }, "machine_nozzle_heat_up_speed": { - "default": 2 + "default_value": 2 }, "machine_nozzle_cool_down_speed": { - "default": 2 + "default_value": 2 }, "machine_head_shape_min_x": { - "default": 0 + "default_value": 0 }, "machine_head_shape_min_y": { - "default": 0 + "default_value": 0 }, "machine_head_shape_max_x": { - "default": 0 + "default_value": 0 }, "machine_head_shape_max_y": { - "default": 0 + "default_value": 0 }, "machine_nozzle_gantry_distance": { - "default": 55 + "default_value": 55 }, "machine_gcode_flavor": { - "default": "RepRap" + "default_value": "RepRap" }, "machine_disallowed_areas": { - "default": [] + "default_value": [] }, "machine_platform_offset": { - "default": [0, 0, 0] + "default_value": [0, 0, 0] }, "machine_nozzle_tip_outer_diameter": { - "default": 1 + "default_value": 1 }, "machine_nozzle_head_distance": { - "default": 3 + "default_value": 3 }, "machine_nozzle_expansion_angle": { - "default": 45 + "default_value": 45 }, "layer_height": { - "default": 0.2 + "default_value": 0.2 }, "layer_height_0": { - "default": 0.2 + "default_value": 0.2 }, "wall_line_count": { - "default": 2 + "default_value": 2 }, "top_layers": { - "default": 4 + "default_value": 4 }, "bottom_layers": { - "default": 4 + "default_value": 4 }, "speed_print": { - "default": 50 + "default_value": 50 }, "speed_wall": { - "default": 30 + "default_value": 30 }, "speed_wall_0": { - "default": 30 + "default_value": 30 }, "speed_wall_x": { - "default": 30 + "default_value": 30 }, "speed_topbottom": { - "default": 50 + "default_value": 50 }, "speed_support": { - "default": 50 + "default_value": 50 }, "speed_travel": { - "default": 120 + "default_value": 120 }, "speed_layer_0": { - "default": 20 + "default_value": 20 }, "skirt_speed": { - "default": 15 + "default_value": 15 }, "speed_slowdown_layers": { - "default": 4 + "default_value": 4 }, "infill_sparse_density": { - "default": 20 + "default_value": 20 }, "cool_fan_speed_min": { - "default": 50 + "default_value": 50 }, "cool_fan_speed_max": { - "default": 100 + "default_value": 100 }, "cool_fan_full_layer": { - "default": 4 + "default_value": 4 }, "cool_min_layer_time": { - "default": 5 + "default_value": 5 }, "cool_min_layer_time_fan_speed_max": { - "default": 10 + "default_value": 10 }, "support_type": { - "default": "Everywhere" + "default_value": "Everywhere" }, "support_angle": { - "default": 45 + "default_value": 45 }, "support_xy_distance": { - "default": 1 + "default_value": 1 }, "support_z_distance": { - "default": 0.2 + "default_value": 0.2 }, "support_top_distance": { - "default": 0.2 + "default_value": 0.2 }, "support_bottom_distance": { - "default": 0.24 + "default_value": 0.24 }, "support_pattern": { - "default": "ZigZag" + "default_value": "ZigZag" }, "support_infill_rate": { - "default": 15 + "default_value": 15 }, "adhesion_type": { - "default": "Raft" + "default_value": "Raft" }, "skirt_minimal_length": { - "default": 100 + "default_value": 100 }, "raft_base_line_spacing": { - "default": 2 + "default_value": 2 }, "raft_base_thickness": { - "default": 0.3 + "default_value": 0.3 }, "raft_base_line_width": { - "default": 2 + "default_value": 2 }, "raft_base_speed": { - "default": 15 + "default_value": 15 }, "raft_interface_thickness": { - "default": 0.24 + "default_value": 0.24 }, "raft_interface_line_width": { - "default": 0.6 + "default_value": 0.6 }, "raft_airgap": { - "default": 0.2 + "default_value": 0.2 }, "raft_surface_layers": { - "default": 2 + "default_value": 2 } } } \ No newline at end of file From 28703981d5df0ac7f36b24887711187581345580 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:42:33 +0200 Subject: [PATCH 254/424] Translate definition for Prusa i3 Contributes to issue CURA-1278. --- resources/definitions/prusa_i3.def.json | 68 +++++++++++++++++++++++++ resources/machines/prusa_i3.json | 36 ------------- 2 files changed, 68 insertions(+), 36 deletions(-) create mode 100644 resources/definitions/prusa_i3.def.json delete mode 100644 resources/machines/prusa_i3.json diff --git a/resources/definitions/prusa_i3.def.json b/resources/definitions/prusa_i3.def.json new file mode 100644 index 0000000000..26c36b605e --- /dev/null +++ b/resources/definitions/prusa_i3.def.json @@ -0,0 +1,68 @@ +{ + "id": "prusa_i3", + "version": 2, + "name": "Prusa i3", + "inherits": "fdmprinter", + "metadata": { + "author": "Quillford", + "manufacturer": "Prusajr", + "category": "Other", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker2", + "platform": "prusai3_platform.stl" + }, + + "overrides": { + "machine_heated_bed": { + "default_value": true + }, + "machine_width": { + "default_value": 200 + }, + "machine_height": { + "default_value": 200 + }, + "machine_depth": { + "default_value": 200 + }, + "machine_center_is_zero": { + "default_value": false + }, + "machine_nozzle_size": { + "default_value": 0.4 + }, + "material_diameter": { + "default_value": 1.75 + }, + "machine_nozzle_heat_up_speed": { + "default_value": 2 + }, + "machine_nozzle_cool_down_speed": { + "default_value": 2 + }, + "machine_head_shape_min_x": { + "default_value": 75 + }, + "machine_head_shape_min_y": { + "default_value": 18 + }, + "machine_head_shape_max_x": { + "default_value": 18 + }, + "machine_head_shape_max_y": { + "default_value": 35 + }, + "machine_nozzle_gantry_distance": { + "default_value": 55 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + }, + "machine_end_gcode": { + "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + } + } +} \ No newline at end of file diff --git a/resources/machines/prusa_i3.json b/resources/machines/prusa_i3.json deleted file mode 100644 index dcbca32801..0000000000 --- a/resources/machines/prusa_i3.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "id": "prusa_i3", - "version": 1, - "name": "Prusa i3", - "manufacturer": "Other", - "author": "Other", - "icon": "icon_ultimaker2.png", - "platform": "prusai3_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_heated_bed": { "default": true }, - "machine_width": { "default": 200 }, - "machine_height": { "default": 200 }, - "machine_depth": { "default": 200 }, - "machine_center_is_zero": { "default": false }, - "machine_nozzle_size": { "default": 0.4 }, - "material_diameter": { "default": 1.75 }, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_head_shape_min_x": { "default": 75 }, - "machine_head_shape_min_y": { "default": 18 }, - "machine_head_shape_max_x": { "default": 18 }, - "machine_head_shape_max_y": { "default": 35 }, - "machine_nozzle_gantry_distance": { "default": 55 }, - "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, - - "machine_start_gcode": { - "default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." - }, - "machine_end_gcode": { - "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" - } - } -} From 319eef1384c2aff41def14df9f699430cc0d3615 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 16:49:54 +0200 Subject: [PATCH 255/424] Translate definition for Prusa i3 XL Contributes to issue CURA-1278. --- resources/definitions/prusa_i3_xl.def.json | 68 ++++++++++++++++++++++ resources/machines/prusa_i3_xl.json | 36 ------------ 2 files changed, 68 insertions(+), 36 deletions(-) create mode 100644 resources/definitions/prusa_i3_xl.def.json delete mode 100644 resources/machines/prusa_i3_xl.json diff --git a/resources/definitions/prusa_i3_xl.def.json b/resources/definitions/prusa_i3_xl.def.json new file mode 100644 index 0000000000..0c2b9e823f --- /dev/null +++ b/resources/definitions/prusa_i3_xl.def.json @@ -0,0 +1,68 @@ +{ + "id": "prusa_i3_xl", + "version": 2, + "name": "Prusa i3 xl", + "inherits": "fdmprinter.json", + "metadata": { + "author": "guigashm", + "manufacturer": "Prusajr", + "category": "Other", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker2.png", + "platform": "prusai3_xl_platform.stl" + }, + + "overrides": { + "machine_heated_bed": { + "default_value": true + }, + "machine_width": { + "default_value": 200 + }, + "machine_height": { + "default_value": 200 + }, + "machine_depth": { + "default_value": 270 + }, + "machine_center_is_zero": { + "default_value": false + }, + "machine_nozzle_size": { + "default_value": 0.4 + }, + "material_diameter": { + "default_value": 1.75 + }, + "machine_nozzle_heat_up_speed": { + "default_value": 2.0 + }, + "machine_nozzle_cool_down_speed": { + "default_value": 2.0 + }, + "machine_head_shape_min_x": { + "default_value": 75 + }, + "machine_head_shape_min_y": { + "default_value": 18 + }, + "machine_head_shape_max_x": { + "default_value": 18 + }, + "machine_head_shape_max_y": { + "default_value": 35 + }, + "machine_nozzle_gantry_distance": { + "default_value": 55 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + }, + "machine_end_gcode": { + "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + } + } +} \ No newline at end of file diff --git a/resources/machines/prusa_i3_xl.json b/resources/machines/prusa_i3_xl.json deleted file mode 100644 index b66b974983..0000000000 --- a/resources/machines/prusa_i3_xl.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "id": "prusa_i3_xl", - "version": 1, - "name": "Prusa i3 xl", - "manufacturer": "Other", - "author": "Other", - "icon": "icon_ultimaker2.png", - "platform": "prusai3_xl_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_heated_bed": { "default": true }, - "machine_width": { "default": 200 }, - "machine_height": { "default": 200 }, - "machine_depth": { "default": 270 }, - "machine_center_is_zero": { "default": false }, - "machine_nozzle_size": { "default": 0.4 }, - "material_diameter": { "default": 1.75 }, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_head_shape_min_x": { "default": 75 }, - "machine_head_shape_min_y": { "default": 18 }, - "machine_head_shape_max_x": { "default": 18 }, - "machine_head_shape_max_y": { "default": 35 }, - "machine_nozzle_gantry_distance": { "default": 55 }, - "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, - - "machine_start_gcode": { - "default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." - }, - "machine_end_gcode": { - "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" - } - } -} From 35dda003c7791524d9ee975bbf3557b17a358e4c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 17:06:32 +0200 Subject: [PATCH 256/424] Translate definition for RigidBot Also translated the very old active_if properties! Contributes to issue CURA-1278. --- resources/definitions/rigidbot.def.json | 113 ++++++++++++++++++++++++ resources/machines/RigidBot.json | 57 ------------ 2 files changed, 113 insertions(+), 57 deletions(-) create mode 100644 resources/definitions/rigidbot.def.json delete mode 100644 resources/machines/RigidBot.json diff --git a/resources/definitions/rigidbot.def.json b/resources/definitions/rigidbot.def.json new file mode 100644 index 0000000000..0de11f09b8 --- /dev/null +++ b/resources/definitions/rigidbot.def.json @@ -0,0 +1,113 @@ +{ + "id": "rigidbot", + "version": 2, + "name": "RigidBot", + "inherits": "fdmprinter", + "metadata": { + "author": "RBC", + "manufacturer": "RigidBot", + "category": "Other", + "file_formats": "text/x-gcode", + "platform": "rigidbot_platform.stl" + }, + + "overrides": { + "machine_width": { + "default_value": 254 + }, + "machine_depth": { + "default_value": 254 + }, + "machine_height": { + "default_value": 254 + }, + "machine_heated_bed": { + "default_value": true + }, + "machine_nozzle_heat_up_speed": { + "default_value": 2 + }, + "machine_nozzle_cool_down_speed": { + "default_value": 2 + }, + "machine_head_shape_min_x": { + "default_value": 0 + }, + "machine_head_shape_min_y": { + "default_value": 0 + }, + "machine_head_shape_max_x": { + "default_value": 0 + }, + "machine_head_shape_max_y": { + "default_value": 0 + }, + "machine_nozzle_gantry_distance": { + "default_value": 0 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_sparse_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..." + }, + "machine_end_gcode": { + "default_value": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}" + }, + "layer_height": { + "default_value": 0.2 + }, + "wall_thickness": { + "default_value": 0.8 + }, + "top_bottom_thickness": { + "default_value": 0.3 + }, + "material_print_temperature": { + "default_value": 195 + }, + "material_bed_temperature": { + "default_value": 60 + }, + "material_diameter": { + "default_value": 1.75 + }, + "speed_print": { + "default_value": 60 + }, + "speed_infill": { + "default_value": 100 + }, + "speed_topbottom": { + "default_value": 15 + }, + "speed_travel": { + "default_value": 150 + }, + "speed_layer_0": { + "default_value": 15, + "min_value": "0.1" + }, + "infill_overlap": { + "default_value": 10 + }, + "cool_fan_enabled": { + "default_value": false + }, + "cool_fan_speed": { + "default_value": 0 + }, + "skirt_line_count": { + "default_value": 3, + "enabled": "adhesion_type == \"Skirt\"" + }, + "skirt_gap": { + "default_value": 4, + "enabled": "adhesion_type == \"Skirt\"" + }, + "skirt_minimal_length": { + "default_value": 200, + "enabled": "adhesion_type == \"Skirt\"" + } + } +} diff --git a/resources/machines/RigidBot.json b/resources/machines/RigidBot.json deleted file mode 100644 index efd5a6e72c..0000000000 --- a/resources/machines/RigidBot.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "id": "rigidbot", - "version": 1, - "name": "RigidBot", - "manufacturer": "Other", - "author": "RBC", - "platform": "rigidbot_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "machine_settings": { - - "machine_width": { "default": 254 }, - "machine_depth": { "default": 254 }, - "machine_height": { "default": 254 }, - "machine_heated_bed": { "default": true }, - - "machine_nozzle_size": { "default": 0.4, - "visible": true - }, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_head_shape_min_x": { "default": 0 }, - "machine_head_shape_min_y": { "default": 0 }, - "machine_head_shape_max_x": { "default": 0 }, - "machine_head_shape_max_y": { "default": 0 }, - "machine_nozzle_gantry_distance": { "default": 0 }, - "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, - - "machine_start_gcode": { - "default": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_sparse_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..." - }, - "machine_end_gcode": { - "default": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}" - } - }, - - "overrides": { - "layer_height": { "default": 0.2 }, - "wall_thickness": { "default": 0.8 }, - "top_bottom_thickness": { "default": 0.3, "visible": true }, - "material_print_temperature": { "default": 195, "visible": true }, - "material_bed_temperature": { "default": 60, "visible": true }, - "material_diameter": { "default": 1.75, "visible": true }, - "speed_print": { "default": 60.0, "visible": true }, - "speed_infill": { "default": 100.0, "visible": true }, - "speed_topbottom": { "default": 15.0, "visible": true }, - "speed_travel": { "default": 150.0, "visible": true }, - "speed_layer_0": { "min_value": "0.1", "default": 15.0, "visible": true }, - "infill_overlap": { "default": 10.0 }, - "cool_fan_enabled": { "default": false, "visible": true }, - "cool_fan_speed": { "default": 0.0, "visible": true }, - "skirt_line_count": { "default": 3, "active_if": { "setting": "adhesion_type", "value": "None" } }, - "skirt_gap": { "default": 4.0, "active_if": { "setting": "adhesion_type", "value": "None" } }, - "skirt_minimal_length": { "default": 200.0, "active_if": { "setting": "adhesion_type", "value": "None" } } - } -} From eb11067d1574e2072718aec161f4d4e96b8c8f15 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 17:14:10 +0200 Subject: [PATCH 257/424] Translate definition for RigidBotBig Also translated the very old active_if properties! Contributes to issue CURA-1278. --- resources/definitions/rigidbot_big.def.json | 116 ++++++++++++++++++++ resources/machines/RigidBotBig.json | 55 ---------- 2 files changed, 116 insertions(+), 55 deletions(-) create mode 100644 resources/definitions/rigidbot_big.def.json delete mode 100644 resources/machines/RigidBotBig.json diff --git a/resources/definitions/rigidbot_big.def.json b/resources/definitions/rigidbot_big.def.json new file mode 100644 index 0000000000..045f86fafe --- /dev/null +++ b/resources/definitions/rigidbot_big.def.json @@ -0,0 +1,116 @@ +{ + "id": "rigidbotbig", + "version": 2, + "name": "RigidBotBig", + "inherits": "fdmprinter", + "metadata": { + "author": "RBC", + "manufacturer": "RigidBot", + "category": "Other", + "file_formats": "text/x-gcode", + "platform": "rigidbotbig_platform.stl" + }, + + "overrides": { + "machine_width": { + "default_value": 400 + }, + "machine_depth": { + "default_value": 300 + }, + "machine_height": { + "default_value": 254 + }, + "machine_heated_bed": { + "default_value": true + }, + "machine_nozzle_size": { + "default_value": 0.4 + }, + "machine_nozzle_heat_up_speed": { + "default_value": 2 + }, + "machine_nozzle_cool_down_speed": { + "default_value": 2 + }, + "machine_head_shape_min_x": { + "default_value": 0 + }, + "machine_head_shape_min_y": { + "default_value": 0 + }, + "machine_head_shape_max_x": { + "default_value": 0 + }, + "machine_head_shape_max_y": { + "default_value": 0 + }, + "machine_nozzle_gantry_distance": { + "default_value": 0 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_sparse_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..." + }, + "machine_end_gcode": { + "default_value": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}" + }, + "layer_height": { + "default_value": 0.2 + }, + "wall_thickness": { + "default_value": 0.8 + }, + "top_bottom_thickness": { + "default_value": 0.3 + }, + "material_print_temperature": { + "default_value": 195 + }, + "material_bed_temperature": { + "default_value": 60 + }, + "material_diameter": { + "default_value": 1.75 + }, + "speed_print": { + "default_value": 60 + }, + "speed_infill": { + "default_value": 100 + }, + "speed_topbottom": { + "default_value": 15 + }, + "speed_travel": { + "default_value": 150 + }, + "speed_layer_0": { + "default_value": 15, + "min_value": "0.1" + }, + "infill_overlap": { + "default_value": 10 + }, + "cool_fan_enabled": { + "default_value": false + }, + "cool_fan_speed": { + "default_value": 0 + }, + "skirt_line_count": { + "default_value": 3, + "enabled": "adhesion_type == \"Skirt\"" + }, + "skirt_gap": { + "default_value": 4, + "enabled": "adhesion_type == \"Skirt\"" + }, + "skirt_minimal_length": { + "default_value": 200, + "enabled": "adhesion_type == \"Skirt\"" + } + } +} \ No newline at end of file diff --git a/resources/machines/RigidBotBig.json b/resources/machines/RigidBotBig.json deleted file mode 100644 index 0f8fdb1481..0000000000 --- a/resources/machines/RigidBotBig.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "id": "rigidbotbig", - "version": 1, - "name": "RigidBotBig", - "manufacturer": "Other", - "author": "RBC", - "platform": "rigidbotbig_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "machine_settings": { - - "machine_width": { "default": 400 }, - "machine_depth": { "default": 300 }, - "machine_height": { "default": 254 }, - "machine_heated_bed": { "default": true }, - - "machine_nozzle_size": { "default": 0.4}, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_head_shape_min_x": { "default": 0 }, - "machine_head_shape_min_y": { "default": 0 }, - "machine_head_shape_max_x": { "default": 0 }, - "machine_head_shape_max_y": { "default": 0 }, - "machine_nozzle_gantry_distance": { "default": 0 }, - "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, - - "machine_start_gcode": { - "default": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_sparse_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..." - }, - "machine_end_gcode": { - "default": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}" - } - }, - - "overrides": { - "layer_height": { "default": 0.2 }, - "wall_thickness": { "default": 0.8 }, - "top_bottom_thickness": { "default": 0.3, "visible": true }, - "material_print_temperature": { "default": 195, "visible": true }, - "material_bed_temperature": { "default": 60, "visible": true }, - "material_diameter": { "default": 1.75, "visible": true }, - "speed_print": { "default": 60.0, "visible": true}, - "speed_infill": { "default": 100.0, "visible": true }, - "speed_topbottom": { "default": 15.0, "visible": true }, - "speed_travel": { "default": 150.0, "visible": true }, - "speed_layer_0": { "min_value": "0.1", "default": 15.0, "visible": true }, - "infill_overlap": { "default": 10.0 }, - "cool_fan_enabled": { "default": false, "visible": true}, - "cool_fan_speed": { "default": 0.0, "visible": true }, - "skirt_line_count": { "default": 3, "active_if": { "setting": "adhesion_type", "value": "None" } }, - "skirt_gap": { "default": 4.0, "active_if": { "setting": "adhesion_type", "value": "None" } }, - "skirt_minimal_length": { "default": 200.0, "active_if": { "setting": "adhesion_type", "value": "None" } } - } -} From f15445b1a3f2de6d5e191341059d3c707b628230 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 17:26:01 +0200 Subject: [PATCH 258/424] Translate definition for Ultimaker The preferred variant/profile/material has moved to the metadata. Contributes to issue CURA-1278. --- resources/definitions/ultimaker.def.json | 14 ++++++++++++++ resources/machines/ultimaker.json | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 resources/definitions/ultimaker.def.json delete mode 100644 resources/machines/ultimaker.json diff --git a/resources/definitions/ultimaker.def.json b/resources/definitions/ultimaker.def.json new file mode 100644 index 0000000000..60e4dbbf40 --- /dev/null +++ b/resources/definitions/ultimaker.def.json @@ -0,0 +1,14 @@ +{ + "id": "ultimaker_base", + "version": 2, + "visible": false, + "name": "Ultimaker", + "inherits": "fdmprinter", + "metadata": { + "author": "Ultimaker", + "manufacturer": "Ultimaker", + "preferred_profile": "Normal Quality", + "preferred_nozzle": "0.4 mm", + "preferred_material": "PLA" + } +} diff --git a/resources/machines/ultimaker.json b/resources/machines/ultimaker.json deleted file mode 100644 index a7a9cd3994..0000000000 --- a/resources/machines/ultimaker.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "ultimaker_base", - "version": 1, - "visible": false, - "name": "Ultimaker", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "inherits": "fdmprinter.json", - - "machine_preferences": { - "prefered_profile": "Normal Quality", - "prefered_variant": "0.4 mm", - "prefered_material": "PLA" - } -} From de7fe1185ed484380405cfd3aed3c5de662c2e05 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 May 2016 17:39:06 +0200 Subject: [PATCH 259/424] Translate definition for Ultimaker2 The extruder trains setting has been moved to dual_extrusion_printer.json. It must be merged into fdmprinter later. Contributes to issue CURA-1278. --- resources/definitions/ultimaker2.def.json | 108 ++++++++++++++++++ .../machines/dual_extrusion_printer.json | 58 +++++++++- resources/machines/ultimaker2.json | 95 --------------- 3 files changed, 162 insertions(+), 99 deletions(-) create mode 100644 resources/definitions/ultimaker2.def.json delete mode 100644 resources/machines/ultimaker2.json diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json new file mode 100644 index 0000000000..10b6041f0f --- /dev/null +++ b/resources/definitions/ultimaker2.def.json @@ -0,0 +1,108 @@ +{ + "id": "ultimaker2", + "version": 2, + "name": "Ultimaker 2", + "inherits": "ultimaker", + "metadata": { + "author": "Ultimaker", + "manufacturer": "Ultimaker", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker2.png", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png" + }, + "overrides": { + "machine_start_gcode" : { + "default": "" + }, + "machine_end_gcode" : { + "default": "" + }, + "machine_width": { + "default": 223 + }, + "machine_depth": { + "default": 223 + }, + "machine_height": { + "default": 205 + }, + "machine_heated_bed": { + "default": true + }, + "machine_head_with_fans_polygon": + { + "default": [ + [ -42, 12 ], + [ -42, -32 ], + [ 62, 12 ], + [ 62, -32 ] + ] + }, + "machine_center_is_zero": { + "default": false + }, + "machine_nozzle_size": { + "default": 0.4, + "min_value": "0.001" + }, + "machine_nozzle_heat_up_speed": { + "default": 2 + }, + "machine_nozzle_cool_down_speed": { + "default": 2 + }, + "gantry_height": { + "default": 55 + }, + "machine_use_extruder_offset_to_offset_coords": { + "default": true + }, + "machine_gcode_flavor": { + "default": "UltiGCode" + }, + "machine_disallowed_areas": { + "default": [ + [[-115, 112.5], [ -82, 112.5], [ -84, 102.5], [-115, 102.5]], + [[ 115, 112.5], [ 115, 102.5], [ 110, 102.5], [ 108, 112.5]], + [[-115, -112.5], [-115, -104.5], [ -84, -104.5], [ -82, -112.5]], + [[ 115, -112.5], [ 108, -112.5], [ 110, -104.5], [ 115, -104.5]] + ]}, + "machine_platform_offset": { + "default": [9, 0, 0] + }, + "machine_nozzle_tip_outer_diameter": { + "default": 1 + }, + "machine_nozzle_head_distance": { + "default": 3 + }, + "machine_nozzle_expansion_angle": { + "default": 45 + }, + "material_print_temperature": { + "enabled": "False" + }, + "material_bed_temperature": { + "enabled": "False" + }, + "material_diameter": { + "enabled": "False" + }, + "material_flow": { + "enabled": "False" + }, + "retraction_amount": { + "enabled": "False" + }, + "retraction_speed": { + "enabled": "False" + }, + "retraction_retract_speed": { + "enabled": "False" + }, + "retraction_prime_speed": { + "enabled": "False" + } + } +} \ No newline at end of file diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json index 2977345bcb..57ad490cdd 100644 --- a/resources/machines/dual_extrusion_printer.json +++ b/resources/machines/dual_extrusion_printer.json @@ -9,12 +9,62 @@ "machine_extruder_trains": { "0": { - "extruder_nr": { "default": 0 }, - "machine_nozzle_offset_x": { "default": 0.0 }, - "machine_nozzle_offset_y": { "default": 0.0 } + "extruder_nr": { + "default": 0 + }, + "machine_nozzle_offset_x": { + "default": 0 + }, + "machine_nozzle_offset_y": { + "default": 0 + }, + "machine_nozzle_heat_up_speed": { + "default": 2 + }, + "machine_nozzle_cool_down_speed": { + "default": 2 + }, + "machine_nozzle_tip_outer_diameter": { + "default": 1 + }, + "machine_nozzle_head_distance": { + "default": 3 + }, + "machine_nozzle_expansion_angle": { + "default": 45 + }, + "machine_heat_zone_length": { + "default": 16 + } }, "1": { - "extruder_nr": { "default": 1 } + "extruder_nr": { + "default": 1 + }, + "machine_nozzle_offset_x": { + "default": 0 + }, + "machine_nozzle_offset_y": { + "default": 0 + }, + "machine_nozzle_heat_up_speed": { + "default": 2 + }, + "machine_nozzle_cool_down_speed": { + "default": 2 + }, + "machine_nozzle_tip_outer_diameter": { + "default": 1 + }, + "machine_nozzle_head_distance": { + "default": 3 + }, + "machine_nozzle_expansion_angle": { + "default": 45 + }, + "machine_heat_zone_length": { + "default": 16 + } } }, diff --git a/resources/machines/ultimaker2.json b/resources/machines/ultimaker2.json deleted file mode 100644 index e19aec1336..0000000000 --- a/resources/machines/ultimaker2.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "id": "ultimaker2", - "version": 1, - "name": "Ultimaker 2", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "icon": "icon_ultimaker2.png", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2backplate.png", - "file_formats": "text/x-gcode", - - "inherits": "ultimaker.json", - - "machine_extruder_trains": { - "0": { - "machine_nozzle_heat_up_speed": { - "default": 2.0 - }, - "machine_nozzle_cool_down_speed": { - "default": 2.0 - }, - "machine_nozzle_tip_outer_diameter": { - "default": 1 - }, - "machine_nozzle_head_distance": { - "default": 3 - }, - "machine_nozzle_expansion_angle": { - "default": 45 - }, - "machine_heat_zone_length": { - "default": 16 - } - } - }, - "machine_settings": { - "machine_start_gcode" : { "default": "" }, - "machine_end_gcode" : { "default": "" }, - "machine_width": { "default": 223 }, - "machine_depth": { "default": 223 }, - "machine_height": { "default": 205 }, - "machine_heated_bed": { "default": true }, - - "machine_head_with_fans_polygon": - { - "default": [ - [ - -42, - 12 - ], - [ - -42, - -32 - ], - [ - 62, - 12 - ], - [ - 62, - -32 - ] - ] - }, - "machine_center_is_zero": { "default": false }, - "machine_nozzle_size": { "default": 0.4, "min_value": "0.001"}, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "gantry_height": { "default": 55 }, - "machine_use_extruder_offset_to_offset_coords": { "default": true }, - "machine_gcode_flavor": { "default": "UltiGCode" }, - "machine_disallowed_areas": { "default": [ - [[-115.0, 112.5], [ -82.0, 112.5], [ -84.0, 102.5], [-115.0, 102.5]], - [[ 115.0, 112.5], [ 115.0, 102.5], [ 110.0, 102.5], [ 108.0, 112.5]], - [[-115.0, -112.5], [-115.0, -104.5], [ -84.0, -104.5], [ -82.0, -112.5]], - [[ 115.0, -112.5], [ 108.0, -112.5], [ 110.0, -104.5], [ 115.0, -104.5]] - ]}, - "machine_platform_offset": { "default": [9.0, 0.0, 0.0] }, - - "machine_nozzle_tip_outer_diameter": { "default": 1.0 }, - "machine_nozzle_head_distance": { "default": 3.0 }, - "machine_nozzle_expansion_angle": { "default": 45 } - }, - - "overrides": { - "material_print_temperature": { "enabled": "False" }, - "material_bed_temperature": { "enabled": "False" }, - "material_diameter": { "enabled": "False" }, - "material_flow": { "enabled": "False" }, - "retraction_amount": { "enabled": "False" }, - "retraction_speed": { "enabled": "False" }, - "retraction_retract_speed": { "enabled": "False" }, - "retraction_prime_speed": { "enabled": "False" } - } -} From 0664cbd2f6ddf20aa7738a600ccd02576d005a8a Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 17 May 2016 18:37:18 +0200 Subject: [PATCH 260/424] Make sure to set the right type for the "current settings" instance container --- cura/MachineManagerModel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 82c8cd1328..0d3540475e 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -76,6 +76,7 @@ class MachineManagerModel(QObject): current_settings_instance_container = UM.Settings.InstanceContainer(name + "_current_settings") current_settings_instance_container.addMetaDataEntry("machine", name) + current_settings_instance_container.addMetaDataEntry("type", "user") current_settings_instance_container.setDefinition(definitions[0]) UM.Settings.ContainerRegistry.getInstance().addContainer(current_settings_instance_container) From 9bfb98e75f04bfef75172222bddfb8710e9d7755 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 17 May 2016 18:38:06 +0200 Subject: [PATCH 261/424] Make ultimaker2 definition visible in the add machine dialog --- resources/definitions/ultimaker2.def.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json index 10b6041f0f..c61f43c37c 100644 --- a/resources/definitions/ultimaker2.def.json +++ b/resources/definitions/ultimaker2.def.json @@ -4,6 +4,7 @@ "name": "Ultimaker 2", "inherits": "ultimaker", "metadata": { + "visible": true, "author": "Ultimaker", "manufacturer": "Ultimaker", "file_formats": "text/x-gcode", @@ -105,4 +106,4 @@ "enabled": "False" } } -} \ No newline at end of file +} From a187747bdc6df2e6980c40d3b545efcb6d7ca5e5 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 18 May 2016 09:35:05 +0200 Subject: [PATCH 262/424] prusa_i3_xl now inherits correct base file CURA-1278 --- resources/definitions/prusa_i3_xl.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/prusa_i3_xl.def.json b/resources/definitions/prusa_i3_xl.def.json index 0c2b9e823f..4017eda0f4 100644 --- a/resources/definitions/prusa_i3_xl.def.json +++ b/resources/definitions/prusa_i3_xl.def.json @@ -2,7 +2,7 @@ "id": "prusa_i3_xl", "version": 2, "name": "Prusa i3 xl", - "inherits": "fdmprinter.json", + "inherits": "fdmprinter", "metadata": { "author": "guigashm", "manufacturer": "Prusajr", From 43d42405b2c40287d39ff3034f34a07fb68ea38e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 18 May 2016 09:39:04 +0200 Subject: [PATCH 263/424] Updated property names to new API CURA-1278 --- .../definitions/innovo_inventor.def.json | 2 +- resources/definitions/m180.def.json | 6 +-- resources/definitions/rigidbot.def.json | 2 +- resources/definitions/rigidbot_big.def.json | 2 +- resources/definitions/ultimaker2.def.json | 40 +++++++++---------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index 5ab8d4f2e1..c2ccbdbc71 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -95,7 +95,7 @@ }, "speed_layer_0": { "default_value": 30.0, - "min_value": 0.1 + "minimum_value": 0.1 }, "infill_overlap": { "default_value": 10.0 diff --git a/resources/definitions/m180.def.json b/resources/definitions/m180.def.json index 36d8be6e1f..e339dbddee 100644 --- a/resources/definitions/m180.def.json +++ b/resources/definitions/m180.def.json @@ -25,7 +25,7 @@ }, "machine_nozzle_size": { "default_value": 0.4, - "min_value": "0.001" + "minimum_value": "0.001" }, "machine_head_with_fans_polygon": { "default_value": [ @@ -49,8 +49,8 @@ }, "material_diameter": { "default_value": 1.75, - "min_value_warning": "1.5", - "max_value_warning": "2.0" + "minimum_value_warning": "1.5", + "maximum_value_warning": "2.0" } } } \ No newline at end of file diff --git a/resources/definitions/rigidbot.def.json b/resources/definitions/rigidbot.def.json index 0de11f09b8..cf71508f3d 100644 --- a/resources/definitions/rigidbot.def.json +++ b/resources/definitions/rigidbot.def.json @@ -86,7 +86,7 @@ }, "speed_layer_0": { "default_value": 15, - "min_value": "0.1" + "minimum_value": "0.1" }, "infill_overlap": { "default_value": 10 diff --git a/resources/definitions/rigidbot_big.def.json b/resources/definitions/rigidbot_big.def.json index 045f86fafe..ef2c93015d 100644 --- a/resources/definitions/rigidbot_big.def.json +++ b/resources/definitions/rigidbot_big.def.json @@ -89,7 +89,7 @@ }, "speed_layer_0": { "default_value": 15, - "min_value": "0.1" + "minimum_value": "0.1" }, "infill_overlap": { "default_value": 10 diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json index c61f43c37c..ae35858730 100644 --- a/resources/definitions/ultimaker2.def.json +++ b/resources/definitions/ultimaker2.def.json @@ -14,26 +14,26 @@ }, "overrides": { "machine_start_gcode" : { - "default": "" + "default_value": "" }, "machine_end_gcode" : { - "default": "" + "default_value": "" }, "machine_width": { - "default": 223 + "default_value": 223 }, "machine_depth": { - "default": 223 + "default_value": 223 }, "machine_height": { - "default": 205 + "default_value": 205 }, "machine_heated_bed": { - "default": true + "default_value": true }, "machine_head_with_fans_polygon": { - "default": [ + "default_value": [ [ -42, 12 ], [ -42, -32 ], [ 62, 12 ], @@ -41,45 +41,45 @@ ] }, "machine_center_is_zero": { - "default": false + "default_value": false }, "machine_nozzle_size": { - "default": 0.4, - "min_value": "0.001" + "default_value": 0.4, + "minimum_value": "0.001" }, "machine_nozzle_heat_up_speed": { - "default": 2 + "default_value": 2 }, "machine_nozzle_cool_down_speed": { - "default": 2 + "default_value": 2 }, "gantry_height": { - "default": 55 + "default_value": 55 }, "machine_use_extruder_offset_to_offset_coords": { - "default": true + "default_value": true }, "machine_gcode_flavor": { - "default": "UltiGCode" + "default_value": "UltiGCode" }, "machine_disallowed_areas": { - "default": [ + "default_value": [ [[-115, 112.5], [ -82, 112.5], [ -84, 102.5], [-115, 102.5]], [[ 115, 112.5], [ 115, 102.5], [ 110, 102.5], [ 108, 112.5]], [[-115, -112.5], [-115, -104.5], [ -84, -104.5], [ -82, -112.5]], [[ 115, -112.5], [ 108, -112.5], [ 110, -104.5], [ 115, -104.5]] ]}, "machine_platform_offset": { - "default": [9, 0, 0] + "default_value": [9, 0, 0] }, "machine_nozzle_tip_outer_diameter": { - "default": 1 + "default_value": 1 }, "machine_nozzle_head_distance": { - "default": 3 + "default_value": 3 }, "machine_nozzle_expansion_angle": { - "default": 45 + "default_value": 45 }, "material_print_temperature": { "enabled": "False" From 51e57b1f91f53729b7d66c33a404785c09e3ce63 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 18 May 2016 09:44:53 +0200 Subject: [PATCH 264/424] Added visibility meta data CURA-1278 --- resources/definitions/bq_hephestos.def.json | 1 + resources/definitions/bq_hephestos_2.def.json | 1 + resources/definitions/bq_hephestos_xl.def.json | 1 + resources/definitions/bq_witbox.def.json | 1 + resources/definitions/bq_witbox_2.def.json | 1 + resources/definitions/grr_neo.def.json | 1 + resources/definitions/innovo_inventor.def.json | 1 + resources/definitions/m180.def.json | 1 + resources/definitions/maker_starter.def.json | 1 + resources/definitions/prusa_i3.def.json | 1 + resources/definitions/prusa_i3_xl.def.json | 1 + resources/definitions/rigidbot.def.json | 1 + resources/definitions/rigidbot_big.def.json | 1 + 13 files changed, 13 insertions(+) diff --git a/resources/definitions/bq_hephestos.def.json b/resources/definitions/bq_hephestos.def.json index b9f0f3dca5..65d6fc38a3 100644 --- a/resources/definitions/bq_hephestos.def.json +++ b/resources/definitions/bq_hephestos.def.json @@ -4,6 +4,7 @@ "version": 2, "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "BQ", "manufacturer": "BQ", "category": "Other", diff --git a/resources/definitions/bq_hephestos_2.def.json b/resources/definitions/bq_hephestos_2.def.json index e072fbf1db..959b53bd48 100644 --- a/resources/definitions/bq_hephestos_2.def.json +++ b/resources/definitions/bq_hephestos_2.def.json @@ -4,6 +4,7 @@ "name": "BQ Hephestos 2", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "BQ", "manufacturer": "BQ", "category": "Other", diff --git a/resources/definitions/bq_hephestos_xl.def.json b/resources/definitions/bq_hephestos_xl.def.json index 224d219504..9cf5b685db 100644 --- a/resources/definitions/bq_hephestos_xl.def.json +++ b/resources/definitions/bq_hephestos_xl.def.json @@ -4,6 +4,7 @@ "name": "BQ Prusa i3 Hephestos XL", "inherits": "fdmprinter", "metadata": { + "visible": true, "manufacturer": "BQ", "author": "BQ", "category": "Other", diff --git a/resources/definitions/bq_witbox.def.json b/resources/definitions/bq_witbox.def.json index 3d021cc529..77826a1576 100644 --- a/resources/definitions/bq_witbox.def.json +++ b/resources/definitions/bq_witbox.def.json @@ -4,6 +4,7 @@ "name": "BQ Witbox", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "BQ", "manufacturer": "BQ", "category": "Other", diff --git a/resources/definitions/bq_witbox_2.def.json b/resources/definitions/bq_witbox_2.def.json index 58f70c95b7..a98a8b909d 100644 --- a/resources/definitions/bq_witbox_2.def.json +++ b/resources/definitions/bq_witbox_2.def.json @@ -4,6 +4,7 @@ "name": "BQ Witbox 2", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "BQ", "manufacturer": "BQ", "category": "Other", diff --git a/resources/definitions/grr_neo.def.json b/resources/definitions/grr_neo.def.json index 3fb6804c40..9fc5d2121e 100644 --- a/resources/definitions/grr_neo.def.json +++ b/resources/definitions/grr_neo.def.json @@ -4,6 +4,7 @@ "name": "German RepRap Neo", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "Simon Cor", "manufacturer": "German RepRap", "category": "Other", diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index c2ccbdbc71..d40256813b 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -4,6 +4,7 @@ "name": "Innovo INVENTOR", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "Adam Rumjahn", "manufacturer": "Innovo", "category": "Other", diff --git a/resources/definitions/m180.def.json b/resources/definitions/m180.def.json index e339dbddee..bb027d33bc 100644 --- a/resources/definitions/m180.def.json +++ b/resources/definitions/m180.def.json @@ -4,6 +4,7 @@ "name": "Malyan M180", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "Ruben Dulek", "manufacturer": "Malyan", "category": "Other", diff --git a/resources/definitions/maker_starter.def.json b/resources/definitions/maker_starter.def.json index 376fea8c29..797b57f771 100644 --- a/resources/definitions/maker_starter.def.json +++ b/resources/definitions/maker_starter.def.json @@ -4,6 +4,7 @@ "name": "3DMaker Starter", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "tvlgiao", "manufacturer": "3DMaker", "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj", diff --git a/resources/definitions/prusa_i3.def.json b/resources/definitions/prusa_i3.def.json index 26c36b605e..21db84838a 100644 --- a/resources/definitions/prusa_i3.def.json +++ b/resources/definitions/prusa_i3.def.json @@ -4,6 +4,7 @@ "name": "Prusa i3", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "Quillford", "manufacturer": "Prusajr", "category": "Other", diff --git a/resources/definitions/prusa_i3_xl.def.json b/resources/definitions/prusa_i3_xl.def.json index 4017eda0f4..ddd1796eb7 100644 --- a/resources/definitions/prusa_i3_xl.def.json +++ b/resources/definitions/prusa_i3_xl.def.json @@ -4,6 +4,7 @@ "name": "Prusa i3 xl", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "guigashm", "manufacturer": "Prusajr", "category": "Other", diff --git a/resources/definitions/rigidbot.def.json b/resources/definitions/rigidbot.def.json index cf71508f3d..e70c407463 100644 --- a/resources/definitions/rigidbot.def.json +++ b/resources/definitions/rigidbot.def.json @@ -4,6 +4,7 @@ "name": "RigidBot", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "RBC", "manufacturer": "RigidBot", "category": "Other", diff --git a/resources/definitions/rigidbot_big.def.json b/resources/definitions/rigidbot_big.def.json index ef2c93015d..f4b282d9db 100644 --- a/resources/definitions/rigidbot_big.def.json +++ b/resources/definitions/rigidbot_big.def.json @@ -4,6 +4,7 @@ "name": "RigidBotBig", "inherits": "fdmprinter", "metadata": { + "visible": true, "author": "RBC", "manufacturer": "RigidBot", "category": "Other", From b635b075690938f85a2b63071c91575d36352d28 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 09:47:15 +0200 Subject: [PATCH 265/424] Translate definition for Ultimaker 2 Extended Contributes to issue CURA-1278. --- .../definitions/ultimaker2_extended.def.json | 20 +++++++++++++++++++ resources/machines/ultimaker2_extended.json | 16 --------------- 2 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 resources/definitions/ultimaker2_extended.def.json delete mode 100644 resources/machines/ultimaker2_extended.json diff --git a/resources/definitions/ultimaker2_extended.def.json b/resources/definitions/ultimaker2_extended.def.json new file mode 100644 index 0000000000..1d7ef8bbd2 --- /dev/null +++ b/resources/definitions/ultimaker2_extended.def.json @@ -0,0 +1,20 @@ +{ + "id": "ultimaker2_extended", + "version": 2, + "name": "Ultimaker 2 Extended", + "inherits": "ultimaker2", + "metadata": { + "author": "Ultimaker", + "manufacturer": "Ultimaker", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker2.png", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2Extendedbackplate.png" + }, + + "overrides": { + "machine_height": { + "default": 315 + } + } +} diff --git a/resources/machines/ultimaker2_extended.json b/resources/machines/ultimaker2_extended.json deleted file mode 100644 index 0cd5ff0002..0000000000 --- a/resources/machines/ultimaker2_extended.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "id": "ultimaker2_extended", - "version": 1, - "name": "Ultimaker 2 Extended", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "icon": "icon_ultimaker2.png", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2Extendedbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2.json", - - "machine_settings": { - "machine_height": { "default": 315 } - } -} From 34632a762a44512ef409eb0f11d339b925723b15 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 09:48:44 +0200 Subject: [PATCH 266/424] Use default_value instead of default Forgot this again. Good morning Ghostkeeper. Contributes to issue CURA-1278. --- resources/definitions/ultimaker2_extended.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker2_extended.def.json b/resources/definitions/ultimaker2_extended.def.json index 1d7ef8bbd2..361132ea95 100644 --- a/resources/definitions/ultimaker2_extended.def.json +++ b/resources/definitions/ultimaker2_extended.def.json @@ -14,7 +14,7 @@ "overrides": { "machine_height": { - "default": 315 + "default_value": 315 } } } From a7f93b2a922dce298fca3894e57aa6368c955939 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 09:50:04 +0200 Subject: [PATCH 267/424] Add category to metadata Also forgot that. Good morning, Ghost. Contributes to issue CURA-1278. --- resources/definitions/ultimaker2_extended.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/ultimaker2_extended.def.json b/resources/definitions/ultimaker2_extended.def.json index 361132ea95..e3c7d1fd01 100644 --- a/resources/definitions/ultimaker2_extended.def.json +++ b/resources/definitions/ultimaker2_extended.def.json @@ -6,6 +6,7 @@ "metadata": { "author": "Ultimaker", "manufacturer": "Ultimaker", + "category": "Ultimaker", "file_formats": "text/x-gcode", "icon": "icon_ultimaker2.png", "platform": "ultimaker2_platform.obj", From 4947dfffb8e27e8c70c6f14f9c10cb6649557f03 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 09:52:54 +0200 Subject: [PATCH 268/424] Translate definition for Ultimaker 2 Extended+ It remains to be seen what we do with the variants of this machine and consequently the visibility of this machine. Contributes to issue CURA-1278. --- .../ultimaker2_extended_plus.def.json | 30 +++++++++++++++++++ .../machines/ultimaker2_extended_plus.json | 19 ------------ 2 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 resources/definitions/ultimaker2_extended_plus.def.json delete mode 100644 resources/machines/ultimaker2_extended_plus.json diff --git a/resources/definitions/ultimaker2_extended_plus.def.json b/resources/definitions/ultimaker2_extended_plus.def.json new file mode 100644 index 0000000000..5283209745 --- /dev/null +++ b/resources/definitions/ultimaker2_extended_plus.def.json @@ -0,0 +1,30 @@ +{ + "id": "ultimaker2_extended_plus_base", + "version": 2, + "name": "Ultimaker 2 Extended+", + "inherits": "ultimaker2plus", + "visible": false, + "metadata": { + "author": "Ultimaker", + "manufacturer": "Ultimaker", + "category": "Ultimaker", + "file_formats": "text/x-gcode", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2ExtendedPlusbackplate.png" + }, + + "overrides": { + "machine_height": { + "default_value": 313 + }, + "machine_show_variants": { + "default_value": true + }, + "machine_nozzle_head_distance": { + "default_value": 5 + }, + "machine_nozzle_expansion_angle": { + "default_value": 45 + } + } +} diff --git a/resources/machines/ultimaker2_extended_plus.json b/resources/machines/ultimaker2_extended_plus.json deleted file mode 100644 index 318361a894..0000000000 --- a/resources/machines/ultimaker2_extended_plus.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "ultimaker2_extended_plus_base", - "version": 1, - "name": "Ultimaker 2 Extended+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", - "visible": false, - "file_formats": "text/x-gcode", - "inherits": "ultimaker2plus.json", - - "machine_settings": { - "machine_height": { "default": 313 }, - "machine_show_variants": { "default": true }, - "machine_nozzle_head_distance": { "default": 5 }, - "machine_nozzle_expansion_angle": { "default": 45 } - } -} From d0c9b964167678c05efcb5f5c7f9cb0a9beb4d07 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 09:57:25 +0200 Subject: [PATCH 269/424] Translate definition for Ultimaker 2 Go Contributes to issue CURA-1278. --- resources/definitions/ultimaker2_go.def.json | 41 ++++++++++++++++++++ resources/machines/ultimaker2_go.json | 26 ------------- 2 files changed, 41 insertions(+), 26 deletions(-) create mode 100644 resources/definitions/ultimaker2_go.def.json delete mode 100644 resources/machines/ultimaker2_go.json diff --git a/resources/definitions/ultimaker2_go.def.json b/resources/definitions/ultimaker2_go.def.json new file mode 100644 index 0000000000..e439006170 --- /dev/null +++ b/resources/definitions/ultimaker2_go.def.json @@ -0,0 +1,41 @@ +{ + "id": "ultimaker2_go", + "version": 2, + "name": "Ultimaker 2 Go", + "inherits": "ultimaker2", + "metadata": { + "author": "Ultimaker", + "manufacturer": "Ultimaker", + "category": "Ultimaker", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker2.png", + "platform": "ultimaker2go_platform.obj", + "platform_texture": "Ultimaker2Gobackplate.png" + }, + + "overrides": { + "machine_width": { + "default_value": 120 + }, + "machine_depth": { + "default_value": 120 + }, + "machine_height": { + "default_value": 115 + }, + "machine_heated_bed": { + "default_value": false + }, + "machine_disallowed_areas": { + "default_value": [ + [[-60, 60], [-33, 60], [-35, 52], [-60, 52]], + [[ 60, 60], [ 60, 52], [ 35, 52], [ 33, 60]], + [[-60, -60], [-60, -52], [-35, -52], [-33, -60]], + [[ 60, -60], [ 33, -60], [ 35, -52], [ 60, -52]] + ] + }, + "machine_platform_offset": { + "default_value": [0, 0, 0] + } + } +} diff --git a/resources/machines/ultimaker2_go.json b/resources/machines/ultimaker2_go.json deleted file mode 100644 index cc2cde09d7..0000000000 --- a/resources/machines/ultimaker2_go.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "id": "ultimaker2_go", - "version": 1, - "name": "Ultimaker 2 Go", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "icon": "icon_ultimaker2.png", - "platform": "ultimaker2go_platform.obj", - "platform_texture": "Ultimaker2Gobackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2.json", - - "overrides": { - "machine_width": { "default": 120 }, - "machine_depth": { "default": 120 }, - "machine_height": { "default": 115 }, - "machine_heated_bed": { "default": false }, - "machine_disallowed_areas": { "default": [ - [[-60.0, 60.0], [-33.0, 60.0], [-35.0, 52.0], [-60.0, 52.0]], - [[ 60.0, 60.0], [ 60.0, 52.0], [ 35.0, 52.0], [ 33.0, 60.0]], - [[-60.0, -60.0], [-60.0, -52.0], [-35.0, -52.0], [-33.0, -60.0]], - [[ 60.0, -60.0], [ 33.0, -60.0], [ 35.0, -52.0], [ 60.0, -52.0]] - ]}, - "machine_platform_offset": { "default": [0.0, 0.0, 0.0] } - } -} From 2b47fc738b3c5cf5af936ef793a5a0bbac6befbc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 10:16:54 +0200 Subject: [PATCH 270/424] Translate definition for Ultimaker 2+ I've translated the inherit functions as values. Contributes to issue CURA-1278. --- .../definitions/ultimaker2_plus.def.json | 71 +++++++++++++++++++ resources/machines/ultimaker2plus.json | 54 -------------- 2 files changed, 71 insertions(+), 54 deletions(-) create mode 100644 resources/definitions/ultimaker2_plus.def.json delete mode 100644 resources/machines/ultimaker2plus.json diff --git a/resources/definitions/ultimaker2_plus.def.json b/resources/definitions/ultimaker2_plus.def.json new file mode 100644 index 0000000000..6a61d18d3c --- /dev/null +++ b/resources/definitions/ultimaker2_plus.def.json @@ -0,0 +1,71 @@ +{ + "id": "ultimaker2plus_base", + "version": 2, + "name": "Ultimaker 2+", + "inherits": "ultimaker2", + "visible": "false", + "metadata": { + "author": "Ultimaker", + "manufacturer": "Ultimaker", + "category": "Ultimaker", + "file_formats": "text/x-gcode", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2Plusbackplate.png" + }, + + "overrides": { + "speed_infill": { + "value": "speed_print" + }, + "speed_wall_x": { + "value": "speed_wall" + }, + "layer_height_0": { + "value": "round(machine_nozzle_size / 1.5, 2)" + }, + "line_width": { + "value": "round(machine_nozzle_size * 0.875, 2)" + }, + "speed_layer_0": { + "default_value": 20 + }, + "speed_support": { + "value": "speed_wall_0" + }, + "machine_height": { + "default_value": 203 + }, + "machine_show_variants": { + "default_value": true + }, + "gantry_height": { + "default_value": 52 + }, + "machine_nozzle_head_distance": { + "default_value": 5 + }, + "machine_nozzle_expansion_angle": { + "default_value": 45 + }, + "machine_heat_zone_length": { + "default_value": 20 + }, + "machine_head_with_fans_polygon": + { + "default_value": [ + [ -44, 14 ], + [ -44, -34 ], + [ 64, 14 ], + [ 64, -34 ] + ] + }, + "machine_disallowed_areas": { + "default_value": [ + [[-115, 112.5], [ -78, 112.5], [ -80, 102.5], [-115, 102.5]], + [[ 115, 112.5], [ 115, 102.5], [ 105, 102.5], [ 103, 112.5]], + [[-115, -112.5], [-115, -104.5], [ -84, -104.5], [ -82, -112.5]], + [[ 115, -112.5], [ 108, -112.5], [ 110, -104.5], [ 115, -104.5]] + ] + } + } +} diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json deleted file mode 100644 index cc86bd8ce3..0000000000 --- a/resources/machines/ultimaker2plus.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "id": "ultimaker2plus_base", - "version": 1, - "name": "Ultimaker 2+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2Plusbackplate.png", - "visible": false, - "file_formats": "text/x-gcode", - "inherits": "ultimaker2.json", - - "overrides": { - "speed_infill": { "inherit_function": "speed_print" }, - "speed_wall_x": { "inherit_function": "speed_wall" }, - "layer_height_0": { "inherit_function": "round(machine_nozzle_size / 1.5, 2)" }, - "line_width": { "inherit_function": "round(machine_nozzle_size * 0.875, 2)" }, - "speed_layer_0": { "default": "20" }, - "speed_support": { "inherit_function": "speed_wall_0" }, - "machine_height": { "default": 203 }, - "machine_show_variants": { "default": true }, - "gantry_height": { "default": 52 }, - "machine_nozzle_head_distance": { "default": 5 }, - "machine_nozzle_expansion_angle": { "default": 45 }, - "machine_heat_zone_length": { "default": 20 }, - "machine_head_with_fans_polygon": - { - "default": [ - [ - -44, - 14 - ], - [ - -44, - -34 - ], - [ - 64, - 14 - ], - [ - 64, - -34 - ] - ] - }, - "machine_disallowed_areas": { "default": [ - [[-115.0, 112.5], [ -78.0, 112.5], [ -80.0, 102.5], [-115.0, 102.5]], - [[ 115.0, 112.5], [ 115.0, 102.5], [ 105.0, 102.5], [ 103.0, 112.5]], - [[-115.0, -112.5], [-115.0, -104.5], [ -84.0, -104.5], [ -82.0, -112.5]], - [[ 115.0, -112.5], [ 108.0, -112.5], [ 110.0, -104.5], [ 115.0, -104.5]] - ]} - } -} From 7714d6f720b4cdeedce8fc4b934964c5c0d5f4bc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 10:21:30 +0200 Subject: [PATCH 271/424] Translate definition for Ultimaker Original Contributes to issue CURA-1278. --- .../definitions/ultimaker_original.def.json | 70 ++++++++++++++++ resources/machines/ultimaker_original.json | 83 ------------------- 2 files changed, 70 insertions(+), 83 deletions(-) create mode 100644 resources/definitions/ultimaker_original.def.json delete mode 100644 resources/machines/ultimaker_original.json diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json new file mode 100644 index 0000000000..8f47962be9 --- /dev/null +++ b/resources/definitions/ultimaker_original.def.json @@ -0,0 +1,70 @@ +{ + "id": "ultimaker_original", + "version": 2, + "name": "Ultimaker Original", + "inherits": "ultimaker", + "metadata": { + "author": "Ultimaker", + "manufacturer": "Ultimaker", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker.png", + "platform": "ultimaker_platform.stl", + "pages": [ + "SelectUpgradedParts", + "UpgradeFirmware", + "UltimakerCheckup", + "BedLeveling" + ] + }, + + "overrides": { + "machine_width": { + "default": 205 + }, + "machine_height": { + "default": 200 + }, + "machine_depth": { + "default": 205 + }, + "machine_center_is_zero": { + "default": false + }, + "machine_nozzle_size": { + "default": 0.4 + }, + "machine_nozzle_heat_up_speed": { + "default": 2 + }, + "machine_nozzle_cool_down_speed": { + "default": 2 + }, + "machine_head_with_fans_polygon": + { + "default": [ + [ -75, 35 ], + [ -75, -18 ], + [ 18, 35 ], + [ 18, -18 ] + ] + }, + "gantry_height": { + "default": 55 + }, + "machine_use_extruder_offset_to_offset_coords": { + "default": true + }, + "machine_gcode_flavor": { + "default": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E6 ;extrude 6 mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + }, + "machine_end_gcode": { + "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + }, + "machine_extruder_drive_upgrade": { + "default": false + } + } +} diff --git a/resources/machines/ultimaker_original.json b/resources/machines/ultimaker_original.json deleted file mode 100644 index 3e694c1b8e..0000000000 --- a/resources/machines/ultimaker_original.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "id": "ultimaker_original", - "version": 1, - "name": "Ultimaker Original", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "icon": "icon_ultimaker.png", - "platform": "ultimaker_platform.stl", - "file_formats": "text/x-gcode", - "inherits": "ultimaker.json", - - "pages": [ - "SelectUpgradedParts", - "UpgradeFirmware", - "UltimakerCheckup", - "BedLeveling" - ], - - "machine_extruder_trains": { - "0": { - "machine_nozzle_heat_up_speed": { - "default": 2.0 - }, - "machine_nozzle_cool_down_speed": { - "default": 2.0 - }, - "machine_nozzle_tip_outer_diameter": { - "default": 1 - }, - "machine_nozzle_head_distance": { - "default": 3 - }, - "machine_nozzle_expansion_angle": { - "default": 45 - }, - "machine_heat_zone_length": { - "default": 16 - } - } - }, - "overrides": { - "machine_width": { "default": 205 }, - "machine_height": { "default": 200 }, - "machine_depth": { "default": 205 }, - "machine_center_is_zero": { "default": false }, - "machine_nozzle_size": { "default": 0.4 }, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_head_with_fans_polygon": - { - "default": [ - [ - -75, - 35 - ], - [ - -75, - -18 - ], - [ - 18, - 35 - ], - [ - 18, - -18 - ] - ] - }, - "gantry_height": { "default": 55 }, - "machine_use_extruder_offset_to_offset_coords": { "default": true }, - "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, - - "machine_start_gcode": { - "default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E6 ;extrude 6 mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." - }, - "machine_end_gcode": { - "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" - }, - - "machine_extruder_drive_upgrade": { "default": false } - } -} From 13726f1ec1444e1a5f0fc9bf35daee9060d3db31 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 10:24:18 +0200 Subject: [PATCH 272/424] Use default_value instead of default D'oh. Contributes to issue CURA-1278. --- .../definitions/ultimaker_original.def.json | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index 8f47962be9..cd2fac4599 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -19,29 +19,29 @@ "overrides": { "machine_width": { - "default": 205 + "default_value": 205 }, "machine_height": { - "default": 200 + "default_value": 200 }, "machine_depth": { - "default": 205 + "default_value": 205 }, "machine_center_is_zero": { - "default": false + "default_value": false }, "machine_nozzle_size": { - "default": 0.4 + "default_value": 0.4 }, "machine_nozzle_heat_up_speed": { - "default": 2 + "default_value": 2 }, "machine_nozzle_cool_down_speed": { - "default": 2 + "default_value": 2 }, "machine_head_with_fans_polygon": { - "default": [ + "default_value": [ [ -75, 35 ], [ -75, -18 ], [ 18, 35 ], @@ -49,22 +49,22 @@ ] }, "gantry_height": { - "default": 55 + "default_value": 55 }, "machine_use_extruder_offset_to_offset_coords": { - "default": true + "default_value": true }, "machine_gcode_flavor": { - "default": "RepRap (Marlin/Sprinter)" + "default_value": "RepRap (Marlin/Sprinter)" }, "machine_start_gcode": { - "default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E6 ;extrude 6 mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E6 ;extrude 6 mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." }, "machine_end_gcode": { - "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" }, "machine_extruder_drive_upgrade": { - "default": false + "default_value": false } } } From 39907c23db19c16f1922ccdc484a1477369c60c7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 10:25:03 +0200 Subject: [PATCH 273/424] Translate definition for Ultimaker Original+ Contributes to issue CURA-1278. --- .../ultimaker_original_plus.def.json | 26 +++++++++++++++++++ .../machines/ultimaker_original_plus.json | 22 ---------------- 2 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 resources/definitions/ultimaker_original_plus.def.json delete mode 100644 resources/machines/ultimaker_original_plus.json diff --git a/resources/definitions/ultimaker_original_plus.def.json b/resources/definitions/ultimaker_original_plus.def.json new file mode 100644 index 0000000000..830050beb0 --- /dev/null +++ b/resources/definitions/ultimaker_original_plus.def.json @@ -0,0 +1,26 @@ +{ + "id": "ultimaker_original_plus", + "version": 2, + "name": "Ultimaker Original+", + "inherits": "ultimaker_original", + "metadata": { + "author": "Ultimaker", + "manufacturer": "Ultimaker", + "category": "Ultimaker", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker.png", + "platform": "ultimaker2_platform.obj", + "platform_texture": "UltimakerPlusbackplate.png", + "pages": [ + "UpgradeFirmware", + "UltimakerCheckup", + "BedLeveling" + ] + }, + + "overrides": { + "machine_heated_bed": { + "default_value": true + } + } +} diff --git a/resources/machines/ultimaker_original_plus.json b/resources/machines/ultimaker_original_plus.json deleted file mode 100644 index 07c5a04549..0000000000 --- a/resources/machines/ultimaker_original_plus.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "ultimaker_original_plus", - "version": 1, - "name": "Ultimaker Original+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "icon": "icon_ultimaker.png", - "platform": "ultimaker2_platform.obj", - "platform_texture": "UltimakerPlusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker_original.json", - - "pages": [ - "UpgradeFirmware", - "UltimakerCheckup", - "BedLeveling" - ], - - "overrides": { - "machine_heated_bed": { "default": true } - } -} From 07fea431c7946d0e555c36606390d2c7f5ff6e40 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 10:28:23 +0200 Subject: [PATCH 274/424] Translate definition for Uniqbot One Contributes to issue CURA-1278. --- resources/definitions/uniqbot_one.def.json | 55 ++++++++++++++++++++++ resources/machines/uniqbot_one.json | 31 ------------ 2 files changed, 55 insertions(+), 31 deletions(-) create mode 100644 resources/definitions/uniqbot_one.def.json delete mode 100644 resources/machines/uniqbot_one.json diff --git a/resources/definitions/uniqbot_one.def.json b/resources/definitions/uniqbot_one.def.json new file mode 100644 index 0000000000..ee536edfb0 --- /dev/null +++ b/resources/definitions/uniqbot_one.def.json @@ -0,0 +1,55 @@ +{ + "id": "uniqbot_one", + "version": 2, + "name": "Uniqbot", + "inherits": "fdmprinter", + "metadata": { + "author": "Unimatech", + "manufacturer": "Unimatech", + "category": "Other", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker2.png" + }, + + "overrides": { + "machine_heated_bed": { + "default_value": false + }, + "machine_width": { + "default_value": 140 + }, + "machine_height": { + "default_value": 120 + }, + "machine_depth": { + "default_value": 160 + }, + "machine_center_is_zero": { + "default_value": false + }, + "machine_nozzle_size": { + "default_value": 0.5 + }, + "material_diameter": { + "default_value": 1.75 + }, + "machine_nozzle_heat_up_speed": { + "default_value": 2 + }, + "machine_nozzle_cool_down_speed": { + "default_value": 2 + }, + "machine_nozzle_gantry_distance": { + "default_value": 55 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + }, + "machine_end_gcode": { + "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + } + } +} \ No newline at end of file diff --git a/resources/machines/uniqbot_one.json b/resources/machines/uniqbot_one.json deleted file mode 100644 index f07dae9b24..0000000000 --- a/resources/machines/uniqbot_one.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "id": "uniqbot_one", - "version": 1, - "name": "Uniqbot", - "manufacturer": "Unimatech", - "author": "Unimatech", - "icon": "icon_ultimaker2.png", - "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", - - "overrides": { - "machine_heated_bed": { "default": false }, - "machine_width": { "default": 140 }, - "machine_height": { "default": 120 }, - "machine_depth": { "default": 160 }, - "machine_center_is_zero": { "default": false }, - "machine_nozzle_size": { "default": 0.5 }, - "material_diameter": { "default": 1.75 }, - "machine_nozzle_heat_up_speed": { "default": 2.0 }, - "machine_nozzle_cool_down_speed": { "default": 2.0 }, - "machine_nozzle_gantry_distance": { "default": 55 }, - "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, - - "machine_start_gcode": { - "default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." - }, - "machine_end_gcode": { - "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" - } - } -} From 4e3e466a11e8c063cf64cc4426c19fa4a36276e3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 10:34:28 +0200 Subject: [PATCH 275/424] Move platform offset to metadata Also removed the setting from fdmprinter just to be clear. Contributes to issue CURA-1278. --- resources/definitions/bq_witbox_2.def.json | 6 ++---- resources/definitions/innovo_inventor.def.json | 6 ++---- resources/definitions/maker_starter.def.json | 5 +---- resources/definitions/ultimaker2.def.json | 6 ++---- resources/definitions/ultimaker2_go.def.json | 6 ++---- resources/machines/fdmprinter.json | 9 --------- 6 files changed, 9 insertions(+), 29 deletions(-) diff --git a/resources/definitions/bq_witbox_2.def.json b/resources/definitions/bq_witbox_2.def.json index a98a8b909d..b9d9b497cd 100644 --- a/resources/definitions/bq_witbox_2.def.json +++ b/resources/definitions/bq_witbox_2.def.json @@ -9,7 +9,8 @@ "manufacturer": "BQ", "category": "Other", "file_formats": "text/x-gcode", - "platform": "bq_witbox_platform.stl" + "platform": "bq_witbox_platform.stl", + "platform_offset": [0, -145, -38] }, "overrides": { @@ -37,9 +38,6 @@ "machine_gcode_flavor": { "default_value": "RepRap" }, - "machine_platform_offset": { - "default_value": [0, -145, -38] - }, "material_print_temperature": { "default_value": 210 }, diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index d40256813b..cd63423094 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -9,7 +9,8 @@ "manufacturer": "Innovo", "category": "Other", "file_formats": "text/x-gcode", - "platform": "inventor_platform.stl" + "platform": "inventor_platform.stl", + "platform_offset": [-180, -0.25, 160] }, "overrides": { @@ -61,9 +62,6 @@ "machine_end_gcode": { "default_value": "M104 S0\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors" }, - "machine_platform_offset": { - "default_value": [-180, -0.25, 160] - }, "layer_height": { "default_value": 0.15 }, diff --git a/resources/definitions/maker_starter.def.json b/resources/definitions/maker_starter.def.json index 797b57f771..24033d8968 100644 --- a/resources/definitions/maker_starter.def.json +++ b/resources/definitions/maker_starter.def.json @@ -4,9 +4,9 @@ "name": "3DMaker Starter", "inherits": "fdmprinter", "metadata": { - "visible": true, "author": "tvlgiao", "manufacturer": "3DMaker", + "category": "Other", "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj", "icon": "icon_ultimaker2.png", "platform": "makerstarter_platform.stl" @@ -58,9 +58,6 @@ "machine_disallowed_areas": { "default_value": [] }, - "machine_platform_offset": { - "default_value": [0, 0, 0] - }, "machine_nozzle_tip_outer_diameter": { "default_value": 1 }, diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json index ae35858730..606d51c545 100644 --- a/resources/definitions/ultimaker2.def.json +++ b/resources/definitions/ultimaker2.def.json @@ -10,7 +10,8 @@ "file_formats": "text/x-gcode", "icon": "icon_ultimaker2.png", "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2backplate.png" + "platform_texture": "Ultimaker2backplate.png", + "platform_offset": [9, 0, 0] }, "overrides": { "machine_start_gcode" : { @@ -69,9 +70,6 @@ [[-115, -112.5], [-115, -104.5], [ -84, -104.5], [ -82, -112.5]], [[ 115, -112.5], [ 108, -112.5], [ 110, -104.5], [ 115, -104.5]] ]}, - "machine_platform_offset": { - "default_value": [9, 0, 0] - }, "machine_nozzle_tip_outer_diameter": { "default_value": 1 }, diff --git a/resources/definitions/ultimaker2_go.def.json b/resources/definitions/ultimaker2_go.def.json index e439006170..7bedb70add 100644 --- a/resources/definitions/ultimaker2_go.def.json +++ b/resources/definitions/ultimaker2_go.def.json @@ -10,7 +10,8 @@ "file_formats": "text/x-gcode", "icon": "icon_ultimaker2.png", "platform": "ultimaker2go_platform.obj", - "platform_texture": "Ultimaker2Gobackplate.png" + "platform_texture": "Ultimaker2Gobackplate.png", + "platform_offset": [0, 0, 0] }, "overrides": { @@ -34,8 +35,5 @@ [[ 60, -60], [ 33, -60], [ 35, -52], [ 60, -52]] ] }, - "machine_platform_offset": { - "default_value": [0, 0, 0] - } } } diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 2751c69db2..955bb36c5a 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -121,15 +121,6 @@ "default": [], "global_only": true }, - "machine_platform_offset": { - "description": "Where to display the platform mesh.", - "default": [ - 0, - 0, - 0 - ], - "global_only": true - }, "machine_head_polygon": { "description": "A 2D silhouette of the print head (fan caps excluded).", "type": "polygon", From dafff9159e5130ba2c5f7cb834bce906d28e6e3b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 18 May 2016 11:03:44 +0200 Subject: [PATCH 276/424] Added materials & qualities CURA-1278 --- cura/MachineManagerModel.py | 32 ++++++++++++------- resources/definitions/fdmprinter.def.json | 4 ++- .../{instances => materials}/abs.inst.cfg | 0 .../{instances => materials}/cpe.inst.cfg | 0 .../{instances => materials}/pla.inst.cfg | 0 resources/quality/high.inst.cfg | 9 ++++++ resources/quality/normal.inst.cfg | 9 ++++++ 7 files changed, 42 insertions(+), 12 deletions(-) rename resources/{instances => materials}/abs.inst.cfg (100%) rename resources/{instances => materials}/cpe.inst.cfg (100%) rename resources/{instances => materials}/pla.inst.cfg (100%) create mode 100644 resources/quality/high.inst.cfg create mode 100644 resources/quality/normal.inst.cfg diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 0d3540475e..0f45f0a7b1 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -58,21 +58,29 @@ class MachineManagerModel(QObject): new_global_stack.addMetaDataEntry("type", "machine") UM.Settings.ContainerRegistry.getInstance().addContainer(new_global_stack) - ## DEBUG CODE - material_instance_container = UM.Settings.InstanceContainer("test_material") - material_instance_container.addMetaDataEntry("type", "material") - material_instance_container.setDefinition(definitions[0]) + preferred_material_id = definitions[0].getMetaDataEntry("preferred_material") + material_instance_container = None + if preferred_material_id: + preferred_material_id = preferred_material_id.lower() + container = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = preferred_material_id) + if container: + material_instance_container = container[0] + + preferred_quality_id = definitions[0].getMetaDataEntry("preferred_quality") + quality_instance_container = None + if preferred_quality_id: + preferred_quality_id = preferred_quality_id.lower() + container = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = preferred_quality_id) + if container: + quality_instance_container = container[0] + + ## DEBUG CODE variant_instance_container = UM.Settings.InstanceContainer("test_variant") variant_instance_container.addMetaDataEntry("type", "variant") variant_instance_container.setDefinition(definitions[0]) - quality_instance_container = UM.Settings.InstanceContainer(name + "_quality") - UM.Settings.ContainerRegistry.getInstance().addContainer(material_instance_container) UM.Settings.ContainerRegistry.getInstance().addContainer(variant_instance_container) - UM.Settings.ContainerRegistry.getInstance().addContainer(quality_instance_container) - quality_instance_container.addMetaDataEntry("type", "quality") - quality_instance_container.setDefinition(definitions[0]) current_settings_instance_container = UM.Settings.InstanceContainer(name + "_current_settings") current_settings_instance_container.addMetaDataEntry("machine", name) @@ -82,9 +90,11 @@ class MachineManagerModel(QObject): # If a definition is found, its a list. Should only have one item. new_global_stack.addContainer(definitions[0]) - new_global_stack.addContainer(material_instance_container) + if material_instance_container: + new_global_stack.addContainer(material_instance_container) new_global_stack.addContainer(variant_instance_container) - new_global_stack.addContainer(quality_instance_container) + if quality_instance_container: + new_global_stack.addContainer(quality_instance_container) new_global_stack.addContainer(current_settings_instance_container) Application.getInstance().setGlobalContainerStack(new_global_stack) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 11436bdcce..603dc18e92 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -8,7 +8,9 @@ "category": "Ultimaker", "manufacturer": "Ultimaker", "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", - "visible": false + "visible": false, + "preferred_material": "pla", + "preferred_quality": "normal" }, "settings": { diff --git a/resources/instances/abs.inst.cfg b/resources/materials/abs.inst.cfg similarity index 100% rename from resources/instances/abs.inst.cfg rename to resources/materials/abs.inst.cfg diff --git a/resources/instances/cpe.inst.cfg b/resources/materials/cpe.inst.cfg similarity index 100% rename from resources/instances/cpe.inst.cfg rename to resources/materials/cpe.inst.cfg diff --git a/resources/instances/pla.inst.cfg b/resources/materials/pla.inst.cfg similarity index 100% rename from resources/instances/pla.inst.cfg rename to resources/materials/pla.inst.cfg diff --git a/resources/quality/high.inst.cfg b/resources/quality/high.inst.cfg new file mode 100644 index 0000000000..2e860cf380 --- /dev/null +++ b/resources/quality/high.inst.cfg @@ -0,0 +1,9 @@ +[general] +version = 2 +name = high +definition = fdmprinter + +[metadata] +type = quality + +[values] diff --git a/resources/quality/normal.inst.cfg b/resources/quality/normal.inst.cfg new file mode 100644 index 0000000000..6bb23d841c --- /dev/null +++ b/resources/quality/normal.inst.cfg @@ -0,0 +1,9 @@ +[general] +version = 2 +name = normal +definition = fdmprinter + +[metadata] +type = quality + +[values] From 1578fdee98532868be4698c2d0c14ecb46f805e9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 18 May 2016 11:06:39 +0200 Subject: [PATCH 277/424] Fixed minor errors in definitions CURA-1278 --- resources/definitions/ultimaker2_extended_plus.def.json | 2 +- resources/definitions/ultimaker2_go.def.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/ultimaker2_extended_plus.def.json b/resources/definitions/ultimaker2_extended_plus.def.json index 5283209745..d4220927e3 100644 --- a/resources/definitions/ultimaker2_extended_plus.def.json +++ b/resources/definitions/ultimaker2_extended_plus.def.json @@ -2,7 +2,7 @@ "id": "ultimaker2_extended_plus_base", "version": 2, "name": "Ultimaker 2 Extended+", - "inherits": "ultimaker2plus", + "inherits": "ultimaker2_plus", "visible": false, "metadata": { "author": "Ultimaker", diff --git a/resources/definitions/ultimaker2_go.def.json b/resources/definitions/ultimaker2_go.def.json index 7bedb70add..d3ef53d633 100644 --- a/resources/definitions/ultimaker2_go.def.json +++ b/resources/definitions/ultimaker2_go.def.json @@ -34,6 +34,6 @@ [[-60, -60], [-60, -52], [-35, -52], [-33, -60]], [[ 60, -60], [ 33, -60], [ 35, -52], [ 60, -52]] ] - }, + } } } From cbf3fe0ddf970d31a0cab50529a2db242f14e905 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 10:59:10 +0200 Subject: [PATCH 278/424] Add variants for Ultimaker 2+ Contributes to issue CURA-1278. --- resources/variants/ultimaker2_plus_0.25.cfg | 16 ++++++++++++++++ resources/variants/ultimaker2_plus_0.4.cfg | 14 ++++++++++++++ resources/variants/ultimaker2_plus_0.6.cfg | 15 +++++++++++++++ resources/variants/ultimaker2_plus_0.8.cfg | 15 +++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 resources/variants/ultimaker2_plus_0.25.cfg create mode 100644 resources/variants/ultimaker2_plus_0.4.cfg create mode 100644 resources/variants/ultimaker2_plus_0.6.cfg create mode 100644 resources/variants/ultimaker2_plus_0.8.cfg diff --git a/resources/variants/ultimaker2_plus_0.25.cfg b/resources/variants/ultimaker2_plus_0.25.cfg new file mode 100644 index 0000000000..18839a8871 --- /dev/null +++ b/resources/variants/ultimaker2_plus_0.25.cfg @@ -0,0 +1,16 @@ +[general] +name = 0.25 mm +version = 2 +definition = ultimaker2_plus + +[metadata] +author = Ultimaker + +[values] +machine_nozzle_size = 0.25 +machine_nozzle_tip_outer_diameter = 0.8 +coasting_volume = 0.1 +coasting_min_volume = 0.17 +speed_wall = round(speed_print / 1.2, 1) +speed_wall_0 = 1 if speed_wall < 5 else (speed_wall - 5) +speed_topbottom = round(speed_print / 1.5, 1) \ No newline at end of file diff --git a/resources/variants/ultimaker2_plus_0.4.cfg b/resources/variants/ultimaker2_plus_0.4.cfg new file mode 100644 index 0000000000..b7dc47ea6e --- /dev/null +++ b/resources/variants/ultimaker2_plus_0.4.cfg @@ -0,0 +1,14 @@ +[general] +name = 0.4 mm +version = 2 +definition = ultimaker2_plus + +[metadata] +author = Ultimaker + +[values] +machine_nozzle_size = 0.4 +machine_nozzle_tip_outer_diameter = 1.05 +speed_wall = round(speed_print / 1.25, 1) +speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = round(speed_print / 2.25, 1) \ No newline at end of file diff --git a/resources/variants/ultimaker2_plus_0.6.cfg b/resources/variants/ultimaker2_plus_0.6.cfg new file mode 100644 index 0000000000..d6a7da7437 --- /dev/null +++ b/resources/variants/ultimaker2_plus_0.6.cfg @@ -0,0 +1,15 @@ +[general] +name = 0.6 mm +version = 2 +definition = ultimaker2_plus + +[metadata] +author = Ultimaker + +[values] +machine_nozzle_size = 0.6 +machine_nozzle_tip_outer_diameter = 1.25 +coasting_volume = 1.36 +speed_wall = round(speed_print * 4 / 3, 1) +speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = round(speed_print / 2, 1) \ No newline at end of file diff --git a/resources/variants/ultimaker2_plus_0.8.cfg b/resources/variants/ultimaker2_plus_0.8.cfg new file mode 100644 index 0000000000..cb97151642 --- /dev/null +++ b/resources/variants/ultimaker2_plus_0.8.cfg @@ -0,0 +1,15 @@ +[general] +name = 0.8 mm +version = 2 +definition = ultimaker2_plus + +[metadata] +author = Ultimaker + +[values] +machine_nozzle_size = 0.8 +machine_nozzle_tip_outer_diameter = 1.35 +coasting_volume = 3.22 +speed_wall = round(speed_print * 4 / 3, 1) +speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = round(speed_print / 2, 1) \ No newline at end of file From 5ed881859d34a2955f90ccc2493a1c985fe973a5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 11:01:38 +0200 Subject: [PATCH 279/424] Fix ID of Ultimaker 2+ It's no longer necessary to append '_base' to the ID of printers with variants. Contributes to issue CURA-1278. --- resources/definitions/ultimaker2_plus.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker2_plus.def.json b/resources/definitions/ultimaker2_plus.def.json index 6a61d18d3c..646b424c5c 100644 --- a/resources/definitions/ultimaker2_plus.def.json +++ b/resources/definitions/ultimaker2_plus.def.json @@ -1,5 +1,5 @@ { - "id": "ultimaker2plus_base", + "id": "ultimaker2_plus", "version": 2, "name": "Ultimaker 2+", "inherits": "ultimaker2", From 25c9c95e105851548a5d3d559160c547930c9fe6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 11:02:31 +0200 Subject: [PATCH 280/424] Fix ID of Ultimaker 2 Extended+ It's no longer necessary to append '_base' to the ID of printers with variants. Contributes to issue CURA-1278. --- resources/definitions/ultimaker2_extended_plus.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker2_extended_plus.def.json b/resources/definitions/ultimaker2_extended_plus.def.json index d4220927e3..eae48773b6 100644 --- a/resources/definitions/ultimaker2_extended_plus.def.json +++ b/resources/definitions/ultimaker2_extended_plus.def.json @@ -1,5 +1,5 @@ { - "id": "ultimaker2_extended_plus_base", + "id": "ultimaker2_extended_plus", "version": 2, "name": "Ultimaker 2 Extended+", "inherits": "ultimaker2_plus", From dce4b71f63fb6c502583dca14e0078bd919d462e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 11:06:16 +0200 Subject: [PATCH 281/424] Add variants for Ultimaker 2 Extended+ Contributes to issue CURA-1278. --- resources/variants/ultimaker2_extended_plus_0.25.cfg | 11 +++++++++++ resources/variants/ultimaker2_extended_plus_0.4.cfg | 11 +++++++++++ resources/variants/ultimaker2_extended_plus_0.6.cfg | 11 +++++++++++ resources/variants/ultimaker2_extended_plus_0.8.cfg | 11 +++++++++++ 4 files changed, 44 insertions(+) create mode 100644 resources/variants/ultimaker2_extended_plus_0.25.cfg create mode 100644 resources/variants/ultimaker2_extended_plus_0.4.cfg create mode 100644 resources/variants/ultimaker2_extended_plus_0.6.cfg create mode 100644 resources/variants/ultimaker2_extended_plus_0.8.cfg diff --git a/resources/variants/ultimaker2_extended_plus_0.25.cfg b/resources/variants/ultimaker2_extended_plus_0.25.cfg new file mode 100644 index 0000000000..0d358821c0 --- /dev/null +++ b/resources/variants/ultimaker2_extended_plus_0.25.cfg @@ -0,0 +1,11 @@ +[general] +name = 0.25 mm +version = 2 +definition = ultimaker2_extended_plus + +[metadata] +author = Ultimaker + +[values] +machine_nozzle_size = 0.25 +machine_nozzle_tip_outer_diameter = 0.8 \ No newline at end of file diff --git a/resources/variants/ultimaker2_extended_plus_0.4.cfg b/resources/variants/ultimaker2_extended_plus_0.4.cfg new file mode 100644 index 0000000000..e0ab37c06b --- /dev/null +++ b/resources/variants/ultimaker2_extended_plus_0.4.cfg @@ -0,0 +1,11 @@ +[general] +name = 0.4 mm +version = 2 +definition = ultimaker2_extended_plus + +[metadata] +author = Ultimaker + +[values] +machine_nozzle_size = 0.4 +machine_nozzle_tip_outer_diameter = 1.05 \ No newline at end of file diff --git a/resources/variants/ultimaker2_extended_plus_0.6.cfg b/resources/variants/ultimaker2_extended_plus_0.6.cfg new file mode 100644 index 0000000000..2b65b472b8 --- /dev/null +++ b/resources/variants/ultimaker2_extended_plus_0.6.cfg @@ -0,0 +1,11 @@ +[general] +name = 0.6 mm +version = 2 +definition = ultimaker2_extended_plus + +[metadata] +author = Ultimaker + +[values] +machine_nozzle_size = 0.6 +machine_nozzle_tip_outer_diameter = 1.25 \ No newline at end of file diff --git a/resources/variants/ultimaker2_extended_plus_0.8.cfg b/resources/variants/ultimaker2_extended_plus_0.8.cfg new file mode 100644 index 0000000000..7a879977c7 --- /dev/null +++ b/resources/variants/ultimaker2_extended_plus_0.8.cfg @@ -0,0 +1,11 @@ +[general] +name = 0.8 mm +version = 2 +definition = ultimaker2_extended_plus + +[metadata] +author = Ultimaker + +[values] +machine_nozzle_size = 0.8 +machine_nozzle_tip_outer_diameter = 1.35 \ No newline at end of file From 1e1aec57460d0dbc8a6207bf043c0ee2739905ec Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 11:07:02 +0200 Subject: [PATCH 282/424] Remove superfluous variants These are now in the resources/variants folder in the translated form. Contributes to issue CURA-1278. --- .../ultimaker2_extended_plus_025.json | 17 -------------- .../ultimaker2_extended_plus_040.json | 17 -------------- .../ultimaker2_extended_plus_060.json | 17 -------------- .../ultimaker2_extended_plus_080.json | 17 -------------- resources/machines/ultimaker2plus_025.json | 23 ------------------- resources/machines/ultimaker2plus_040.json | 21 ----------------- resources/machines/ultimaker2plus_060.json | 22 ------------------ resources/machines/ultimaker2plus_080.json | 22 ------------------ 8 files changed, 156 deletions(-) delete mode 100644 resources/machines/ultimaker2_extended_plus_025.json delete mode 100644 resources/machines/ultimaker2_extended_plus_040.json delete mode 100644 resources/machines/ultimaker2_extended_plus_060.json delete mode 100644 resources/machines/ultimaker2_extended_plus_080.json delete mode 100644 resources/machines/ultimaker2plus_025.json delete mode 100644 resources/machines/ultimaker2plus_040.json delete mode 100644 resources/machines/ultimaker2plus_060.json delete mode 100644 resources/machines/ultimaker2plus_080.json diff --git a/resources/machines/ultimaker2_extended_plus_025.json b/resources/machines/ultimaker2_extended_plus_025.json deleted file mode 100644 index 187079aa33..0000000000 --- a/resources/machines/ultimaker2_extended_plus_025.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "ultimaker2_extended_plus", - "version": 1, - "name": "Ultimaker 2 Extended+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2_extended_plus.json", - "variant": "0.25 mm", - "profiles_machine": "ultimaker2plus", - "machine_settings": { - "machine_nozzle_size": { "default": 0.25 }, - "machine_nozzle_tip_outer_diameter": { "default": 0.8 } - } -} diff --git a/resources/machines/ultimaker2_extended_plus_040.json b/resources/machines/ultimaker2_extended_plus_040.json deleted file mode 100644 index b548bbe423..0000000000 --- a/resources/machines/ultimaker2_extended_plus_040.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "ultimaker2_extended_plus", - "version": 1, - "name": "Ultimaker 2 Extended+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2_extended_plus.json", - "variant": "0.4 mm", - "profiles_machine": "ultimaker2plus", - "machine_settings": { - "machine_nozzle_size": { "default": 0.40 }, - "machine_nozzle_tip_outer_diameter": { "default": 1.05 } - } -} diff --git a/resources/machines/ultimaker2_extended_plus_060.json b/resources/machines/ultimaker2_extended_plus_060.json deleted file mode 100644 index 9d39c267ba..0000000000 --- a/resources/machines/ultimaker2_extended_plus_060.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "ultimaker2_extended_plus", - "version": 1, - "name": "Ultimaker 2 Extended+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2_extended_plus.json", - "variant": "0.6 mm", - "profiles_machine": "ultimaker2plus", - "machine_settings": { - "machine_nozzle_size": { "default": 0.60 }, - "machine_nozzle_tip_outer_diameter": { "default": 1.25 } - } -} diff --git a/resources/machines/ultimaker2_extended_plus_080.json b/resources/machines/ultimaker2_extended_plus_080.json deleted file mode 100644 index bf74998f57..0000000000 --- a/resources/machines/ultimaker2_extended_plus_080.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "ultimaker2_extended_plus", - "version": 1, - "name": "Ultimaker 2 Extended+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2_extended_plus.json", - "variant": "0.8 mm", - "profiles_machine": "ultimaker2plus", - "machine_settings": { - "machine_nozzle_size": { "default": 0.80 }, - "machine_nozzle_tip_outer_diameter": { "default": 1.35 } - } -} diff --git a/resources/machines/ultimaker2plus_025.json b/resources/machines/ultimaker2plus_025.json deleted file mode 100644 index 2c022f8448..0000000000 --- a/resources/machines/ultimaker2plus_025.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "ultimaker2plus", - "version": 1, - "name": "Ultimaker 2+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2Plusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2plus.json", - - "variant": "0.25 mm", - - "overrides": { - "speed_wall": { "inherit_function": "round(speed_print / 1.2, 1)" }, - "speed_wall_0": { "inherit_function": "1 if speed_wall < 5 else (speed_wall - 5)" }, - "speed_topbottom": { "inherit_function": "round(speed_print / 1.5, 1)" }, - "machine_nozzle_size": { "default": 0.25 }, - "machine_nozzle_tip_outer_diameter": { "default": 0.8 }, - "coasting_volume": { "default": 0.1 }, - "coasting_min_volume": { "default": 0.17 } - } -} diff --git a/resources/machines/ultimaker2plus_040.json b/resources/machines/ultimaker2plus_040.json deleted file mode 100644 index f5a0f5a710..0000000000 --- a/resources/machines/ultimaker2plus_040.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "ultimaker2plus", - "version": 1, - "name": "Ultimaker 2+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2Plusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2plus.json", - - "variant": "0.4 mm", - - "overrides": { - "speed_wall": { "inherit_function": "round(speed_print / 1.25, 1)" }, - "speed_wall_0": { "inherit_function": "1 if speed_wall < 10 else (speed_wall - 10)" }, - "speed_topbottom": { "inherit_function": "round(speed_print / 2.25, 1)" }, - "machine_nozzle_size": { "default": 0.40 }, - "machine_nozzle_tip_outer_diameter": { "default": 1.05 } - } -} diff --git a/resources/machines/ultimaker2plus_060.json b/resources/machines/ultimaker2plus_060.json deleted file mode 100644 index 89538f2fd0..0000000000 --- a/resources/machines/ultimaker2plus_060.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "ultimaker2plus", - "version": 1, - "name": "Ultimaker 2+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2Plusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2plus.json", - - "variant": "0.6 mm", - - "overrides": { - "speed_wall": { "inherit_function": "round(speed_print / 1.333333, 1)" }, - "speed_wall_0": { "inherit_function": "1 if speed_wall < 10 else (speed_wall - 10)" }, - "speed_topbottom": { "inherit_function": "round(speed_print / 2, 1)" }, - "machine_nozzle_size": { "default": 0.60 }, - "machine_nozzle_tip_outer_diameter": { "default": 1.25 }, - "coasting_volume": { "default": 1.36 } - } -} diff --git a/resources/machines/ultimaker2plus_080.json b/resources/machines/ultimaker2plus_080.json deleted file mode 100644 index e231fbb9f5..0000000000 --- a/resources/machines/ultimaker2plus_080.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "ultimaker2plus", - "version": 1, - "name": "Ultimaker 2+", - "manufacturer": "Ultimaker", - "author": "Ultimaker", - "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2Plusbackplate.png", - "file_formats": "text/x-gcode", - "inherits": "ultimaker2plus.json", - - "variant": "0.8 mm", - - "overrides": { - "speed_wall": { "inherit_function": "round(speed_print / 1.333333, 1)" }, - "speed_wall_0": { "inherit_function": "1 if speed_wall < 10 else (speed_wall - 10)" }, - "speed_topbottom": { "inherit_function": "round(speed_print / 2, 1)" }, - "machine_nozzle_size": { "default": 0.80 }, - "machine_nozzle_tip_outer_diameter": { "default": 1.35 }, - "coasting_volume": { "default": 3.22 } - } -} From 54c29187c9d5c413ef5791688fbfa0de58071c77 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 11:16:22 +0200 Subject: [PATCH 283/424] Also use different speeds and coast volumes for UME+ variants I've discussed this with Paul and he confirms that they should also be different for Extended just like not-Extended. Contributes to issue CURA-1278. --- resources/variants/ultimaker2_extended_plus_0.25.cfg | 7 ++++++- resources/variants/ultimaker2_extended_plus_0.4.cfg | 5 ++++- resources/variants/ultimaker2_extended_plus_0.6.cfg | 6 +++++- resources/variants/ultimaker2_extended_plus_0.8.cfg | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/resources/variants/ultimaker2_extended_plus_0.25.cfg b/resources/variants/ultimaker2_extended_plus_0.25.cfg index 0d358821c0..2bc14d7588 100644 --- a/resources/variants/ultimaker2_extended_plus_0.25.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.25.cfg @@ -8,4 +8,9 @@ author = Ultimaker [values] machine_nozzle_size = 0.25 -machine_nozzle_tip_outer_diameter = 0.8 \ No newline at end of file +machine_nozzle_tip_outer_diameter = 0.8 +coasting_volume = 0.1 +coasting_min_volume = 0.17 +speed_wall = round(speed_print / 1.2, 1) +speed_wall_0 = 1 if speed_wall < 5 else (speed_wall - 5) +speed_topbottom = round(speed_print / 1.5, 1) \ No newline at end of file diff --git a/resources/variants/ultimaker2_extended_plus_0.4.cfg b/resources/variants/ultimaker2_extended_plus_0.4.cfg index e0ab37c06b..a0de0ad2d7 100644 --- a/resources/variants/ultimaker2_extended_plus_0.4.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.4.cfg @@ -8,4 +8,7 @@ author = Ultimaker [values] machine_nozzle_size = 0.4 -machine_nozzle_tip_outer_diameter = 1.05 \ No newline at end of file +machine_nozzle_tip_outer_diameter = 1.05 +speed_wall = round(speed_print / 1.25, 1) +speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = round(speed_print / 2.25, 1) \ No newline at end of file diff --git a/resources/variants/ultimaker2_extended_plus_0.6.cfg b/resources/variants/ultimaker2_extended_plus_0.6.cfg index 2b65b472b8..10fa9dd4de 100644 --- a/resources/variants/ultimaker2_extended_plus_0.6.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.6.cfg @@ -8,4 +8,8 @@ author = Ultimaker [values] machine_nozzle_size = 0.6 -machine_nozzle_tip_outer_diameter = 1.25 \ No newline at end of file +machine_nozzle_tip_outer_diameter = 1.25 +coasting_volume = 1.36 +speed_wall = round(speed_print * 4 / 3, 1) +speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = round(speed_print / 2, 1) \ No newline at end of file diff --git a/resources/variants/ultimaker2_extended_plus_0.8.cfg b/resources/variants/ultimaker2_extended_plus_0.8.cfg index 7a879977c7..2980215ebd 100644 --- a/resources/variants/ultimaker2_extended_plus_0.8.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.8.cfg @@ -8,4 +8,8 @@ author = Ultimaker [values] machine_nozzle_size = 0.8 -machine_nozzle_tip_outer_diameter = 1.35 \ No newline at end of file +machine_nozzle_tip_outer_diameter = 1.35 +coasting_volume = 3.22 +speed_wall = round(speed_print * 4 / 3, 1) +speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = round(speed_print / 2, 1) \ No newline at end of file From a8fc830f2b1154abc3aa934311d5a538bd36a9ee Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 11:36:45 +0200 Subject: [PATCH 284/424] Translate ancient machine_head_shape settings It has been machine_head_polygon for a while. Contributes to issue CURA-1278. --- resources/definitions/grr_neo.def.json | 18 +++++++----------- resources/definitions/innovo_inventor.def.json | 18 +++++++----------- resources/definitions/maker_starter.def.json | 12 ------------ resources/definitions/prusa_i3.def.json | 18 +++++++----------- resources/definitions/prusa_i3_xl.def.json | 18 +++++++----------- resources/definitions/rigidbot.def.json | 12 ------------ resources/definitions/rigidbot_big.def.json | 12 ------------ 7 files changed, 28 insertions(+), 80 deletions(-) diff --git a/resources/definitions/grr_neo.def.json b/resources/definitions/grr_neo.def.json index 9fc5d2121e..76ae73540f 100644 --- a/resources/definitions/grr_neo.def.json +++ b/resources/definitions/grr_neo.def.json @@ -35,17 +35,13 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_head_shape_min_x": { - "default_value": 75 - }, - "machine_head_shape_min_y": { - "default_value": 18 - }, - "machine_head_shape_max_x": { - "default_value": 18 - }, - "machine_head_shape_max_y": { - "default_value": 35 + "machine_head_polygon": { + "default_value": [ + [-75, -18], + [-75, 35], + [18, 35], + [18, -18] + ] }, "machine_nozzle_gantry_distance": { "default_value": 55 diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index cd63423094..a0e8bd8b8f 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -32,17 +32,13 @@ "machine_nozzle_size": { "default_value": 0.4 }, - "machine_head_shape_min_x": { - "default_value": 43.7 - }, - "machine_head_shape_min_y": { - "default_value": 19.2 - }, - "machine_head_shape_max_x": { - "default_value": 43.7 - }, - "machine_head_shape_max_y": { - "default_value": 55 + "machine_head_polygon": { + "default_value": [ + [-43.7, -19.2], + [-43.7, 55], + [43.7, 55], + [43.7, -19.2] + ] }, "machine_nozzle_gantry_distance": { "default_value": 82.3 diff --git a/resources/definitions/maker_starter.def.json b/resources/definitions/maker_starter.def.json index 24033d8968..94caa5d789 100644 --- a/resources/definitions/maker_starter.def.json +++ b/resources/definitions/maker_starter.def.json @@ -37,18 +37,6 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_head_shape_min_x": { - "default_value": 0 - }, - "machine_head_shape_min_y": { - "default_value": 0 - }, - "machine_head_shape_max_x": { - "default_value": 0 - }, - "machine_head_shape_max_y": { - "default_value": 0 - }, "machine_nozzle_gantry_distance": { "default_value": 55 }, diff --git a/resources/definitions/prusa_i3.def.json b/resources/definitions/prusa_i3.def.json index 21db84838a..dbd5877248 100644 --- a/resources/definitions/prusa_i3.def.json +++ b/resources/definitions/prusa_i3.def.json @@ -41,17 +41,13 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_head_shape_min_x": { - "default_value": 75 - }, - "machine_head_shape_min_y": { - "default_value": 18 - }, - "machine_head_shape_max_x": { - "default_value": 18 - }, - "machine_head_shape_max_y": { - "default_value": 35 + "machine_head_polygon": { + "default_value": [ + [-75, -18], + [-75, 35], + [18, 35], + [18, -18] + ] }, "machine_nozzle_gantry_distance": { "default_value": 55 diff --git a/resources/definitions/prusa_i3_xl.def.json b/resources/definitions/prusa_i3_xl.def.json index ddd1796eb7..049705abd4 100644 --- a/resources/definitions/prusa_i3_xl.def.json +++ b/resources/definitions/prusa_i3_xl.def.json @@ -41,17 +41,13 @@ "machine_nozzle_cool_down_speed": { "default_value": 2.0 }, - "machine_head_shape_min_x": { - "default_value": 75 - }, - "machine_head_shape_min_y": { - "default_value": 18 - }, - "machine_head_shape_max_x": { - "default_value": 18 - }, - "machine_head_shape_max_y": { - "default_value": 35 + "machine_head_polygon": { + "default_value": [ + [-75, -18], + [-75, 35], + [18, 35], + [18, -18] + ] }, "machine_nozzle_gantry_distance": { "default_value": 55 diff --git a/resources/definitions/rigidbot.def.json b/resources/definitions/rigidbot.def.json index e70c407463..f8b8801395 100644 --- a/resources/definitions/rigidbot.def.json +++ b/resources/definitions/rigidbot.def.json @@ -31,18 +31,6 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_head_shape_min_x": { - "default_value": 0 - }, - "machine_head_shape_min_y": { - "default_value": 0 - }, - "machine_head_shape_max_x": { - "default_value": 0 - }, - "machine_head_shape_max_y": { - "default_value": 0 - }, "machine_nozzle_gantry_distance": { "default_value": 0 }, diff --git a/resources/definitions/rigidbot_big.def.json b/resources/definitions/rigidbot_big.def.json index f4b282d9db..1037e3ea12 100644 --- a/resources/definitions/rigidbot_big.def.json +++ b/resources/definitions/rigidbot_big.def.json @@ -34,18 +34,6 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_head_shape_min_x": { - "default_value": 0 - }, - "machine_head_shape_min_y": { - "default_value": 0 - }, - "machine_head_shape_max_x": { - "default_value": 0 - }, - "machine_head_shape_max_y": { - "default_value": 0 - }, "machine_nozzle_gantry_distance": { "default_value": 0 }, From afb7a45bb07b99c9209922685ecc56e8d9bab392 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 11:48:43 +0200 Subject: [PATCH 285/424] Translate ancient machine_nozzle_gantry_distance setting It was changed to gantry_height long ago but not updated in these definitions. Contributes to issue CURA-1278. --- resources/definitions/grr_neo.def.json | 2 +- resources/definitions/innovo_inventor.def.json | 2 +- resources/definitions/maker_starter.def.json | 2 +- resources/definitions/prusa_i3.def.json | 2 +- resources/definitions/prusa_i3_xl.def.json | 2 +- resources/definitions/rigidbot.def.json | 2 +- resources/definitions/rigidbot_big.def.json | 2 +- resources/definitions/uniqbot_one.def.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/definitions/grr_neo.def.json b/resources/definitions/grr_neo.def.json index 76ae73540f..563bdd1a67 100644 --- a/resources/definitions/grr_neo.def.json +++ b/resources/definitions/grr_neo.def.json @@ -43,7 +43,7 @@ [18, -18] ] }, - "machine_nozzle_gantry_distance": { + "gantry_height": { "default_value": 55 }, "machine_gcode_flavor": { diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index a0e8bd8b8f..14619833a7 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -40,7 +40,7 @@ [43.7, -19.2] ] }, - "machine_nozzle_gantry_distance": { + "gantry_height": { "default_value": 82.3 }, "machine_nozzle_offset_x_1": { diff --git a/resources/definitions/maker_starter.def.json b/resources/definitions/maker_starter.def.json index 94caa5d789..a26ca058f0 100644 --- a/resources/definitions/maker_starter.def.json +++ b/resources/definitions/maker_starter.def.json @@ -37,7 +37,7 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_nozzle_gantry_distance": { + "gantry_height": { "default_value": 55 }, "machine_gcode_flavor": { diff --git a/resources/definitions/prusa_i3.def.json b/resources/definitions/prusa_i3.def.json index dbd5877248..12e7054694 100644 --- a/resources/definitions/prusa_i3.def.json +++ b/resources/definitions/prusa_i3.def.json @@ -49,7 +49,7 @@ [18, -18] ] }, - "machine_nozzle_gantry_distance": { + "gantry_height": { "default_value": 55 }, "machine_gcode_flavor": { diff --git a/resources/definitions/prusa_i3_xl.def.json b/resources/definitions/prusa_i3_xl.def.json index 049705abd4..819a93b860 100644 --- a/resources/definitions/prusa_i3_xl.def.json +++ b/resources/definitions/prusa_i3_xl.def.json @@ -49,7 +49,7 @@ [18, -18] ] }, - "machine_nozzle_gantry_distance": { + "gantry_height": { "default_value": 55 }, "machine_gcode_flavor": { diff --git a/resources/definitions/rigidbot.def.json b/resources/definitions/rigidbot.def.json index f8b8801395..ace8300d5d 100644 --- a/resources/definitions/rigidbot.def.json +++ b/resources/definitions/rigidbot.def.json @@ -31,7 +31,7 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_nozzle_gantry_distance": { + "gantry_height": { "default_value": 0 }, "machine_gcode_flavor": { diff --git a/resources/definitions/rigidbot_big.def.json b/resources/definitions/rigidbot_big.def.json index 1037e3ea12..ce27d36745 100644 --- a/resources/definitions/rigidbot_big.def.json +++ b/resources/definitions/rigidbot_big.def.json @@ -34,7 +34,7 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_nozzle_gantry_distance": { + "gantry_height": { "default_value": 0 }, "machine_gcode_flavor": { diff --git a/resources/definitions/uniqbot_one.def.json b/resources/definitions/uniqbot_one.def.json index ee536edfb0..d6410a26e7 100644 --- a/resources/definitions/uniqbot_one.def.json +++ b/resources/definitions/uniqbot_one.def.json @@ -39,7 +39,7 @@ "machine_nozzle_cool_down_speed": { "default_value": 2 }, - "machine_nozzle_gantry_distance": { + "gantry_height": { "default_value": 55 }, "machine_gcode_flavor": { From fa81604b89e10845098fc00c428fbfc9bde63124 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 12:34:10 +0200 Subject: [PATCH 286/424] Set default raft fan speed to 0 This makes layer adhesion better. Contributes to issues PL-162, PL-163, PL-164 and PL-165. --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 44a1ef5291..bf53ede906 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1686,7 +1686,7 @@ "type": "float", "min_value": "0", "max_value": "100", - "default": 100, + "default": 0, "global_only": "True", "visible": false, "enabled": "adhesion_type == \"raft\"", From cad6d87a0c455148b03a4534622e4144048bc446 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 12:36:22 +0200 Subject: [PATCH 287/424] Change inheritance for initial layer z overlap This makes the defaults more accurate. The overlap is a little bigger now. Contributes to issues PL-162, PL-163, PL-164 and PL-165. --- resources/machines/fdmprinter.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index bf53ede906..2a24304146 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1497,8 +1497,8 @@ "description": "Make the first and second layer of the object overlap in the Z direction to compensate for the filament lost in the airgap. All models above the first model layer will be shifted down by this amount.", "unit": "mm", "type": "float", - "default": 0.05, - "inherit_function": "layer_height / 2", + "default": 0.22, + "inherit_function": "raft_airgap / 2", "min_value": "0", "max_value_warning": "layer_height", "enabled": "adhesion_type == \"raft\"", From 14f860f8ae3021d40fabde553768b7665b8ec960 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 12:39:39 +0200 Subject: [PATCH 288/424] Also change default raft fan speed for subsettings Contributes to issues PL-162, PL-163, PL-164 and PL-165. --- resources/machines/fdmprinter.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 2a24304146..2b172d1720 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1698,7 +1698,7 @@ "type": "float", "min_value": "0", "max_value": "100", - "default": 100, + "default": 0, "global_only": "True", "visible": false, "inherit": true, @@ -1711,7 +1711,7 @@ "type": "float", "min_value": "0", "max_value": "100", - "default": 100, + "default": 0, "global_only": "True", "visible": false, "inherit": true, @@ -1724,7 +1724,7 @@ "type": "float", "min_value": "0", "max_value": "100", - "default": 100, + "default": 0, "global_only": "True", "visible": false, "inherit": true, From a5f8546d698d31c9f9840a7ff4b50aa7d0968dc7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 18 May 2016 16:29:57 +0200 Subject: [PATCH 289/424] Fixed cases where getValue was still used. We now use getProperty instead CURA-1278 --- cura/BuildVolume.py | 42 +++++++++++++++++----------------- plugins/SolidView/SolidView.py | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 4397c798f7..77bda87825 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -161,12 +161,12 @@ class BuildVolume(SceneNode): self._active_container_stack = Application.getInstance().getGlobalContainerStack() if self._active_container_stack: - self._width = self._active_container_stack.getValue("machine_width") - if self._active_container_stack.getValue("print_sequence") == "one_at_a_time": - self._height = self._active_container_stack.getValue("gantry_height") + self._width = self._active_container_stack.getProperty("machine_width", "value") + if self._active_container_stack.getProperty("print_sequence", "value") == "one_at_a_time": + self._height = self._active_container_stack.getProperty("gantry_height", "value") else: - self._height = self._active_container_stack.getValue("machine_height") - self._depth = self._active_container_stack.getValue("machine_depth") + self._height = self._active_container_stack.getProperty("machine_height", "value") + self._depth = self._active_container_stack.getProperty("machine_depth", "value") self._updateDisallowedAreas() @@ -174,10 +174,10 @@ class BuildVolume(SceneNode): def _onSettingValueChanged(self, setting_key): if setting_key == "print_sequence": - if Application.getInstance().getGlobalContainerStack().getValue("print_sequence") == "one_at_a_time": - self._height = self._active_container_stack.getValue("gantry_height") + if Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") == "one_at_a_time": + self._height = self._active_container_stack.getProperty("gantry_height", "value") else: - self._height = self._active_container_stack.getValue("machine_depth") + self._height = self._active_container_stack.getProperty("machine_depth", "value") self.rebuild() if setting_key in self._skirt_settings: self._updateDisallowedAreas() @@ -187,7 +187,7 @@ class BuildVolume(SceneNode): if not self._active_container_stack: return - disallowed_areas = self._active_container_stack.getValue("machine_disallowed_areas") + disallowed_areas = self._active_container_stack.getProperty("machine_disallowed_areas", "value") areas = [] skirt_size = 0.0 @@ -212,8 +212,8 @@ class BuildVolume(SceneNode): # Add the skirt areas around the borders of the build plate. if skirt_size > 0: - half_machine_width = self._active_container_stack.getValue("machine_width") / 2 - half_machine_depth = self._active_container_stack.getValue("machine_depth") / 2 + half_machine_width = self._active_container_stack.getProperty("machine_width", "value") / 2 + half_machine_depth = self._active_container_stack.getProperty("machine_depth", "value") / 2 areas.append(Polygon(numpy.array([ [-half_machine_width, -half_machine_depth], @@ -249,21 +249,21 @@ class BuildVolume(SceneNode): def _getSkirtSize(self, container_stack): skirt_size = 0.0 - adhesion_type = container_stack.getValue("adhesion_type") + adhesion_type = container_stack.getProperty("adhesion_type", "value") if adhesion_type == "skirt": - skirt_distance = container_stack.getValue("skirt_gap") - skirt_line_count = container_stack.getValue("skirt_line_count") - skirt_size = skirt_distance + (skirt_line_count * container_stack.getValue("skirt_line_width")) + skirt_distance = container_stack.getProperty("skirt_gap", "value") + skirt_line_count = container_stack.getProperty("skirt_line_count", "value") + skirt_size = skirt_distance + (skirt_line_count * container_stack.getProperty("skirt_line_width", "value")) elif adhesion_type == "brim": - skirt_size = container_stack.getValue("brim_line_count") * container_stack.getValue("skirt_line_width") + skirt_size = container_stack.getProperty("brim_line_count", "value") * container_stack.getProperty("skirt_line_width", "value") elif adhesion_type == "raft": - skirt_size = container_stack.getValue("raft_margin") + skirt_size = container_stack.getProperty("raft_margin", "value") - if container_stack.getValue("draft_shield_enabled"): - skirt_size += container_stack.getValue("draft_shield_dist") + if container_stack.getProperty("draft_shield_enabled", "value"): + skirt_size += container_stack.getProperty("draft_shield_dist", "value") - if container_stack.getValue("xy_offset"): - skirt_size += container_stack.getValue("xy_offset") + if container_stack.getProperty("xy_offset", "value"): + skirt_size += container_stack.getProperty("xy_offset", "value") return skirt_size diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 1c65ea5dfe..9aec1a7290 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -37,7 +37,7 @@ class SolidView(View): if Application.getInstance().getGlobalContainerStack(): if Preferences.getInstance().getValue("view/show_overhang"): - angle = Application.getInstance().getGlobalContainerStack().getValue("support_angle") + angle = Application.getInstance().getGlobalContainerStack().getProperty("support_angle", "value") if angle is not None: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle))) else: From 3313286ea978fc53c25599d296ab1731ef62fe29 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 16:36:52 +0200 Subject: [PATCH 290/424] Update OSX log location Changed in https://github.com/Ultimaker/Uranium/commit/9cc143057963937fa17b4c046d33e8b214c11abe --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7fc77f9dcf..b56a5ea345 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ For crashes and similar issues, please attach the following information: * (On Windows) The log as produced by dxdiag (start -> run -> dxdiag -> save output) * The Cura GUI log file, located at * $User/AppData/Local/cura/cura.log (Windows) - * $User/.cura/cura.log (OSX) + * $User/Library/Application Support/cura (OSX) * $USER/.local/share/cura (Ubuntu/Linux) * The Cura Engine log, using Help -> Show Engine Log From b621958098a7d4080de1b366d6bc1fd819423aa4 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 18 May 2016 16:33:10 +0200 Subject: [PATCH 291/424] Fix uses of getValue after its removal from Uranium API --- cura/BuildVolume.py | 13 +++++++++++-- plugins/SolidView/SolidView.py | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 77bda87825..61802167a7 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -37,6 +37,7 @@ class BuildVolume(SceneNode): self.setCalculateBoundingBox(False) + self._active_container_stack = None Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged) self._onGlobalContainerStackChanged() @@ -158,9 +159,14 @@ class BuildVolume(SceneNode): Application.getInstance().getController().getScene()._maximum_bounds = scale_to_max_bounds def _onGlobalContainerStackChanged(self): + if self._active_container_stack: + self._active_container_stack.propertyChanged.disconnect(self._onSettingPropertyChanged) + self._active_container_stack = Application.getInstance().getGlobalContainerStack() if self._active_container_stack: + self._active_container_stack.propertyChanged.connect(self._onSettingPropertyChanged) + self._width = self._active_container_stack.getProperty("machine_width", "value") if self._active_container_stack.getProperty("print_sequence", "value") == "one_at_a_time": self._height = self._active_container_stack.getProperty("gantry_height", "value") @@ -172,12 +178,15 @@ class BuildVolume(SceneNode): self.rebuild() - def _onSettingValueChanged(self, setting_key): + def _onSettingPropertyChanged(self, setting_key, property_name): + if property_name != "value": + return + if setting_key == "print_sequence": if Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") == "one_at_a_time": self._height = self._active_container_stack.getProperty("gantry_height", "value") else: - self._height = self._active_container_stack.getProperty("machine_depth", "value") + self._height = self._active_container_stack.getProperty("machine_height", "value") self.rebuild() if setting_key in self._skirt_settings: self._updateDisallowedAreas() diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 9aec1a7290..71b29c8186 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -35,7 +35,6 @@ class SolidView(View): self._disabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) if Application.getInstance().getGlobalContainerStack(): - if Preferences.getInstance().getValue("view/show_overhang"): angle = Application.getInstance().getGlobalContainerStack().getProperty("support_angle", "value") if angle is not None: From 3b5a74047bcb64890480cc9fc4f951c247d44ca8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 13:40:42 +0200 Subject: [PATCH 292/424] Add setting instance type for extruder This type is not included in the global stack structure yet since there is no global stack structure per extruder yet. Contributes to issue CURA-1278. --- cura/CuraApplication.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 39a25c34ad..ee9b71dd33 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -74,6 +74,7 @@ class CuraApplication(QtApplication): VariantInstanceContainer = Resources.UserType + 5 UserInstanceContainer = Resources.UserType + 6 MachineStack = Resources.UserType + 7 + ExtruderInstanceContainer = Resources.UserType + 8 Q_ENUMS(ResourceTypes) @@ -124,6 +125,7 @@ class CuraApplication(QtApplication): Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants") Resources.addStorageType(self.ResourceTypes.MaterialInstanceContainer, "materials") + Resources.addStorageType(self.ResourceTypes.ExtruderInstanceContainer, "extruder") Resources.addStorageType(self.ResourceTypes.UserInstanceContainer, "user") Resources.addStorageType(self.ResourceTypes.MachineStack, "machine_instances") From 6b0a33e166c4d916852a17a5edb70ce19150d90d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 17:53:27 +0200 Subject: [PATCH 293/424] Move dual extrusion settings into FDMPrinter This involves making labels and descriptions for some dual-extrusion machine settings, and default values for everything, making sure inheritance is correct, etc. Contributes to issue CURA-1278. --- cura/CuraApplication.py | 2 +- resources/definitions/fdmprinter.def.json | 362 ++++++++++++++++++ .../machines/dual_extrusion_printer.json | 361 ----------------- 3 files changed, 363 insertions(+), 362 deletions(-) delete mode 100644 resources/machines/dual_extrusion_printer.json diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index ee9b71dd33..eee0807161 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -125,7 +125,7 @@ class CuraApplication(QtApplication): Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants") Resources.addStorageType(self.ResourceTypes.MaterialInstanceContainer, "materials") - Resources.addStorageType(self.ResourceTypes.ExtruderInstanceContainer, "extruder") + Resources.addStorageType(self.ResourceTypes.ExtruderInstanceContainer, "extruders") Resources.addStorageType(self.ResourceTypes.UserInstanceContainer, "user") Resources.addStorageType(self.ResourceTypes.MachineStack, "machine_instances") diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 603dc18e92..cd997c3f34 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -241,6 +241,92 @@ "default_value": 0.4, "minimum_value": "0.001", "maximum_value_warning": "10" + }, + "machine_nozzle_offset_x": + { + "label": "Nozzle X Offset", + "description": "The x-coordinate of the offset of the nozzle.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_nozzle_offset_y": + { + "label": "Nozzle Y Offset", + "description": "The y-coordinate of the offset of the nozzle.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_start_code": + { + "label": "Extruder Start G-Code", + "description": "Start g-code to execute whenever turning the extruder on.", + "type": "str", + "default_value": "", + "global_only": "True" + }, + "machine_extruder_start_pos_abs": + { + "label": "Extruder Start Position Absolute", + "description": "Make the extruder starting position absolute rather than relative to the last-known location of the head.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "machine_extruder_start_pos_x": + { + "label": "Extruder Start Position X", + "description": "The x-coordinate of the starting position when turning the extruder on.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_start_pos_y": + { + "label": "Extruder Start Position Y", + "description": "The y-coordinate of the starting position when turning the extruder on.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_end_code": + { + "label": "Extruder End G-Code", + "description": "End g-code to execute whenever turning the extruder off.", + "type": "str", + "default_value": "", + "global_only": "True" + }, + "machine_extruder_end_pos_abs": + { + "label": "Extruder End Position Absolute", + "description": "Make the extruder ending position absolute rather than relative to the last-known location of the head.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "machine_extruder_end_pos_x": + { + "label": "Extruder End Position X", + "description": "The x-coordinate of the ending position when turning the extruder off.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_end_pos_y": + { + "label": "Extruder End Position Y", + "description": "The y-coordinate of the ending position when turning the extruder off.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" } } }, @@ -391,6 +477,20 @@ "enabled": "support_roof_enable", "global_only": true, "value": "line_width" + }, + "prime_tower_line_width": + { + "label": "Prime Tower Line Width", + "description": "Width of a single prime tower line.", + "type": "float", + "unit": "mm", + "enabled": "prime_tower_enable", + "default_value": 0.4, + "value": "line_width", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "global_only": "True" } } } @@ -889,6 +989,71 @@ "minimum_value_warning": "-0.0001", "maximum_value_warning": "10", "enabled": "retraction_enable" + }, + "material_standby_temperature": + { + "label": "Standby Temperature", + "description": "The temperature of the nozzle when another nozzle is currently used for printing.", + "type": "float", + "unit": "°C", + "default_value": 150, + "minimum_value": "0", + "maximum_value_warning": "260", + "global_only": "True" + }, + "switch_extruder_retraction_amount": + { + "label": "Nozzle Switch Retraction Distance", + "description": "The amount of retraction: Set at 0 for no retraction at all. This should generally be the same as the length of the heat zone.", + "type": "float", + "unit": "mm", + "enabled": "retraction_enable", + "default_value": 20, + "value": "machine_heat_zone_length", + "minimum_value_warning": "0", + "maximum_value_warning": "100", + "global_only": "True" + }, + "switch_extruder_retraction_speeds": + { + "label": "Nozzle Switch Retraction Speed", + "description": "The speed at which the filament is retracted. A higher retraction speed works better, but a very high retraction speed can lead to filament grinding.", + "type": "float", + "unit": "mm/s", + "enabled": "retraction_enable", + "default_value": 20, + "minimum_value": "0.1", + "maximum_value_warning": "300", + "global_only": "True", + "children": + { + "switch_extruder_retraction_speed": + { + "label": "Nozzle Switch Retract Speed", + "description": "The speed at which the filament is retracted during a nozzle switch retract.", + "type": "float", + "unit": "mm/s", + "enabled": "retraction_enable", + "default_value": 20, + "value": "switch_extruder_retraction_speeds", + "minimum_value": "0.1", + "maximum_value_warning": "300", + "global_only": "True" + }, + "switch_extruder_prime_speed": + { + "label": "Nozzle Switch Prime Speed", + "description": "The speed at which the filament is pushed back after a nozzle switch retraction.", + "type": "float", + "unit": "mm/s", + "enabled": "retraction_enable", + "default_value": 20, + "value": "switch_extruder_retraction_speeds", + "minimum_value": "0.1", + "maximum_value_warning": "300", + "global_only": "True" + } + } } } }, @@ -1018,6 +1183,19 @@ "global_only": true } } + }, + "speed_prime_tower": + { + "label": "Prime Tower Speed", + "description": "The speed at which the prime tower is printed. Printing the prime tower slower can make it more stable when the adhesion between the different filaments is suboptimal.", + "type": "float", + "unit": "mm/s", + "enabled": "prime_tower_enable", + "default_value": 60, + "value": "speed_print", + "minimum_value": "0.1", + "maximum_value_warning": "150", + "global_only": "True" } } }, @@ -1962,6 +2140,190 @@ } } }, + "dual": + { + "label": "Dual Extrusion", + "type": "category", + "icon": "category_dual", + "description": "Settings used for printing with multiple extruders.", + "children": + { + "extruder_nr": + { + "label": "Extruder", + "description": "The extruder train used for printing. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1" + }, + "adhesion_extruder_nr": + { + "label": "Platform Adhesion Extruder", + "description": "The extruder train to use for printing the skirt/brim/raft. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True" + }, + "support_extruder_nr": + { + "label": "Support Extruder", + "description": "The extruder train to use for printing the support. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True", + "children": { + "support_infill_extruder_nr": + { + "label": "Support Infill Extruder", + "description": "The extruder train to use for printing the infill of the support. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "value": "support_extruder_nr", + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True" + }, + "support_extruder_nr_layer_0": + { + "label": "First Layer Support Extruder", + "description": "The extruder train to use for printing the first layer of support infill. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "value": "support_extruder_nr", + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True" + }, + "support_roof_extruder_nr": + { + "label": "Support Roof Extruder", + "description": "The extruder train to use for printing the roof of the support. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "value": "support_extruder_nr", + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True" + } + } + }, + "prime_tower_enable": + { + "label": "Enable Prime Tower", + "description": "Print a tower next to the print which serves to prime the material after each nozzle switch.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "prime_tower_size": + { + "label": "Prime Tower Size", + "description": "The width of the prime tower.", + "type": "float", + "unit": "mm", + "enabled": "prime_tower_enable", + "default_value": 15, + "value": "15 if prime_tower_enable else 0", + "minimum_value": "0", + "maximum_value_warning": "20", + "global_only": "True" + }, + "prime_tower_position_x": + { + "label": "Prime Tower X Position", + "description": "The x coordinate of the position of the prime tower.", + "type": "float", + "unit": "mm", + "enabled": "prime_tower_enable", + "default_value": 200, + "minimum_value_warning": "-1000", + "maximum_value_warning": "1000", + "global_only": "True" + }, + "prime_tower_position_y": + { + "label": "Prime Tower Y Position", + "description": "The y coordinate of the position of the prime tower.", + "type": "float", + "unit": "mm", + "enabled": "prime_tower_enable", + "default_value": 200, + "minimum_value_warning": "-1000", + "maximum_value_warning": "1000", + "global_only": "True" + }, + "prime_tower_flow": + { + "label": "Prime Tower Flow", + "description": "Flow compensation: the amount of material extruded is multiplied by this value.", + "type": "float", + "unit": "%", + "enabled": "prime_tower_enable", + "default_value": 100, + "minimum_value": "0.0001", + "minimum_value_warning": "50", + "maximum_value_warning": "150", + "global_only": "True" + }, + "prime_tower_wipe_enabled": + { + "label": "Wipe Nozzle on Prime Tower", + "description": "After printing the prime tower with one nozzle, wipe the oozed material from the other nozzle off on the prime tower.", + "type": "bool", + "enabled": "prime_tower_enable", + "default_value": false, + "global_only": "True" + }, + "multiple_mesh_overlap": + { + "label": "Dual Extrusion Overlap", + "description": "Make the objects printed with different extruder trains overlap a bit. This makes the different materials bond together better.", + "type": "float", + "unit": "mm", + "default_value": 0.15, + "minimum_value": "0", + "maximum_value_warning": "1.0", + "global_only": "True" + }, + "ooze_shield_enabled": + { + "label": "Enable Ooze Shield", + "description": "Enable exterior ooze shield. This will create a shell around the object which is likely to wipe a second nozzle if it's at the same height as the first nozzle.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "ooze_shield_angle": + { + "label": "Ooze Shield Angle", + "description": "The maximum angle a part in the ooze shield will have. With 0 degrees being vertical, and 90 degrees being horizontal. A smaller angle leads to less failed ooze shields, but more material.", + "type": "float", + "unit": "°", + "enabled": "ooze_shield_enabled", + "default_value": 60, + "minimum_value": "0", + "maximum_value": "90", + "global_only": "True" + }, + "ooze_shield_dist": + { + "label": "Ooze Shield Distance", + "description": "Distance of the ooze shield from the print, in the X/Y directions.", + "type": "float", + "unit": "mm", + "enabled": "ooze_shield_enabled", + "default_value": 2, + "minimum_value": "0", + "maximum_value_warning": "30", + "global_only": "True" + } + } + }, "experimental": { "label": "Experimental Modes", diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json deleted file mode 100644 index 57ad490cdd..0000000000 --- a/resources/machines/dual_extrusion_printer.json +++ /dev/null @@ -1,361 +0,0 @@ -{ - "version": 1, - "id": "dual_extrusion", - "name": "Dual Extrusion Base File", - "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", - "inherits": "fdmprinter.json", - - "visible": false, - - "machine_extruder_trains": { - "0": { - "extruder_nr": { - "default": 0 - }, - "machine_nozzle_offset_x": { - "default": 0 - }, - "machine_nozzle_offset_y": { - "default": 0 - }, - "machine_nozzle_heat_up_speed": { - "default": 2 - }, - "machine_nozzle_cool_down_speed": { - "default": 2 - }, - "machine_nozzle_tip_outer_diameter": { - "default": 1 - }, - "machine_nozzle_head_distance": { - "default": 3 - }, - "machine_nozzle_expansion_angle": { - "default": 45 - }, - "machine_heat_zone_length": { - "default": 16 - } - }, - "1": { - "extruder_nr": { - "default": 1 - }, - "machine_nozzle_offset_x": { - "default": 0 - }, - "machine_nozzle_offset_y": { - "default": 0 - }, - "machine_nozzle_heat_up_speed": { - "default": 2 - }, - "machine_nozzle_cool_down_speed": { - "default": 2 - }, - "machine_nozzle_tip_outer_diameter": { - "default": 1 - }, - "machine_nozzle_head_distance": { - "default": 3 - }, - "machine_nozzle_expansion_angle": { - "default": 45 - }, - "machine_heat_zone_length": { - "default": 16 - } - } - }, - - "machine_settings": { - "machine_use_extruder_offset_to_offset_coords": { "default": false }, - - "machine_nozzle_offset_x": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_nozzle_offset_y": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_start_code": { "default": "", "SEE_machine_extruder_trains": true }, - "machine_extruder_start_pos_abs": { "default": false, "SEE_machine_extruder_trains": true }, - "machine_extruder_start_pos_x": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_start_pos_y": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_end_pos_abs": { "default": false, "SEE_machine_extruder_trains": true }, - "machine_extruder_end_pos_x": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_end_pos_y": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_end_code": { "default": "", "SEE_machine_extruder_trains": true } - }, - "overrides": { - "speed_print": { - "children": { - "speed_prime_tower": { - "label": "Prime Tower Speed", - "description": "The speed at which the prime tower is printed. Printing the prime tower slower can make it more stable when the adhesion between the different filaments is suboptimal.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value_warning": "150", - "default": 60, - "visible": false, - "enabled": "prime_tower_enable", - "global_only": true - } - } - }, - "line_width": { - "children": { - "prime_tower_line_width": { - "label": "Prime Tower Line Width", - "description": "Width of a single prime tower line.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false, - "enabled": "prime_tower_enable", - "global_only": true - } - } - } - }, - "categories": { - "dual": { - "label": "Dual Extrusion", - "visible": true, - "icon": "category_dual", - "settings": { - "extruder_nr": { - "label": "Extruder", - "description": "The extruder train used for printing. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "always_visible": true - }, - "adhesion_extruder_nr": { - "label": "Platform Adhesion Extruder", - "description": "The extruder train to use for printing the skirt/brim/raft. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "global_only": true - }, - "support_extruder_nr": { - "label": "Support Extruder", - "description": "The extruder train to use for printing the support. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "global_only": true, - "children": { - "support_infill_extruder_nr": { - "label": "Support Infill Extruder", - "description": "The extruder train to use for printing the infill of the support. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "global_only": true - }, - "support_extruder_nr_layer_0": { - "label": "First Layer Support Extruder", - "description": "The extruder train to use for printing the first layer of support infill. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "global_only": true - }, - "support_roof_extruder_nr": { - "label": "Support Roof Extruder", - "description": "The extruder train to use for printing the roof of the support. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "enabled": "support_roof_enable", - "global_only": true - } - } - }, - "prime_tower_enable": { - "label": "Enable Prime Tower", - "description": "Print a tower next to the print which serves to prime the material after each nozzle switch.", - "type": "boolean", - "visible": true, - "default": false, - "global_only": true - }, - "prime_tower_size": { - "label": "Prime Tower Size", - "description": "The width of the prime tower.", - "visible": false, - "type": "float", - "unit": "mm", - "default": 15, - "min_value": "0", - "max_value_warning": "20", - "inherit_function": "15 if prime_tower_enable else 0", - "enabled": "prime_tower_enable", - "global_only": true - }, - "prime_tower_position_x": { - "label": "Prime Tower X Position", - "description": "The x position of the prime tower.", - "visible": false, - "type": "float", - "unit": "mm", - "default": 200, - "min_value_warning": "-1000", - "max_value_warning": "1000", - "enabled": "prime_tower_enable", - "global_only": true - }, - "prime_tower_position_y": { - "label": "Prime Tower Y Position", - "description": "The y position of the prime tower.", - "visible": false, - "type": "float", - "unit": "mm", - "default": 200, - "min_value_warning": "-1000", - "max_value_warning": "1000", - "enabled": "prime_tower_enable", - "global_only": true - }, - "prime_tower_flow": { - "label": "Prime Tower Flow", - "description": "Flow compensation: the amount of material extruded is multiplied by this value.", - "visible": false, - "unit": "%", - "default": 100, - "type": "float", - "min_value": "5", - "min_value_warning": "50", - "max_value_warning": "150", - "enabled": "prime_tower_enable", - "global_only": true - }, - "prime_tower_wipe_enabled": { - "label": "Wipe Nozzle on Prime tower", - "description": "After printing the prime tower with the one nozzle, wipe the oozed material from the other nozzle off on the prime tower.", - "type": "boolean", - "default": false, - "enabled": "prime_tower_enable", - "global_only": true - }, - "multiple_mesh_overlap": { - "label": "Dual Extrusion Overlap", - "description": "Make the objects printed with different extruder trains overlap a bit. This makes the different materials bond together better.", - "visible": false, - "type": "float", - "unit": "mm", - "default": 0.15, - "min_value": "0", - "max_value_warning": "1.0", - "global_only": true - }, - "ooze_shield_enabled": { - "label": "Enable Ooze Shield", - "description": "Enable exterior ooze shield. This will create a shell around the object which is likely to wipe a second nozzle if it's at the same height as the first nozzle.", - "type": "boolean", - "default": false, - "global_only": true - }, - "ooze_shield_angle": { - "label": "Ooze Shield Angle", - "description": "The maximum angle a part in the ooze shield will have. With 0 degrees being vertical, and 90 degrees being horizontal. A smaller angle leads to less failed ooze shields, but more material.", - "unit": "°", - "type": "float", - "min_value": "0", - "max_value": "90", - "default": 60, - "visible": false, - "enabled": "ooze_shield_enabled", - "global_only": true - }, - "ooze_shield_dist": { - "label": "Ooze Shields Distance", - "description": "Distance of the ooze shield from the print, in the X/Y directions.", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "30", - "default": 2, - "visible": false, - "enabled": "ooze_shield_enabled", - "global_only": true - } - } - }, - "material": { - "settings": { - "material_standby_temperature": { - "label": "Standby Temperature", - "description": "The temperature of the nozzle when another nozzle is currently used for printing.", - "unit": "°C", - "type": "float", - "default": 150, - "min_value": "0", - "max_value_warning": "260", - "global_only": "True", - "visible": false - }, - "switch_extruder_retraction_amount": { - "label": "Nozzle Switch Retraction Distance", - "description": "The amount of retraction: Set at 0 for no retraction at all. This should generally be the same as the length of the heat zone.", - "unit": "mm", - "type": "float", - "default": 20, - "min_value_warning": "0", - "max_value_warning": "100", - "visible": false, - "inherit_function": "machine_heat_zone_length", - "enabled": "retraction_enable", - "global_only": true - }, - "switch_extruder_retraction_speeds": { - "label": "Nozzle Switch Retraction Speed", - "description": "The speed at which the filament is retracted. A higher retraction speed works better, but a very high retraction speed can lead to filament grinding.", - "unit": "mm/s", - "type": "float", - "default": 20, - "min_value": "0.1", - "max_value_warning": "300", - "visible": false, - "inherit": false, - "enabled": "retraction_enable", - "global_only": true, - "children": { - "switch_extruder_retraction_speed": { - "label": "Nozzle Switch Retract Speed", - "description": "The speed at which the filament is retracted during a nozzle switch retract. ", - "unit": "mm/s", - "type": "float", - "default": 20, - "min_value": "0.1", - "max_value_warning": "300", - "visible": false, - "enabled": "retraction_enable", - "global_only": true - }, - "switch_extruder_prime_speed": { - "label": "Nozzle Switch Prime Speed", - "description": "The speed at which the filament is pushed back after a nozzle switch retraction.", - "unit": "mm/s", - "type": "float", - "default": 20, - "min_value": "0.1", - "max_value_warning": "300", - "visible": false, - "enabled": "retraction_enable", - "global_only": true - } - } - } - } - } - } -} From 0e792e7a2257da9af263ab491980540f2431f7f7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 19 May 2016 11:25:25 +0200 Subject: [PATCH 294/424] Added SettingOverrideDecorator stub CURA-1278 --- cura/SettingOverrideDecorator.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cura/SettingOverrideDecorator.py diff --git a/cura/SettingOverrideDecorator.py b/cura/SettingOverrideDecorator.py new file mode 100644 index 0000000000..5574fb3182 --- /dev/null +++ b/cura/SettingOverrideDecorator.py @@ -0,0 +1,13 @@ +# Copyright (c) 2016 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. +from UM.Scene.SceneNodeDecorator import SceneNodeDecorator + + +## A decorator that adds a container stack to a Node. This stack should be queried for all settings regarding +# the linked node. The Stack in question will refer to the global stack (so that settings that are not defined by +# this stack still resolve. +class SettingOverrideDecorator(SceneNodeDecorator): + + def __init__(self): + super().__init__() + From e20691c4216483f5edf0a554c7b7873fcb55d05f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 19 May 2016 11:41:10 +0200 Subject: [PATCH 295/424] Fleshing out of SettingOverrideDecorator CURA-1278 --- cura/SettingOverrideDecorator.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/cura/SettingOverrideDecorator.py b/cura/SettingOverrideDecorator.py index 5574fb3182..826970c51f 100644 --- a/cura/SettingOverrideDecorator.py +++ b/cura/SettingOverrideDecorator.py @@ -2,12 +2,28 @@ # Cura is released under the terms of the AGPLv3 or higher. from UM.Scene.SceneNodeDecorator import SceneNodeDecorator +from UM.Settings.ContainerStack import ContainerStack +from UM.Settings.InstanceContainer import InstanceContainer +from UM.Settings.ContainerRegistry import ContainerRegistry + +from UM.Application import Application ## A decorator that adds a container stack to a Node. This stack should be queried for all settings regarding # the linked node. The Stack in question will refer to the global stack (so that settings that are not defined by # this stack still resolve. class SettingOverrideDecorator(SceneNodeDecorator): - def __init__(self): super().__init__() + self._stack = ContainerStack(id = "SettingOverrideStack") + self._instance = InstanceContainer(id = "SettingOverrideInstanceContainer") + self._stack.addContainer(self._instance) + Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged) + self._onGlobalContainerStackChanged() + + def _onGlobalContainerStackChanged(self): + ## Ensure that the next stack is always the global stack. + self._stack.setNextStack(Application.getInstance().getGlobalContainerStack()) + + def getStack(self): + return self._stack \ No newline at end of file From 570910187fd7f2557955d19aba7549a8d79050ce Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 19 May 2016 16:27:51 +0200 Subject: [PATCH 296/424] Fix typo in method name CURA-1278 --- resources/qml/Settings/SettingCategory.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index 56a20aec3b..f4e3dbe5ae 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -62,7 +62,7 @@ Button { width: height; onClicked: { - base.showAllHidenInheritedSettings() + base.showAllHiddenInheritedSettings() } color: UM.Theme.getColor("setting_control_button") From 2696f883b026fe4ea49fc22d62770099ee5521c6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 19 May 2016 16:31:29 +0200 Subject: [PATCH 297/424] Add a bit of documentation I was going further with this, but then it was decided that we need to do this later but I won't throw away this bit of documentation when I have it anyway. Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/StartSliceJob.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index f51cff5d93..9fecb20646 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -38,20 +38,23 @@ class StartSliceJob(Job): self._profile = profile self._socket = socket + ## Runs the job that initiates the slicing. def run(self): self._scene.acquireLock() + # Remove old layer data. for node in DepthFirstIterator(self._scene.getRoot()): if node.callDecoration("getLayerData"): node.getParent().removeChild(node) break + # Get the objects in their groups to print. object_groups = [] if self._profile.getSettingValue("print_sequence") == "one_at_a_time": for node in OneAtATimeIterator(self._scene.getRoot()): temp_list = [] - ## Node can't be printed, so don't bother sending it. + # Node can't be printed, so don't bother sending it. if getattr(node, "_outside_buildarea", False): continue From 2fa24edc1fdac439ce23450ee85994039b146af3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 20 May 2016 11:29:48 +0200 Subject: [PATCH 298/424] Fixed type for global_only property CURA-1278 --- cura/CuraApplication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index eee0807161..adce2f854e 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -24,7 +24,7 @@ from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation from UM.Operations.SetTransformOperation import SetTransformOperation -from UM.Settings.SettingDefinition import SettingDefinition +from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType from UM.Settings.ContainerRegistry import ContainerRegistry from UM.i18n import i18nCatalog @@ -119,7 +119,7 @@ class CuraApplication(QtApplication): Resources.addType(self.ResourceTypes.QmlFiles, "qml") Resources.addType(self.ResourceTypes.Firmware, "firmware") - SettingDefinition.addSupportedProperty("global_only", "bool") + SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.Function, default = False) ## Add the 4 types of profiles to storage. Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") From 9dc70fba02b1c52d3724a5b66fa80926300a4814 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 12:42:18 +0200 Subject: [PATCH 299/424] Add missing category-metadata Forgot to add this, apparently. Contributes to issue CURA-1278. --- resources/definitions/ultimaker2.def.json | 1 + resources/definitions/ultimaker_original.def.json | 1 + 2 files changed, 2 insertions(+) diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json index 606d51c545..7b2222e5b3 100644 --- a/resources/definitions/ultimaker2.def.json +++ b/resources/definitions/ultimaker2.def.json @@ -7,6 +7,7 @@ "visible": true, "author": "Ultimaker", "manufacturer": "Ultimaker", + "category": "Ultimaker", "file_formats": "text/x-gcode", "icon": "icon_ultimaker2.png", "platform": "ultimaker2_platform.obj", diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index cd2fac4599..ae659174bd 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -6,6 +6,7 @@ "metadata": { "author": "Ultimaker", "manufacturer": "Ultimaker", + "category": "Ultimaker", "file_formats": "text/x-gcode", "icon": "icon_ultimaker.png", "platform": "ultimaker_platform.stl", From 6fe70fc7e9a4e9674c7375c129fe2e71fa1ec53b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 13:28:05 +0200 Subject: [PATCH 300/424] Add definition for machine_use_extruder_offset_to_offset_coords While this was only used by Ultimaker printers, it is not specific to Ultimaker's printers so I'm putting the definition in FDMPrinter. Contributes to issue CURA-1278. --- resources/definitions/fdmprinter.def.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index cd997c3f34..e22d10f2aa 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -327,6 +327,13 @@ "unit": "mm", "default_value": 0, "global_only": "True" + }, + "machine_use_extruder_offset_to_offset_coords": + { + "label": "Offset With Extruder", + "description": "Apply the extruder offset to the coordinate system.", + "type": "bool", + "default_value": true } } }, From 7656f5a19b45b8eec11b7617ff1d6f213161014d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 13:30:19 +0200 Subject: [PATCH 301/424] Make definition of machine_extruder_drive_upgrade This setting is specific to UMO, so I'm defining it in the UMO definition. Contributes to issue CURA-1278. --- resources/definitions/ultimaker_original.def.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index ae659174bd..76b6c8b4ff 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -18,6 +18,14 @@ ] }, + "settings": { + "machine_extruder_drive_upgrade": { + "label": "Extruder Drive Upgrade", + "description": "This machine has the extruder drive upgrade.", + "type": "bool", + "default_value": false + } + }, "overrides": { "machine_width": { "default_value": 205 @@ -63,9 +71,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" - }, - "machine_extruder_drive_upgrade": { - "default_value": false } } } From 8e3d6cf2b549ace769387f4e157e27bdae79314a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 13:34:47 +0200 Subject: [PATCH 302/424] Repair x and y nozzle offsets The setting name is different. This probably wasn't updated for a while. Contributes to issue CURA-1278. --- resources/definitions/innovo_inventor.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index 14619833a7..9ba8d0d44b 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -43,10 +43,10 @@ "gantry_height": { "default_value": 82.3 }, - "machine_nozzle_offset_x_1": { + "machine_nozzle_offset_x": { "default_value": 0 }, - "machine_nozzle_offset_y_1": { + "machine_nozzle_offset_y": { "default_value": 15 }, "machine_gcode_flavor": { From 305cb27ac0e6550f359c2e5f52031970f1a80d67 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 20 May 2016 13:35:38 +0200 Subject: [PATCH 303/424] Global_only is now a string, as the filtering does not work with settingFunctions CURA-1278 --- cura/CuraApplication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index adce2f854e..f328e83174 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -119,7 +119,7 @@ class CuraApplication(QtApplication): Resources.addType(self.ResourceTypes.QmlFiles, "qml") Resources.addType(self.ResourceTypes.Firmware, "firmware") - SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.Function, default = False) + SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.String, default = "False") ## Add the 4 types of profiles to storage. Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") From 295cea338cbfcfa141b485acec90a3b9fe78e2e1 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 20 May 2016 14:09:58 +0200 Subject: [PATCH 304/424] Translate tool is now no longer stopped by ton of errors CURA-1278 --- cura/ConvexHullDecorator.py | 6 +++--- cura/ConvexHullJob.py | 10 +++++----- .../CuraEngineBackend/CuraEngineBackend.py | 20 +++++++++---------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index b53737cc80..04a46ecaca 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -25,9 +25,9 @@ class ConvexHullDecorator(SceneNodeDecorator): self._convex_hull_job = None self._profile = None - Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) - Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineInstanceChanged) - self._onActiveProfileChanged() + #Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) + #Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineInstanceChanged) + #self._onActiveProfileChanged() ## Force that a new (empty) object is created upon copy. def __deepcopy__(self, memo): diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index 9fb18981d3..7e814af7d7 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -59,12 +59,12 @@ class ConvexHullJob(Job): # This is done because of rounding errors. hull = hull.getMinkowskiHull(Polygon(numpy.array([[-0.5, -0.5], [-0.5, 0.5], [0.5, 0.5], [0.5, -0.5]], numpy.float32))) - profile = Application.getInstance().getMachineManager().getWorkingProfile() - if profile: - if profile.getSettingValue("print_sequence") == "one_at_a_time" and not self._node.getParent().callDecoration("isGroup"): + global_stack = Application.getInstance().getGlobalContainerStack() + if global_stack: + if global_stack.getProperty("print_sequence", "value")== "one_at_a_time" and not self._node.getParent().callDecoration("isGroup"): # Printing one at a time and it's not an object in a group self._node.callDecoration("setConvexHullBoundary", copy.deepcopy(hull)) - head_and_fans = Polygon(numpy.array(profile.getSettingValue("machine_head_with_fans_polygon"), numpy.float32)) + head_and_fans = Polygon(numpy.array(global_stack.getProperty("machine_head_with_fans_polygon", "value"), numpy.float32)) # Full head hull is used to actually check the order. full_head_hull = hull.getMinkowskiHull(head_and_fans) @@ -77,7 +77,7 @@ class ConvexHullJob(Job): # Min head hull is used for the push free min_head_hull = hull.getMinkowskiHull(head_and_fans) self._node.callDecoration("setConvexHullHead", min_head_hull) - hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_polygon"),numpy.float32))) + hull = hull.getMinkowskiHull(Polygon(numpy.array(global_stack.getProperty("machine_head_polygon","value"),numpy.float32))) else: self._node.callDecoration("setConvexHullHead", None) if self._node.getParent() is None: # Node was already deleted before job is done. diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 5102427823..a57aa01ba9 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -134,14 +134,15 @@ class CuraEngineBackend(Backend): self._process_layers_job.abort() self._process_layers_job = None - if self._profile.hasErrorValue(): - Logger.log("w", "Profile has error values. Aborting slicing") - if self._message: - self._message.hide() - self._message = None - self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) - self._message.show() - return #No slicing if we have error values since those are by definition illegal values. + #TODO: Re-add don't slice with error stuff. + #if self._profile.hasErrorValue(): + # Logger.log("w", "Profile has error values. Aborting slicing") + # if self._message: + # self._message.hide() + # self._message = None + # self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) + # self._message.show() + # return #No slicing if we have error values since those are by definition illegal values. self.processingProgress.emit(0.0) self.backendStateChange.emit(BackendState.NOT_STARTED) @@ -265,9 +266,6 @@ class CuraEngineBackend(Backend): self._change_timer.start() def _onChanged(self): - if not self._profile: - return - self._change_timer.start() def _onBackendConnected(self): From bcff683fb0cd2a415c561a0fcf02490979ecdb06 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 20 May 2016 14:15:06 +0200 Subject: [PATCH 305/424] Removed old perobject setting code, so plugin is actually loaded (instead of crashing) CURA-1278 --- .../PerObjectSettingsModel.py | 16 ++++++++-------- .../SettingOverrideModel.py | 13 +++++++------ plugins/PerObjectSettingsTool/__init__.py | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py b/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py index 7f7cef049b..cbe22d129e 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py @@ -7,8 +7,8 @@ from UM.Application import Application from UM.Qt.ListModel import ListModel from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator from UM.Scene.SceneNode import SceneNode -from UM.Settings.SettingOverrideDecorator import SettingOverrideDecorator -from UM.Settings.ProfileOverrideDecorator import ProfileOverrideDecorator +#from UM.Settings.SettingOverrideDecorator import SettingOverrideDecorator +#from UM.Settings.ProfileOverrideDecorator import ProfileOverrideDecorator from . import SettingOverrideModel @@ -35,7 +35,7 @@ class PerObjectSettingsModel(ListModel): self.setProperty(self.find("id", object_id), "profile", profile_name) profile = None - if profile_name != "global": + '''if profile_name != "global": profile = Application.getInstance().getMachineManager().findProfile(profile_name) node = self._scene.findObject(object_id) @@ -45,7 +45,7 @@ class PerObjectSettingsModel(ListModel): node.callDecoration("setProfile", profile) else: if node.getDecorator(ProfileOverrideDecorator): - node.removeDecorator(ProfileOverrideDecorator) + node.removeDecorator(ProfileOverrideDecorator)''' @pyqtSlot("quint64", str) def addSettingOverride(self, object_id, key): @@ -54,8 +54,8 @@ class PerObjectSettingsModel(ListModel): return node = self._scene.findObject(object_id) - if not node.getDecorator(SettingOverrideDecorator): - node.addDecorator(SettingOverrideDecorator()) + #if not node.getDecorator(SettingOverrideDecorator): + # node.addDecorator(SettingOverrideDecorator()) node.callDecoration("addSetting", key) @@ -64,8 +64,8 @@ class PerObjectSettingsModel(ListModel): node = self._scene.findObject(object_id) node.callDecoration("removeSetting", key) - if len(node.callDecoration("getAllSettings")) == 0: - node.removeDecorator(SettingOverrideDecorator) + #if len(node.callDecoration("getAllSettings")) == 0: + # node.removeDecorator(SettingOverrideDecorator) def _updateModel(self): self.clear() diff --git a/plugins/PerObjectSettingsTool/SettingOverrideModel.py b/plugins/PerObjectSettingsTool/SettingOverrideModel.py index 860650015c..d4bebfdfee 100644 --- a/plugins/PerObjectSettingsTool/SettingOverrideModel.py +++ b/plugins/PerObjectSettingsTool/SettingOverrideModel.py @@ -5,7 +5,7 @@ from PyQt5.QtCore import Qt, pyqtSlot, QUrl from UM.Application import Application from UM.Qt.ListModel import ListModel -from UM.Settings.SettingOverrideDecorator import SettingOverrideDecorator +#from UM.Settings.SettingOverrideDecorator import SettingOverrideDecorator class SettingOverrideModel(ListModel): KeyRole = Qt.UserRole + 1 @@ -29,9 +29,9 @@ class SettingOverrideModel(ListModel): self._node.decoratorsChanged.connect(self._onDecoratorsChanged) self._onDecoratorsChanged(None) - self._activeProfile = Application.getInstance().getMachineManager().getWorkingProfile() #To be able to get notified when a setting changes. - self._activeProfile.settingValueChanged.connect(self._onProfileSettingValueChanged) - Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onProfileChanged) + #self._activeProfile = Application.getInstance().getMachineManager().getWorkingProfile() #To be able to get notified when a setting changes. + #self._activeProfile.settingValueChanged.connect(self._onProfileSettingValueChanged) + #Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onProfileChanged) self.addRoleName(self.KeyRole, "key") self.addRoleName(self.LabelRole, "label") @@ -53,7 +53,8 @@ class SettingOverrideModel(ListModel): self._decorator.setSettingValue(key, value) def _onDecoratorsChanged(self, node): - if not self._node.getDecorator(SettingOverrideDecorator): + return + '''if not self._node.getDecorator(SettingOverrideDecorator): self.clear() return @@ -61,7 +62,7 @@ class SettingOverrideModel(ListModel): self._decorator.settingAdded.connect(self._onSettingsChanged) self._decorator.settingRemoved.connect(self._onSettingsChanged) self._decorator.settingValueChanged.connect(self._onSettingValueChanged) - self._onSettingsChanged() + self._onSettingsChanged()''' def _createOptionsModel(self, options): if not options: diff --git a/plugins/PerObjectSettingsTool/__init__.py b/plugins/PerObjectSettingsTool/__init__.py index 0d49b2c892..d5d249b430 100644 --- a/plugins/PerObjectSettingsTool/__init__.py +++ b/plugins/PerObjectSettingsTool/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": i18n_catalog.i18nc("@info:whatsthis", "Provides the Per Object Settings."), - "api": 2 + "api": 3 }, "tool": { "name": i18n_catalog.i18nc("@label", "Per Object Settings"), From e9380ba83d0a3b7c45b659547149914aff784cc8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 20 May 2016 15:08:17 +0200 Subject: [PATCH 306/424] Added rudimentary display of settings again CURA-1278 --- .../PerObjectCategory.qml | 29 ++++ .../PerObjectSettingsTool/PerObjectItem.qml | 29 ++++ .../PerObjectSettingsPanel.qml | 147 +++++------------- 3 files changed, 97 insertions(+), 108 deletions(-) create mode 100644 plugins/PerObjectSettingsTool/PerObjectCategory.qml create mode 100644 plugins/PerObjectSettingsTool/PerObjectItem.qml diff --git a/plugins/PerObjectSettingsTool/PerObjectCategory.qml b/plugins/PerObjectSettingsTool/PerObjectCategory.qml new file mode 100644 index 0000000000..2113a623a0 --- /dev/null +++ b/plugins/PerObjectSettingsTool/PerObjectCategory.qml @@ -0,0 +1,29 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 +import QtQuick.Layouts 1.1 + +import UM 1.1 as UM + +import ".." + +Button { + id: base; + + style: UM.Theme.styles.sidebar_category; + + signal showTooltip(string text); + signal hideTooltip(); + signal contextMenuRequested() + + text: definition.label + iconSource: UM.Theme.getIcon(definition.icon) + + checkable: true + checked: definition.expanded + + onClicked: definition.expanded ? settingDefinitionsModel.collapse(definition.key) : settingDefinitionsModel.expandAll(definition.key) +} diff --git a/plugins/PerObjectSettingsTool/PerObjectItem.qml b/plugins/PerObjectSettingsTool/PerObjectItem.qml new file mode 100644 index 0000000000..d2243ab562 --- /dev/null +++ b/plugins/PerObjectSettingsTool/PerObjectItem.qml @@ -0,0 +1,29 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 + +import UM 1.2 as UM + +UM.TooltipArea +{ + x: model.depth * UM.Theme.getSize("default_margin").width; + text: model.description; + + width: childrenRect.width; + height: childrenRect.height; + + Button + { + id: check + + text: definition.label + + //onClicked: delegateItem.settingsModel.setSettingVisible(model.key, checked); + } +} + + diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index c664aeaeef..19dab6bc26 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -6,7 +6,10 @@ import QtQuick.Controls 1.2 import QtQuick.Controls.Styles 1.2 import QtQuick.Window 2.2 -import UM 1.1 as UM +import UM 1.2 as UM +import Cura 1.0 as Cura +import ".." + Item { id: base; @@ -133,6 +136,7 @@ Item { id: settingPickDialog title: catalog.i18nc("@title:window", "Pick a Setting to Customize") + property string labelFilter: "" TextField { id: filter; @@ -145,123 +149,50 @@ Item { placeholderText: catalog.i18nc("@label:textbox", "Filter..."); - onTextChanged: settingCategoriesModel.filter(text); + onTextChanged: settingPickDialog.labelFilter = text; } - ScrollView { - id: view; - anchors { + ScrollView + { + id: scrollView + + anchors + { top: filter.bottom; left: parent.left; right: parent.right; bottom: parent.bottom; } + ListView + { + model: UM.SettingDefinitionsModel + { + id: definitionsModel; + containerId: Cura.MachineManager.activeDefinitionId + filter: + { + "global_only": "False" + } + } + delegate:Loader + { + id: loader - Column { - width: view.width - UM.Theme.getSize("default_margin").width * 2; - height: childrenRect.height; + width: parent.width + height: model.type != undefined ? UM.Theme.getSize("section").height : 0; - Repeater { - id: settingList; + property var definition: model + property var settingDefinitionsModel: definitionsModel - model: UM.SettingCategoriesModel { id: settingCategoriesModel; } - - delegate: Item { - id: delegateItem; - - width: parent.width; - height: childrenRect.height; - visible: model.visible && settingsColumn.childrenHeight != 0 //If all children are hidden, the height is 0, and then the category header must also be hidden. - - ToolButton { - id: categoryHeader; - text: model.name; - checkable: true; - width: parent.width; - onCheckedChanged: settingsColumn.state != "" ? settingsColumn.state = "" : settingsColumn.state = "collapsed"; - - style: ButtonStyle { - background: Rectangle - { - width: control.width; - height: control.height; - color: control.hovered ? palette.highlight : "transparent"; - } - label: Row - { - spacing: UM.Theme.getSize("default_margin").width; - Image - { - anchors.verticalCenter: parent.verticalCenter; - source: control.checked ? UM.Theme.getIcon("arrow_right") : UM.Theme.getIcon("arrow_bottom"); - } - Label - { - text: control.text; - font.bold: true; - color: control.hovered ? palette.highlightedText : palette.text; - } - } - } - } - - property variant settingsModel: model.settings; - - Column { - id: settingsColumn; - - anchors.top: categoryHeader.bottom; - - property real childrenHeight: - { - var h = 0.0; - for(var i in children) - { - var item = children[i]; - h += children[i].height; - if(item.settingVisible) - { - if(i > 0) - { - h += spacing; - } - } - } - return h; - } - - width: childrenRect.width; - height: childrenHeight; - Repeater { - model: delegateItem.settingsModel; - - delegate: ToolButton { - id: button; - x: model.visible_depth * UM.Theme.getSize("default_margin").width; - text: model.name; - tooltip: model.description; - visible: !model.global_only - height: model.global_only ? 0 : undefined - - onClicked: { - var object_id = UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex).id; - UM.ActiveTool.properties.getValue("Model").addSettingOverride(object_id, model.key); - settingPickDialog.visible = false; - } - - states: State { - name: "filtered" - when: model.filtered || !model.visible || !model.enabled - PropertyChanges { target: button; height: 0; opacity: 0; } - } - } - } - - states: State { - name: "collapsed"; - - PropertyChanges { target: settingsColumn; opacity: 0; height: 0; } - } + asynchronous: true + source: + { + switch(model.type) + { + case "category": + return "PerObjectCategory.qml" + default: + return "PerObjectItem.qml" } } } From 7cc62db81dea84e367586a925d5cff10937df2b8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 14:06:07 +0200 Subject: [PATCH 307/424] Increment XRayView API number This plug-in still works, so this can be incremented without trouble. Contributes to issue CURA-1278. --- plugins/XRayView/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/XRayView/__init__.py b/plugins/XRayView/__init__.py index 277dc69b92..34e4761863 100644 --- a/plugins/XRayView/__init__.py +++ b/plugins/XRayView/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": catalog.i18nc("@info:whatsthis", "Provides the X-Ray view."), - "api": 2 + "api": 3 }, "view": { "name": catalog.i18nc("@item:inlistbox", "X-Ray"), From 85ce8a719ed0bbafae04cafe83af3a81fb8fbcf3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 16:16:25 +0200 Subject: [PATCH 308/424] Merge local with origin Contributes to issue CURA-1278. --- cura/CuraApplication.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f328e83174..b95f6058b4 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -224,6 +224,7 @@ class CuraApplication(QtApplication): ## Handle loading of all plugin types (and the backend explicitly) # \sa PluginRegistery def _loadPlugins(self): + self._plugin_registry.addType("profile_reader", self._addProfileReader) self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "lib", "cura")) if not hasattr(sys, "frozen"): self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "plugins")) @@ -711,3 +712,6 @@ class CuraApplication(QtApplication): job = ReadMeshJob(os.path.abspath(file)) job.finished.connect(self._onFileLoaded) job.start() + + def _addProfileReader(self, profile_reader): + pass \ No newline at end of file From 5a28eca2039bce9b6e8102c9330c3087ece9484a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 16:16:55 +0200 Subject: [PATCH 309/424] Add profile reader plug-in type This type of plug-in will load a file as an instance container of the user profile type. Contributes to issue CURA-1278. --- cura/ProfileReader.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cura/ProfileReader.py diff --git a/cura/ProfileReader.py b/cura/ProfileReader.py new file mode 100644 index 0000000000..36bb2c7177 --- /dev/null +++ b/cura/ProfileReader.py @@ -0,0 +1,17 @@ +# Copyright (c) 2016 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +from UM.PluginObject import PluginObject + +## A type of plug-ins that reads profiles from a file. +# +# The profile is then stored as instance container of the type user profile. +class ProfileReader(PluginObject): + def __init__(self): + super().__init__() + + ## Read profile data from a file and return a filled profile. + # + # \return \type{Profile} The profile that was obtained from the file. + def read(self, file_name): + raise NotImplementedError("Profile reader plug-in was not correctly implemented. The read function was not implemented.") \ No newline at end of file From 117973ee25ddd7e4f3a63fd425118d8be8734538 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 16:20:58 +0200 Subject: [PATCH 310/424] Add todo message for adding profile readers This should be done when we have a working profile manager again. Contributes to issue CURA-1278. --- cura/CuraApplication.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index b95f6058b4..c46833f6e0 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -714,4 +714,5 @@ class CuraApplication(QtApplication): job.start() def _addProfileReader(self, profile_reader): + # TODO: Add the profile reader to the list of plug-ins that can be used when importing profiles. pass \ No newline at end of file From 754932f83ad10c9ac045c240e3c838548040884d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 20 May 2016 16:22:00 +0200 Subject: [PATCH 311/424] Move LegacyProfileReader to new setting structure Untested as the profile manager is not functional at the moment. Contributes to issue CURA-1278. --- .../LegacyProfileReader/LegacyProfileReader.py | 16 +++++++++------- plugins/LegacyProfileReader/__init__.py | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py index 3daf360ee6..19154c9c5a 100644 --- a/plugins/LegacyProfileReader/LegacyProfileReader.py +++ b/plugins/LegacyProfileReader/LegacyProfileReader.py @@ -9,8 +9,9 @@ import os.path #For concatenating the path to the plugin and the relative path t from UM.Application import Application #To get the machine manager to create the new profile in. from UM.Logger import Logger #Logging errors. from UM.PluginRegistry import PluginRegistry #For getting the path to this plugin's directory. -from UM.Settings.Profile import Profile -from UM.Settings.ProfileReader import ProfileReader +from UM.Settings.DefinitionContainer import DefinitionContainer #For getting the current machine's defaults. +from UM.Settings.InstanceContainer import InstanceContainer #The new profile to make. +from cura.ProfileReader import ProfileReader #The plug-in type to implement. ## A plugin that reads profile data from legacy Cura versions. # @@ -66,7 +67,7 @@ class LegacyProfileReader(ProfileReader): if file_name.split(".")[-1] != "ini": return None Logger.log("i", "Importing legacy profile from file " + file_name + ".") - profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False) #Create an empty profile. + profile = InstanceContainer("Imported Legacy Profile") #Create an empty profile. parser = configparser.ConfigParser(interpolation = None) try: @@ -103,23 +104,24 @@ class LegacyProfileReader(ProfileReader): if "target_version" not in dict_of_doom: Logger.log("e", "Dictionary of Doom has no target version. Is it the correct JSON file?") return None - if Profile.ProfileVersion != dict_of_doom["target_version"]: - Logger.log("e", "Dictionary of Doom of legacy profile reader (version %s) is not in sync with the profile version (version %s)!", dict_of_doom["target_version"], str(Profile.ProfileVersion)) + if InstanceContainer.Version != dict_of_doom["target_version"]: + Logger.log("e", "Dictionary of Doom of legacy profile reader (version %s) is not in sync with the current instance container version (version %s)!", dict_of_doom["target_version"], str(InstanceContainer.Version)) return None if "translation" not in dict_of_doom: Logger.log("e", "Dictionary of Doom has no translation. Is it the correct JSON file?") return None + current_printer = Application.getInstance().getGlobalContainerStack().findContainer({ }, DefinitionContainer) for new_setting in dict_of_doom["translation"]: #Evaluate all new settings that would get a value from the translations. old_setting_expression = dict_of_doom["translation"][new_setting] compiled = compile(old_setting_expression, new_setting, "eval") try: new_value = eval(compiled, {"math": math}, legacy_settings) #Pass the legacy settings as local variables to allow access to in the evaluation. value_using_defaults = eval(compiled, {"math": math}, defaults) #Evaluate again using only the default values to try to see if they are default. - except Exception as e: #Probably some setting name that was missing or something else that went wrong in the ini file. + except Exception: #Probably some setting name that was missing or something else that went wrong in the ini file. Logger.log("w", "Setting " + new_setting + " could not be set because the evaluation failed. Something is probably missing from the imported legacy profile.") continue - if new_value != value_using_defaults and profile.getSettingValue(new_setting) != new_value: #Not equal to the default in the new Cura OR the default in the legacy Cura. + if new_value != value_using_defaults and current_printer.findDefinitions(key = new_setting).default_value != new_value: #Not equal to the default in the new Cura OR the default in the legacy Cura. profile.setSettingValue(new_setting, new_value) #Store the setting in the profile! if len(profile.getChangedSettings()) == 0: diff --git a/plugins/LegacyProfileReader/__init__.py b/plugins/LegacyProfileReader/__init__.py index e671f02571..f8b1f5c156 100644 --- a/plugins/LegacyProfileReader/__init__.py +++ b/plugins/LegacyProfileReader/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": catalog.i18nc("@info:whatsthis", "Provides support for importing profiles from legacy Cura versions."), - "api": 2 + "api": 3 }, "profile_reader": [ { From fc7f3498017d4a35ebc21f9452fb6b4e43ceae34 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 20 May 2016 17:21:09 +0200 Subject: [PATCH 312/424] Added rudimentary filtering Current implementation looks for an exact mach, whereas we should look for text in property. CURA-1278 --- .../PerObjectSettingsPanel.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 19dab6bc26..e53b5d338b 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -149,7 +149,17 @@ Item { placeholderText: catalog.i18nc("@label:textbox", "Filter..."); - onTextChanged: settingPickDialog.labelFilter = text; + onTextChanged: + { + if(text != "") + { + listview.model.filter.label = = {"global_only":"False", "label": text} + } + else + { + listview.model.filter = {"global_only":"False"} + } + } } ScrollView @@ -165,6 +175,7 @@ Item { } ListView { + id:listview model: UM.SettingDefinitionsModel { id: definitionsModel; From 63b623a6ef9b557924fb45b918f0cc699c93a80f Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 02:18:20 +0200 Subject: [PATCH 313/424] Move global_only property declaration to before the super() call so containerregistry knows about it when loading Also, properly set its type to function and default to False --- cura/CuraApplication.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index c46833f6e0..bfe342d1e4 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -85,6 +85,9 @@ class CuraApplication(QtApplication): self._open_file_queue = [] # Files to open when plug-ins are loaded. + # Need to do this before ContainerRegistry tries to load the machines + SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.Function, default = False) + super().__init__(name = "cura", version = CuraVersion) self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png"))) @@ -119,8 +122,6 @@ class CuraApplication(QtApplication): Resources.addType(self.ResourceTypes.QmlFiles, "qml") Resources.addType(self.ResourceTypes.Firmware, "firmware") - SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.String, default = "False") - ## Add the 4 types of profiles to storage. Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants") @@ -715,4 +716,4 @@ class CuraApplication(QtApplication): def _addProfileReader(self, profile_reader): # TODO: Add the profile reader to the list of plug-ins that can be used when importing profiles. - pass \ No newline at end of file + pass From b452cf7ba4b3ae0f2df84b01ce828d1ca4d55dae Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 02:19:11 +0200 Subject: [PATCH 314/424] Add a materials management page Based off Aldo's work which is in a different branch --- resources/qml/Cura.qml | 2 + resources/qml/Preferences/MaterialsPage.qml | 183 ++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 resources/qml/Preferences/MaterialsPage.qml diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index ba42bdc051..b03c5ed06a 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -551,6 +551,8 @@ UM.MainWindow insertPage(2, catalog.i18nc("@title:tab", "Printers"), Qt.resolvedUrl("MachinesPage.qml")); + insertPage(3, catalog.i18nc("@title:tab", "Materials"), Qt.resolvedUrl("Preferences/MaterialsPage.qml")) + //Force refresh setPage(0); } diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml new file mode 100644 index 0000000000..f58b1876e3 --- /dev/null +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -0,0 +1,183 @@ +// Copyright (c) 2016 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 1.1 +import QtQuick.Dialogs 1.2 + +import UM 1.2 as UM + +UM.ManagementPage +{ + id: base; + + title: catalog.i18nc("@title:tab", "Materials"); + + model: UM.InstanceContainersModel { filter: { "type": "material" } } +/* + onAddObject: { var selectedMaterial = UM.MaterialManager.createProfile(); base.selectMaterial(selectedMaterial); } + onRemoveObject: confirmDialog.open(); + onRenameObject: { renameDialog.open(); renameDialog.selectText(); } +*/ +// activateEnabled: false + addEnabled: false + removeEnabled: false + renameEnabled: false + + scrollviewCaption: " " + detailsVisible: true + + property string currency: UM.Preferences.getValue("general/currency") + + Item { + UM.I18nCatalog { id: catalog; name: "cura"; } + + visible: base.currentItem != null + anchors.fill: parent + + Label { id: profileName; text: base.currentItem ? base.currentItem.name : ""; font: UM.Theme.getFont("large"); width: parent.width; } + + TabView { + id: scrollView + anchors.left: parent.left + anchors.right: parent.right + anchors.top: profileName.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.bottom: parent.bottom + + Tab { + title: "Information" + anchors.margins: UM.Theme.getSize("default_margin").height + + Column { + spacing: UM.Theme.getSize("default_margin").height + + Grid { + id: containerGrid + columns: 2 + spacing: UM.Theme.getSize("default_margin").width + + Label { text: catalog.i18nc("@label", "Profile Type") } + Label { text: base.currentItem ? base.currentItem.metadata.status : "Unknown"} + + Label { text: catalog.i18nc("@label", "Supplier") } + Label { text: base.currentItem ? base.currentItem.metadata.brand : "Unknown"} + + Label { text: catalog.i18nc("@label", "Material Type") } + Label { text: base.currentItem ? base.currentItem.metadata.material : "Unknown" } + + Label { text: catalog.i18nc("@label", "Color") } + Rectangle { color: base.currentItem ? base.currentItem.metadata.color_code : "yellow" } + + Label { text: "" + catalog.i18nc("@label", "Properties") + "" } + Label { text: " " } + + Label { text: catalog.i18nc("@label", "Density") } + Label { text: base.currentItem ? base.currentItem.metadata.properties.density + " " + "g/cm³" : "" } + + Label { text: catalog.i18nc("@label", "Diameter") } + Label { text: base.currentItem ? base.currentItem.metadata.properties.diameter + " " + "mm" : ""} + + Label { + text: catalog.i18nc("@label", "Filament cost") + height: spoolCostInput.height + verticalAlignment: Text.AlignVCenter + } + + Row { + Label { + text: base.currentItem && base.currentItem.spoolCost ? base.currency + " " : "" + anchors.verticalCenter: parent.verticalCenter + } + TextField { + id: spoolCostInput + text: base.currentItem.spoolCost + } + } + + Label { text: catalog.i18nc("@label", "Filament weight") } + Label { text: base.currentItem ? base.currentItem.metadata.properies.spool_weight + " " + "kg" : "" } + + Label { text: catalog.i18nc("@label", "Filament length") } + Label { text: base.currentItem ? catalog.i18nc("@label", "approx.") + " " + base.currentItem.metadata.properties.spool_length + " " + "m" : "" } + + Label { text: catalog.i18nc("@label", "Cost per meter") } + Label { text: base.currentItem && base.currentItem.lenghtCost ? catalog.i18nc("@label", "approx.") + " " + base.currency + " " + base.currentItem.lenghtCost + "/m" : "" } + +// Column { +// +// +// +// +// } +// Column { +// +// +// +// Column { +// Label { text: base.currentItem && base.currentItem.variant ? base.currentItem.variant : "" } +// Row { +// spacing: UM.Theme.getSize("default_margin").width/2 +// Rectangle { +// color: base.currentItem && base.currentItem.colorDisplay ? base.currentItem.colorDisplay : "yellow" +// width: colorLabel.height +// height: colorLabel.height +// border.width: UM.Theme.getSize("default_lining").height +// } +// Label { id: colorLabel; text: base.currentItem && base.currentItem.colorRAL ? base.currentItem.colorRAL : "" } +// } +// } +// } +// Column { +// +// } +// Column { +// +// +// +// +// +// +// +// } + } + Label { + text: base.currentItem && base.currentItem.infoGeneral ? "" + catalog.i18nc("@label", "Information") + "
" + base.currentItem.infoGeneral : "" + width: scrollView.width - 2 * UM.Theme.getSize("default_margin").width + wrapMode: Text.WordWrap + } + Label { + text: base.currentItem && base.currentItem.infoAdhesion ? "" + catalog.i18nc("@label", "Adhesion") + "
" + base.currentItem.infoAdhesion : "" + width: scrollView.width - 2 * UM.Theme.getSize("default_margin").width + wrapMode: Text.WordWrap + } + } + } + Tab { + title: catalog.i18nc("@label", "Print settings") + anchors.margins: UM.Theme.getSize("default_margin").height + + Grid { + columns: 2 + spacing: UM.Theme.getSize("default_margin").width + + Column { + Repeater { + model: base.currentItem ? base.currentItem.settings : null + Label { + text: modelData.name.toString(); + elide: Text.ElideMiddle; + } + } + } + Column { + Repeater { + model: base.currentItem ? base.currentItem.settings : null + Label { text: modelData.value.toString() + " " + modelData.unit.toString(); } + } + } + } + } + } + } +} From e0c7ed85617ba54759ae2c65179ccdedbeb40236 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 02:19:39 +0200 Subject: [PATCH 315/424] Add a plugin that loads XML materials and an example material --- .../XmlMaterialProfile/XmlMaterialProfile.py | 84 +++++++++++++++++++ plugins/XmlMaterialProfile/__init__.py | 32 +++++++ .../materials/generic_pla.xml.fdm_material | 48 +++++++++++ 3 files changed, 164 insertions(+) create mode 100644 plugins/XmlMaterialProfile/XmlMaterialProfile.py create mode 100644 plugins/XmlMaterialProfile/__init__.py create mode 100644 resources/materials/generic_pla.xml.fdm_material diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py new file mode 100644 index 0000000000..5566301a09 --- /dev/null +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -0,0 +1,84 @@ +# Copyright (c) 2016 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +import math +import xml.etree.ElementTree as ET + +import UM.Settings + +def _tag_without_namespace(element): + return element.tag[element.tag.rfind("}") + 1:] + +class XmlMaterialProfile(UM.Settings.InstanceContainer): + def __init__(self, container_id, *args, **kwargs): + super().__init__(container_id, *args, **kwargs) + + def serialize(self): + raise NotImplementedError("Writing material profiles has not yet been implemented") + + def deserialize(self, serialized): + print("deserialize material profile") + data = ET.fromstring(serialized) + + self.addMetaDataEntry("type", "material") + + # TODO: Add material verfication + self.addMetaDataEntry("status", "Unknown") + + metadata = data.iterfind("./um:metadata/*", self.__namespaces) + for entry in metadata: + # The namespace is prepended to the tag name but between {}. + # We are only interested in the actual tag name. + tag_name = entry.tag[entry.tag.rfind("}") + 1:] + + if tag_name == "name": + brand = entry.find("./um:brand", self.__namespaces) + material = entry.find("./um:material", self.__namespaces) + color = entry.find("./um:color", self.__namespaces) + + self.setName("{0} {1} ({2})".format(brand.text, material.text, color.text)) + + self.addMetaDataEntry("brand", brand.text) + self.addMetaDataEntry("material", material.text) + self.addMetaDataEntry("color_name", color.text) + + self.addMetaDataEntry(tag_name, entry.text) + + property_values = {} + properties = data.iterfind("./um:properties/*", self.__namespaces) + for entry in properties: + tag_name = entry.tag[entry.tag.rfind("}") + 1:] + property_values[tag_name] = entry.text + + diameter = float(property_values.get("diameter", 2.85)) # In mm + density = float(property_values.get("density", 1.3)) # In g/cm3 + + weight_per_cm = (math.pi * (diameter / 20) ** 2 * 0.1) * density + + spool_weight = property_values.get("spool_weight") + spool_length = property_values.get("spool_length") + if spool_weight: + length = float(spool_weight) / weight_per_cm + property_values["spool_length"] = str(length / 100) + elif spool_length: + weight = (float(spool_length) * 100) * weight_per_cm + property_values["spool_weight"] = str(weight) + + self.addMetaDataEntry("properties", property_values) + + settings = data.iterfind("./um:settings/um:setting", self.__namespaces) + for entry in settings: + tag_name = _tag_without_namespace(entry) + + if tag_name in self.__material_property_setting_map: + self.setProperty(self.__material_property_setting_map[tag_name], "value", entry.text) + + __material_property_setting_map = { + "print temperature": "material_print_temperature", + "heated bed temperature": "material_bed_temperature", + "standby temperature": "material_standby_temperature", + } + + __namespaces = { + "um": "http://www.ultimaker.com/material" + } diff --git a/plugins/XmlMaterialProfile/__init__.py b/plugins/XmlMaterialProfile/__init__.py new file mode 100644 index 0000000000..041a3f6346 --- /dev/null +++ b/plugins/XmlMaterialProfile/__init__.py @@ -0,0 +1,32 @@ +# Copyright (c) 2016 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +from . import XmlMaterialProfile + +from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase +from UM.i18n import i18nCatalog +catalog = i18nCatalog("cura") + +def getMetaData(): + return { + "plugin": { + "name": catalog.i18nc("@label", "Material Profiles"), + "author": "Ultimaker", + "version": "1.0", + "description": catalog.i18nc("@info:whatsthis", "Provides capabilities to read and write XML-based material profiles."), + "api": 3 + }, + "settings_container": { + "mimetype": "application/x-ultimaker-material-profile" + } + } + +def register(app): + mime_type = MimeType( + name = "application/x-ultimaker-material-profile", + comment = "Ultimaker Material Profile", + suffixes = [ "xml.fdm_material" ] + ) + MimeTypeDatabase.addMimeType(mime_type) + return { "settings_container": XmlMaterialProfile.XmlMaterialProfile("default_xml_material_profile") } + diff --git a/resources/materials/generic_pla.xml.fdm_material b/resources/materials/generic_pla.xml.fdm_material new file mode 100644 index 0000000000..b64ecdc61b --- /dev/null +++ b/resources/materials/generic_pla.xml.fdm_material @@ -0,0 +1,48 @@ + + + + + + Generic + PLA + Generic + + 506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 + 0 + #FFFFFF + + + 1.3 + 2.85 + 750 + + + 210 + 60 + 175 + + + + + + 150 + + + + + + + + + 150 + + 80 + + + 100 + + + + From 4877c35f063687429fb9eb9a1e03d756bfab4c1e Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 23 May 2016 13:35:52 +0200 Subject: [PATCH 316/424] Fix layout of SettingTextField items CURA-1278 --- resources/qml/Settings/SettingTextField.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 3cbd21387b..9972f83aa1 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -85,7 +85,7 @@ SettingItem anchors { left: parent.left - leftMargin: UM.Theme.unitRightMargin + leftMargin: UM.Theme.getSize("setting_unit_margin").width right: parent.right verticalCenter: parent.verticalCenter } From 0969356cb696e0de512e981395aad7ba2aa583fe Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 23 May 2016 14:22:21 +0200 Subject: [PATCH 317/424] Fix bq_hephestos_2 json definition --- resources/machines/bq_hephestos_2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json index 7fe4a43406..d3af415b7a 100644 --- a/resources/machines/bq_hephestos_2.json +++ b/resources/machines/bq_hephestos_2.json @@ -54,6 +54,6 @@ "skirt_line_count": { "default": 4 }, "skirt_minimal_length": { "default": 30.0, "visible": false }, "skirt_gap": { "default": 6.0 }, - "cool_fan_full_at_height": { "default": 0.4, "visible": false }, + "cool_fan_full_at_height": { "default": 0.4, "visible": false } } } From c23980437d05f4021cfc09a3e95ea61f360be149 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 14:42:14 +0200 Subject: [PATCH 318/424] Fix naming of quality profiles --- resources/quality/high.inst.cfg | 2 +- resources/quality/normal.inst.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/quality/high.inst.cfg b/resources/quality/high.inst.cfg index 2e860cf380..89dcd4c9bc 100644 --- a/resources/quality/high.inst.cfg +++ b/resources/quality/high.inst.cfg @@ -1,6 +1,6 @@ [general] version = 2 -name = high +name = High Quality definition = fdmprinter [metadata] diff --git a/resources/quality/normal.inst.cfg b/resources/quality/normal.inst.cfg index 6bb23d841c..6d317cdf7a 100644 --- a/resources/quality/normal.inst.cfg +++ b/resources/quality/normal.inst.cfg @@ -1,6 +1,6 @@ [general] version = 2 -name = normal +name = Normal Quality definition = fdmprinter [metadata] From f68a9ae90fc4b22b2533929cb0366825a2d7837f Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 14:42:40 +0200 Subject: [PATCH 319/424] Fix materials page so it displays the proper data Also, make sure the code is reasonably clean --- resources/qml/Preferences/MaterialsPage.qml | 211 +++++++++++--------- 1 file changed, 122 insertions(+), 89 deletions(-) diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index f58b1876e3..f1f3432a41 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -35,7 +35,7 @@ UM.ManagementPage visible: base.currentItem != null anchors.fill: parent - Label { id: profileName; text: base.currentItem ? base.currentItem.name : ""; font: UM.Theme.getFont("large"); width: parent.width; } + Label { id: profileName; text: materialProperties.name; font: UM.Theme.getFont("large"); width: parent.width; } TabView { id: scrollView @@ -49,106 +49,83 @@ UM.ManagementPage title: "Information" anchors.margins: UM.Theme.getSize("default_margin").height - Column { - spacing: UM.Theme.getSize("default_margin").height + Flow { + id: containerGrid - Grid { - id: containerGrid - columns: 2 - spacing: UM.Theme.getSize("default_margin").width + width: scrollView.width; + property real columnWidth: width / 2 - Label { text: catalog.i18nc("@label", "Profile Type") } - Label { text: base.currentItem ? base.currentItem.metadata.status : "Unknown"} + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Profile Type") } + Label { width: parent.columnWidth; text: materialProperties.profile_type } - Label { text: catalog.i18nc("@label", "Supplier") } - Label { text: base.currentItem ? base.currentItem.metadata.brand : "Unknown"} + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Supplier") } + Label { width: parent.columnWidth; text: materialProperties.supplier } - Label { text: catalog.i18nc("@label", "Material Type") } - Label { text: base.currentItem ? base.currentItem.metadata.material : "Unknown" } + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Material Type") } + Label { width: parent.columnWidth; text: materialProperties.material_type } - Label { text: catalog.i18nc("@label", "Color") } - Rectangle { color: base.currentItem ? base.currentItem.metadata.color_code : "yellow" } + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Color") } - Label { text: "" + catalog.i18nc("@label", "Properties") + "" } - Label { text: " " } - - Label { text: catalog.i18nc("@label", "Density") } - Label { text: base.currentItem ? base.currentItem.metadata.properties.density + " " + "g/cm³" : "" } - - Label { text: catalog.i18nc("@label", "Diameter") } - Label { text: base.currentItem ? base.currentItem.metadata.properties.diameter + " " + "mm" : ""} - - Label { - text: catalog.i18nc("@label", "Filament cost") - height: spoolCostInput.height - verticalAlignment: Text.AlignVCenter + Row { + width: parent.columnWidth; + spacing: UM.Theme.getSize("default_margin").width/2 + Rectangle { + color: materialProperties.color_code + width: colorLabel.height + height: colorLabel.height + border.width: UM.Theme.getSize("default_lining").height } - - Row { - Label { - text: base.currentItem && base.currentItem.spoolCost ? base.currency + " " : "" - anchors.verticalCenter: parent.verticalCenter - } - TextField { - id: spoolCostInput - text: base.currentItem.spoolCost - } - } - - Label { text: catalog.i18nc("@label", "Filament weight") } - Label { text: base.currentItem ? base.currentItem.metadata.properies.spool_weight + " " + "kg" : "" } - - Label { text: catalog.i18nc("@label", "Filament length") } - Label { text: base.currentItem ? catalog.i18nc("@label", "approx.") + " " + base.currentItem.metadata.properties.spool_length + " " + "m" : "" } - - Label { text: catalog.i18nc("@label", "Cost per meter") } - Label { text: base.currentItem && base.currentItem.lenghtCost ? catalog.i18nc("@label", "approx.") + " " + base.currency + " " + base.currentItem.lenghtCost + "/m" : "" } - -// Column { -// -// -// -// -// } -// Column { -// -// -// -// Column { -// Label { text: base.currentItem && base.currentItem.variant ? base.currentItem.variant : "" } -// Row { -// spacing: UM.Theme.getSize("default_margin").width/2 -// Rectangle { -// color: base.currentItem && base.currentItem.colorDisplay ? base.currentItem.colorDisplay : "yellow" -// width: colorLabel.height -// height: colorLabel.height -// border.width: UM.Theme.getSize("default_lining").height -// } -// Label { id: colorLabel; text: base.currentItem && base.currentItem.colorRAL ? base.currentItem.colorRAL : "" } -// } -// } -// } -// Column { -// -// } -// Column { -// -// -// -// -// -// -// -// } + Label { id: colorLabel; text: materialProperties.color_name } } + + Item { width: parent.width; height: UM.Theme.getSize("default_margin").height } + + Label { width: parent.width; text: "" + catalog.i18nc("@label", "Properties") + "" } + + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Density") } + Label { width: parent.columnWidth; text: materialProperties.density } + + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Diameter") } + Label { width: parent.columnWidth; text: materialProperties.diameter } + Label { - text: base.currentItem && base.currentItem.infoGeneral ? "" + catalog.i18nc("@label", "Information") + "
" + base.currentItem.infoGeneral : "" - width: scrollView.width - 2 * UM.Theme.getSize("default_margin").width + text: catalog.i18nc("@label", "Filament cost") + width: parent.columnWidth; + height: spoolCostInput.height + verticalAlignment: Text.AlignVCenter + } + + Row { + width: parent.columnWidth; + Label { + text: base.currency ? base.currency + " " : " " + anchors.verticalCenter: parent.verticalCenter + } + TextField { + id: spoolCostInput + text: materialProperties.spool_cost + } + } + + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Filament weight") } + Label { width: parent.columnWidth; text: materialProperties.spool_weight + " " + "g" } + + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Filament length") } + Label { width: parent.columnWidth; text: materialProperties.spool_length + " " + "m" } + + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "Cost per meter") } + Label { width: parent.columnWidth; text: catalog.i18nc("@label", "approx. %1 %2/m").arg(materialProperties.cost_per_meter).arg(base.currency); } + + Item { width: parent.width; height: UM.Theme.getSize("default_margin").height } + + Label { + text: materialProperties.description ? "" + catalog.i18nc("@label", "Information") + "
" + materialProperties.description : ""; + width: parent.width wrapMode: Text.WordWrap } Label { - text: base.currentItem && base.currentItem.infoAdhesion ? "" + catalog.i18nc("@label", "Adhesion") + "
" + base.currentItem.infoAdhesion : "" - width: scrollView.width - 2 * UM.Theme.getSize("default_margin").width + text: materialProperties.adhesion_info ? "" + catalog.i18nc("@label", "Adhesion") + "
" + materialProperties.adhesion_info : ""; + width: parent.width wrapMode: Text.WordWrap } } @@ -179,5 +156,61 @@ UM.ManagementPage } } } + + QtObject + { + id: materialProperties + + property string name: "Unknown"; + property string profile_type: "Unknown"; + property string supplier: "Unknown"; + property string material_type: "Unknown"; + + property string color_name: "Yellow"; + property color color_code: "yellow"; + + property string density: "Unknown"; + property string diameter: "Unknown"; + + property string spool_cost: "Unknown"; + property string spool_weight: "Unknown"; + property string spool_length: "Unknown"; + property string cost_per_meter: "Unknown"; + + property string description: ""; + property string adhesion_info: ""; + } + } + + onCurrentItemChanged: + { + if(!currentItem == null) + { + return + } + + materialProperties.name = currentItem.name; + + if(currentItem.metadata != undefined && currentItem.metadata != null) + { + materialProperties.supplier = currentItem.metadata.brand ? currentItem.metadata.brand : "Unknown"; + materialProperties.material_type = currentItem.metadata.material ? currentItem.metadata.material : "Unknown"; + materialProperties.color_name = currentItem.metadata.color_name ? currentItem.metadata.color_name : "Yellow"; + materialProperties.color_code = currentItem.metadata.color_code ? currentItem.metadata.color_code : "yellow"; + + materialProperties.description = currentItem.metadata.description ? currentItem.metadata.description : ""; + materialProperties.adhesion_info = currentItem.metadata.adhesion_info ? currentItem.metadata.adhesion_info : ""; + + if(currentItem.metadata.properties != undefined && currentItem.metadata.properties != null) + { + materialProperties.density = currentItem.metadata.properties.density ? currentItem.metadata.properties.density : "Unknown"; + materialProperties.diameter = currentItem.metadata.properties.diameter ? currentItem.metadata.properties.diameter : "Unknown"; + } + else + { + materialProperties.density = "Unknown"; + materialProperties.diameter = "Unknown"; + } + } } } From bace52fccf80bc0153db3ba2f237b89d9eb01d92 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 13:02:46 +0200 Subject: [PATCH 320/424] Add documentation I need a bit of documentation for myself to understand this process. Contributes to issue CURA-1278. --- .../CuraEngineBackend/CuraEngineBackend.py | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index a57aa01ba9..0c569ce6f3 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -29,6 +29,10 @@ catalog = i18nCatalog("cura") class CuraEngineBackend(Backend): + ## Starts the back-end plug-in. + # + # This registers all the signal listeners and prepares for communication + # with the back-end in general. def __init__(self): super().__init__() @@ -50,19 +54,15 @@ class CuraEngineBackend(Backend): self._onActiveViewChanged() self._stored_layer_data = [] - # When there are current settings and machine instance is changed, there is no profile changed event. We should - # pretend there is though. - #Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveProfileChanged) - - #self._profile = None - #Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) - #self._onActiveProfileChanged() - + #When you update a setting and other settings get changed through inheritance, many propertyChanged signals are fired. + #This timer will group them up, and only slice for the last setting changed signal. + #TODO: Properly group propertyChanged signals by whether they are triggered by the same user interaction. self._change_timer = QTimer() self._change_timer.setInterval(500) self._change_timer.setSingleShot(True) self._change_timer.timeout.connect(self.slice) + #Listeners for receiving messages from the back-end. self._message_handlers["cura.proto.Layer"] = self._onLayerMessage self._message_handlers["cura.proto.Progress"] = self._onProgressMessage self._message_handlers["cura.proto.GCodeLayer"] = self._onGCodeLayerMessage @@ -70,29 +70,31 @@ class CuraEngineBackend(Backend): self._message_handlers["cura.proto.ObjectPrintTime"] = self._onObjectPrintTimeMessage self._message_handlers["cura.proto.SlicingFinished"] = self._onSlicingFinishedMessage - self._slicing = False - self._restart = False - self._enabled = True - self._always_restart = True + self._slicing = False #Are we currently slicing? + self._restart = False #Back-end is currently restarting? + self._enabled = True #Should we be slicing? Slicing might be paused when, for instance, the user is dragging the mesh around. + self._always_restart = True #Always restart the engine when starting a new slice. Don't keep the process running. TODO: Fix engine statelessness. self._process_layers_job = None #The currently active job to process layers, or None if it is not processing layers. - self._message = None + self._message = None #Pop-up message that shows the slicing progress bar (or an error message). self.backendQuit.connect(self._onBackendQuit) - self.backendConnected.connect(self._onBackendConnected) + + #When a tool operation is in progress, don't slice. So we need to listen for tool operations. Application.getInstance().getController().toolOperationStarted.connect(self._onToolOperationStarted) Application.getInstance().getController().toolOperationStopped.connect(self._onToolOperationStopped) - #Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onInstanceChanged) - + ## Called when closing the application. + # + # This function should terminate the engine process. def close(self): # Terminate CuraEngine if it is still running at this point self._terminate() super().close() ## Get the command that is used to call the engine. - # This is usefull for debugging and used to actually start the engine + # This is useful for debugging and used to actually start the engine. # \return list of commands and args / parameters. def getEngineCommand(self): active_machine = Application.getInstance().getMachineManager().getActiveMachineInstance() @@ -112,7 +114,7 @@ class CuraEngineBackend(Backend): ## Emitted when the slicing process starts. slicingStarted = Signal() - ## Emitted whne the slicing process is aborted forcefully. + ## Emitted when the slicing process is aborted forcefully. slicingCancelled = Signal() ## Perform a slice of the scene. From e5df225b1e0e697640208b5d36d5099e8ffad33f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 13:04:36 +0200 Subject: [PATCH 321/424] Connect SettingChanged to new propertyChanged function The listener doesn't properly listen to the signal's parameters yet though. Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 0c569ce6f3..7aaba3edce 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -54,6 +54,10 @@ class CuraEngineBackend(Backend): self._onActiveViewChanged() self._stored_layer_data = [] + #When any setting property changed, call the _onSettingChanged function. + #This function will then see if we need to start slicing. + Application.getInstance().getGlobalContainerStack().propertyChanged.connect(self._onSettingChanged) + #When you update a setting and other settings get changed through inheritance, many propertyChanged signals are fired. #This timer will group them up, and only slice for the last setting changed signal. #TODO: Properly group propertyChanged signals by whether they are triggered by the same user interaction. From ab2a6136d700167b5df7803fc8d46e0676a05728 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 13:20:42 +0200 Subject: [PATCH 322/424] Filter setting changed listener properly The parameters of the listener were out of date and it should only trigger a reslice if we're changing the value of a setting, not any other property. Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 7aaba3edce..b101fae5fd 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -123,8 +123,7 @@ class CuraEngineBackend(Backend): ## Perform a slice of the scene. def slice(self): - - if not self._enabled: + if not self._enabled: #We shouldn't be slicing. return if self._slicing: @@ -225,8 +224,13 @@ class CuraEngineBackend(Backend): self._profile.settingValueChanged.connect(self._onSettingChanged) self._onChanged() - def _onSettingChanged(self, setting): - self._onChanged() + ## A setting has changed, so check if we must reslice. + # + # \param instance The setting instance that has changed. + # \param property The property of the setting instance that has changed. + def _onSettingChanged(self, instance, property): + if property == "value": #Only reslice if the value has changed. + self._onChanged() def _onLayerMessage(self, message): self._stored_layer_data.append(message) From 83c1ea2ccc600129c060473af98480c9e3147032 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 13:24:54 +0200 Subject: [PATCH 323/424] Move message hide into terminate function Always if we terminate we want to hide the old message. This fixes the message not hiding when using the tools. Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index b101fae5fd..da4ba1a139 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -129,12 +129,6 @@ class CuraEngineBackend(Backend): if self._slicing: self._terminate() - if self._message: - self._message.hide() - self._message = None - - return - if self._process_layers_job: self._process_layers_job.abort() self._process_layers_job = None @@ -181,6 +175,9 @@ class CuraEngineBackend(Backend): #self._createSocket() # Re create the socket except Exception as e: # terminating a process that is already terminating causes an exception, silently ignore this. Logger.log("d", "Exception occured while trying to kill the engine %s", str(e)) + if self._message: + self._message.hide() + self._message = None def _onStartSliceCompleted(self, job): From ae6f4912e613ddea4e22729ab604c6b115b9439f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 13:28:04 +0200 Subject: [PATCH 324/424] Remove unnecessary variable initialisation This isn't C++ or anything. Variable scope isn't limited by if statements. Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index da4ba1a139..6dc166129e 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -102,7 +102,6 @@ class CuraEngineBackend(Backend): # \return list of commands and args / parameters. def getEngineCommand(self): active_machine = Application.getInstance().getMachineManager().getActiveMachineInstance() - json_path = "" if not active_machine: json_path = Resources.getPath(Resources.MachineDefinitions, "fdmprinter.json") else: From a0645a44c8a51eecf587170b57adda754ebab04e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 13:36:32 +0200 Subject: [PATCH 325/424] Re-enable slicing message Nothing appears right now, but this enables progress to show later on in the progress (if it would get there). Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 6dc166129e..b3755602d1 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -125,10 +125,10 @@ class CuraEngineBackend(Backend): if not self._enabled: #We shouldn't be slicing. return - if self._slicing: + if self._slicing: #We were already slicing. Stop the old job. self._terminate() - if self._process_layers_job: + if self._process_layers_job: #We were processing layers. Stop that, the layers are going to change soon. self._process_layers_job.abort() self._process_layers_job = None @@ -146,9 +146,9 @@ class CuraEngineBackend(Backend): self.backendStateChange.emit(BackendState.NOT_STARTED) if self._message: self._message.setProgress(-1) - #else: - # self._message = Message(catalog.i18nc("@info:status", "Slicing..."), 0, False, -1) - # self._message.show() + else: + self._message = Message(catalog.i18nc("@info:status", "Slicing..."), 0, False, -1) + self._message.show() self._scene.gcode_list = [] self._slicing = True From 63bf5bec3d5fc109a4d59abbec17f3a27b58cf35 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 13:56:42 +0200 Subject: [PATCH 326/424] Remove _profile from start slice job parameters Instead, the start slice job searches for the container stack itself. Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 2 +- plugins/CuraEngineBackend/StartSliceJob.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index b3755602d1..a4c7e1c1ed 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -154,7 +154,7 @@ class CuraEngineBackend(Backend): self._slicing = True self.slicingStarted.emit() - job = StartSliceJob.StartSliceJob(self._profile, self._socket) + job = StartSliceJob.StartSliceJob(self._socket) job.start() job.finished.connect(self._onStartSliceCompleted) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 9fecb20646..480076b9cc 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -31,11 +31,11 @@ class GcodeStartEndFormatter(Formatter): ## Job that handles sending the current scene data to CuraEngine class StartSliceJob(Job): - def __init__(self, profile, socket): + def __init__(self, socket): super().__init__() self._scene = Application.getInstance().getController().getScene() - self._profile = profile + self._settings = Application.getInstance().getGlobalContainerStack() self._socket = socket ## Runs the job that initiates the slicing. From eb951ed07c4830f90eb1f771e36c8f04eb4d0392 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 13:58:36 +0200 Subject: [PATCH 327/424] Fix potential concurrency of finishing before connected to finishing This was a concurrency issue: If the slicing was very fast, it could finish slicing before the listener was connected to the message of being finished. Therefore, we should connect to being finished before we even start the start-slice job. Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index a4c7e1c1ed..a854f29bf1 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -155,8 +155,8 @@ class CuraEngineBackend(Backend): self.slicingStarted.emit() job = StartSliceJob.StartSliceJob(self._socket) - job.start() job.finished.connect(self._onStartSliceCompleted) + job.start() def _terminate(self): self._slicing = False From b03aa246a08fd029f8ab7016a018f0b23d5f922d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 14:47:02 +0200 Subject: [PATCH 328/424] Call new function to send global settings I'm going to rename this function to be able to send per-extruder and per-object settings with different functions later on. This updates the call to the function to use the new one. Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/StartSliceJob.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 480076b9cc..e98658b717 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -35,7 +35,6 @@ class StartSliceJob(Job): super().__init__() self._scene = Application.getInstance().getController().getScene() - self._settings = Application.getInstance().getGlobalContainerStack() self._socket = socket ## Runs the job that initiates the slicing. @@ -85,7 +84,7 @@ class StartSliceJob(Job): if not object_groups: return - self._sendSettings(self._profile) + self._sendGlobalSettings() slice_message = self._socket.createMessage("cura.proto.Slice") @@ -123,6 +122,13 @@ class StartSliceJob(Job): Logger.log("w", "Unabled to do token replacement on start/end gcode %s", traceback.format_exc()) return str(value).encode("utf-8") + ## Sends all global settings to the engine. + # + # The settings are taken from the global stack. This does not include any + # per-extruder settings or per-object settings. + def _sendGlobalSettings(self): + pass #TODO: Implement this. + def _sendSettings(self, profile): msg = self._socket.createMessage("cura.proto.SettingList") settings = profile.getAllSettingValues(include_machine = True) From 8a21ac77edc1c59e8a7b2bbc1a903fd93e27614c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 15:53:40 +0200 Subject: [PATCH 329/424] Re-implement sending global settings It turns out to be mostly the same. Contributes to issue CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/StartSliceJob.py | 42 ++++++++++++++-------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index e98658b717..3d58c74b93 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -5,8 +5,9 @@ import numpy from string import Formatter import traceback -from UM.Job import Job from UM.Application import Application +from UM.Settings.DefinitionContainer import DefinitionContainer +from UM.Job import Job from UM.Logger import Logger from UM.Scene.SceneNode import SceneNode @@ -127,23 +128,20 @@ class StartSliceJob(Job): # The settings are taken from the global stack. This does not include any # per-extruder settings or per-object settings. def _sendGlobalSettings(self): - pass #TODO: Implement this. - - def _sendSettings(self, profile): - msg = self._socket.createMessage("cura.proto.SettingList") - settings = profile.getAllSettingValues(include_machine = True) + message = self._socket.createMessage("cura.proto.SettingList") + settings = self._getAllSettingValues() #Get all the settings to send. start_gcode = settings["machine_start_gcode"] - settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode + settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode #Pre-compute material_bed_temp_prepend and material_print_temp_prepend. settings["material_print_temp_prepend"] = "{material_print_temperature}" not in start_gcode - for key, value in settings.items(): - s = msg.addRepeatedMessage("settings") - s.name = key - if key == "machine_start_gcode" or key == "machine_end_gcode": - s.value = self._expandGcodeTokens(key, value, settings) + for key, value in settings.items(): #Add all submessages for each individual setting. + setting_message = message.addRepeatedMessage("settings") + setting_message.name = key + if key == "machine_start_gcode" or key == "machine_end_gcode": #If it's a g-code message, use special formatting. + setting_message.value = self._expandGcodeTokens(key, value, settings) else: - s.value = str(value).encode("utf-8") + setting_message.value = str(value).encode("utf-8") - self._socket.sendMessage(msg) + self._socket.sendMessage(message) def _handlePerObjectSettings(self, node, message): profile = node.callDecoration("getProfile") @@ -164,3 +162,19 @@ class StartSliceJob(Job): setting.value = str(value).encode() Job.yieldThread() + + ## Gets all setting values as a dictionary. + # + # \return A dictionary with the setting keys as keys and the setting + # values as values. + def _getAllSettingValues(self): + stack = Application.getInstance().getGlobalContainerStack() + setting_values = {} + + definition_containers = [container for container in stack.getContainers() if container.__class__ == DefinitionContainer] #To get all keys, get all definitions from all definition containers. + for definition_container in definition_containers: + for definition in definition_container.definitions: + if definition.key not in setting_values: #Prevent looking up the same key twice, for speed. + setting_values[definition.key] = stack.getProperty(definition.key, "value") + + return setting_values \ No newline at end of file From 8f1860413babff4770df12b439506f486f50169c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:00:39 +0200 Subject: [PATCH 330/424] Always send FDMPrinter definition via socket We don't save the file name any more. The engine doesn't need any machine-specific definitions at the moment, so we can always just send FDMPrinter.. This may later change, but later we will also send a serialised JSON rather than a file name so then we won't need the file name any more. Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index a854f29bf1..38a78beda0 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -101,12 +101,7 @@ class CuraEngineBackend(Backend): # This is useful for debugging and used to actually start the engine. # \return list of commands and args / parameters. def getEngineCommand(self): - active_machine = Application.getInstance().getMachineManager().getActiveMachineInstance() - if not active_machine: - json_path = Resources.getPath(Resources.MachineDefinitions, "fdmprinter.json") - else: - json_path = active_machine.getMachineDefinition().getPath() - + json_path = Resources.getPath(Resources.DefinitionContainers, "fdmprinter.def.json") return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", json_path, "-vv"] ## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished. From c996bcb191e1a76b0999bb73b960fd0e66d30c75 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:01:57 +0200 Subject: [PATCH 331/424] Remove extruder drive upgrade option It was originally included with the thought that there would be different firmware for this, but there isn't. So this setting is not needed. Contributes to issue CURA-1278. --- resources/definitions/ultimaker_original.def.json | 8 -------- resources/qml/WizardPages/SelectUpgradedParts.qml | 9 --------- 2 files changed, 17 deletions(-) diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index 76b6c8b4ff..f445057860 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -18,14 +18,6 @@ ] }, - "settings": { - "machine_extruder_drive_upgrade": { - "label": "Extruder Drive Upgrade", - "description": "This machine has the extruder drive upgrade.", - "type": "bool", - "default_value": false - } - }, "overrides": { "machine_width": { "default_value": 205 diff --git a/resources/qml/WizardPages/SelectUpgradedParts.qml b/resources/qml/WizardPages/SelectUpgradedParts.qml index 4a327a6ed4..a49401ada9 100644 --- a/resources/qml/WizardPages/SelectUpgradedParts.qml +++ b/resources/qml/WizardPages/SelectUpgradedParts.qml @@ -17,9 +17,6 @@ Item Component.onDestruction: { - if (extruderCheckBox.checked == true){ - UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true) - } if (heatedBedCheckBox1.checked == true || heatedBedCheckBox2.checked == true){ UM.MachineManager.setMachineSettingValue("machine_heated_bed", true) } @@ -52,12 +49,6 @@ Item anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width - UM.Theme.getSize("default_margin").width CheckBox - { - id: extruderCheckBox - text: catalog.i18nc("@option:check","Extruder driver ugrades") - checked: true - } - CheckBox { id: heatedBedCheckBox1 text: catalog.i18nc("@option:check","Heated printer bed") From 9dab21c4d0dd4e1097eae165f4a396e60f86e329 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:06:38 +0200 Subject: [PATCH 332/424] Fix getting print_sequence setting The setting is used to group items for one-at-a-time printing before they're sent to the engine. This properly gets the setting value under the new setting system. Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/StartSliceJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 3d58c74b93..965ccc8b8a 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -50,7 +50,7 @@ class StartSliceJob(Job): # Get the objects in their groups to print. object_groups = [] - if self._profile.getSettingValue("print_sequence") == "one_at_a_time": + if Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") == "one_at_a_time": for node in OneAtATimeIterator(self._scene.getRoot()): temp_list = [] From 70b52f4b62755d48add1c7ae9269cb1613a5e3fd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:34:14 +0200 Subject: [PATCH 333/424] Also get setting values of child definitions Otherwise we just get the setting categories, which is not very useful. Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/StartSliceJob.py | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 965ccc8b8a..5379e00156 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -37,6 +37,7 @@ class StartSliceJob(Job): self._scene = Application.getInstance().getController().getScene() self._socket = socket + self._stack = Application.getInstance().getGlobalContainerStack() ## Runs the job that initiates the slicing. def run(self): @@ -130,6 +131,7 @@ class StartSliceJob(Job): def _sendGlobalSettings(self): message = self._socket.createMessage("cura.proto.SettingList") settings = self._getAllSettingValues() #Get all the settings to send. + print(settings) start_gcode = settings["machine_start_gcode"] settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode #Pre-compute material_bed_temp_prepend and material_print_temp_prepend. settings["material_print_temp_prepend"] = "{material_print_temperature}" not in start_gcode @@ -163,18 +165,33 @@ class StartSliceJob(Job): Job.yieldThread() + ## Gets the current values for all child definitions of a definition. + # + # To be clear, it looks up all child definitions, and returns the CURRENT + # VALUE of the keys of these definitions according to the global stack. It + # doesn't return the "value" property in the definition. + # + # \param definition The setting definition to get the child settings of. + def _getAllChildSettingValues(self, definition): + setting_values = { } + for child in definition.children: + setting_values[child.key] = self._stack.getProperty(child.key, "value") + for key, value in self._getAllChildSettingValues(child).items(): + setting_values[key] = value + return setting_values + ## Gets all setting values as a dictionary. # # \return A dictionary with the setting keys as keys and the setting # values as values. def _getAllSettingValues(self): - stack = Application.getInstance().getGlobalContainerStack() setting_values = {} - definition_containers = [container for container in stack.getContainers() if container.__class__ == DefinitionContainer] #To get all keys, get all definitions from all definition containers. + definition_containers = [container for container in self._stack.getContainers() if container.__class__ == DefinitionContainer] #To get all keys, get all definitions from all definition containers. for definition_container in definition_containers: for definition in definition_container.definitions: - if definition.key not in setting_values: #Prevent looking up the same key twice, for speed. - setting_values[definition.key] = stack.getProperty(definition.key, "value") + setting_values[definition.key] = self._stack.getProperty(definition.key, "value") + for key, value in self._getAllChildSettingValues(definition).items(): + setting_values[key] = value return setting_values \ No newline at end of file From 15333fa9407e2905b0a680a1e596672b18ede0a7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:37:11 +0200 Subject: [PATCH 334/424] Codestyle: Spaces after commas Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/StartSliceJob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 5379e00156..0b01b11992 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -101,8 +101,8 @@ class StartSliceJob(Job): obj.id = id(current_object) verts = numpy.array(mesh_data.getVertices()) - verts[:,[1,2]] = verts[:,[2,1]] - verts[:,1] *= -1 + verts[:, [1, 2]] = verts[:, [2, 1]] + verts[:, 1] *= -1 obj.vertices = verts From 6fcba4cdde7d75ba73cd66f6b672447c44e5a5d7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:38:08 +0200 Subject: [PATCH 335/424] Fix typo in error message Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 38a78beda0..dee6f43bd6 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -168,7 +168,7 @@ class CuraEngineBackend(Backend): self._process = None #self._createSocket() # Re create the socket except Exception as e: # terminating a process that is already terminating causes an exception, silently ignore this. - Logger.log("d", "Exception occured while trying to kill the engine %s", str(e)) + Logger.log("d", "Exception occurred while trying to kill the engine %s", str(e)) if self._message: self._message.hide() self._message = None From e94220f46d93a0be1cb384ce77e1e41815e7ac04 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:39:37 +0200 Subject: [PATCH 336/424] Remove commented code Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index dee6f43bd6..1f7d34556e 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -166,7 +166,6 @@ class CuraEngineBackend(Backend): self._process.terminate() Logger.log("d", "Engine process is killed. Received return code %s", self._process.wait()) self._process = None - #self._createSocket() # Re create the socket except Exception as e: # terminating a process that is already terminating causes an exception, silently ignore this. Logger.log("d", "Exception occurred while trying to kill the engine %s", str(e)) if self._message: From c8de272ec445023c467767336be043284514e99f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:45:43 +0200 Subject: [PATCH 337/424] Document old functions I was reading through these to check if they'd still work. They should still work, but since I went through them I went ahead and documented them too. Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 1f7d34556e..d7c4d6bd8b 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -153,6 +153,7 @@ class CuraEngineBackend(Backend): job.finished.connect(self._onStartSliceCompleted) job.start() + ## Terminate the engine process. def _terminate(self): self._slicing = False self._restart = True @@ -172,7 +173,14 @@ class CuraEngineBackend(Backend): self._message.hide() self._message = None - + ## Event handler to call when the job to initiate the slicing process is + # completed. + # + # When the start slice job is successfully completed, it will be happily + # slicing. This function handles any errors that may occur during the + # bootstrapping of a slice job. + # + # \param job The start slice job that was just finished. def _onStartSliceCompleted(self, job): if job.getError() or job.getResult() != True: if self._message: @@ -180,6 +188,11 @@ class CuraEngineBackend(Backend): self._message = None return + ## Listener for when the scene has changed. + # + # This should start a slice if the scene is now ready to slice. + # + # \param source The scene node that was changed. def _onSceneChanged(self, source): if type(source) is not SceneNode: return @@ -195,6 +208,9 @@ class CuraEngineBackend(Backend): self._onChanged() + ## Called when an error occurs in the socket connection towards the engine. + # + # \param error The exception that occurred. def _onSocketError(self, error): if Application.getInstance().isShuttingDown(): return From 9217dd3e1bfbb519c88d43d6123a2386d1478da9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 16:47:22 +0200 Subject: [PATCH 338/424] Remove unused function No longer used due to fix for setting rework. Contributes to issues CURA-1278 and CURA-1288. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index d7c4d6bd8b..8414cd2cb6 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -221,15 +221,6 @@ class CuraEngineBackend(Backend): if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]: Logger.log("e", "A socket error caused the connection to be reset") - def _onActiveProfileChanged(self): - if self._profile: - self._profile.settingValueChanged.disconnect(self._onSettingChanged) - - self._profile = Application.getInstance().getMachineManager().getWorkingProfile() - if self._profile: - self._profile.settingValueChanged.connect(self._onSettingChanged) - self._onChanged() - ## A setting has changed, so check if we must reslice. # # \param instance The setting instance that has changed. From 90ce0f44c3045c4cf414e9c43a5172d96496e3d7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 17:00:10 +0200 Subject: [PATCH 339/424] Document remaining functions of CuraEngineBackend They have all been checked for correctness now. While I was doing that, I documented their working as far as I could understand. Contributes to issues CURA-1278 and CURA-1588. --- .../CuraEngineBackend/CuraEngineBackend.py | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 8414cd2cb6..0410fc77fa 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -229,10 +229,15 @@ class CuraEngineBackend(Backend): if property == "value": #Only reslice if the value has changed. self._onChanged() + ## Called when a sliced layer data message is received from the engine. + # + # \param message The protobuf message containing sliced layer data. def _onLayerMessage(self, message): self._stored_layer_data.append(message) - + ## Called when a progress message is received from the engine. + # + # \param message The protobuf message containing the slicing progress. def _onProgressMessage(self, message): if self._message: self._message.setProgress(round(message.amount * 100)) @@ -240,6 +245,9 @@ class CuraEngineBackend(Backend): self.processingProgress.emit(message.amount) self.backendStateChange.emit(BackendState.PROCESSING) + ## Called when the engine sends a message that slicing is finished. + # + # \param message The protobuf message signalling that slicing is finished. def _onSlicingFinishedMessage(self, message): self.backendStateChange.emit(BackendState.DONE) self.processingProgress.emit(1.0) @@ -256,15 +264,27 @@ class CuraEngineBackend(Backend): self._process_layers_job.start() self._stored_layer_data = [] + ## Called when a g-code message is received from the engine. + # + # \param message The protobuf message containing g-code, encoded as UTF-8. def _onGCodeLayerMessage(self, message): self._scene.gcode_list.append(message.data.decode("utf-8", "replace")) + ## Called when a g-code prefix message is received from the engine. + # + # \param message The protobuf message containing the g-code prefix, + # encoded as UTF-8. def _onGCodePrefixMessage(self, message): self._scene.gcode_list.insert(0, message.data.decode("utf-8", "replace")) + ## Called when a print time message is received from the engine. + # + # \param message The protobuf message containing the print time and + # material amount. def _onObjectPrintTimeMessage(self, message): self.printDurationMessage.emit(message.time, message.material_amount) + ## Creates a new socket connection. def _createSocket(self): super()._createSocket(os.path.abspath(os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "Cura.proto"))) @@ -272,25 +292,41 @@ class CuraEngineBackend(Backend): def forceSlice(self): self._change_timer.start() + ## Called when anything has changed to the stuff that needs to be sliced. + # + # This indicates that we should probably re-slice soon. def _onChanged(self): self._change_timer.start() + ## Called when the back-end connects to the front-end. def _onBackendConnected(self): if self._restart: self._onChanged() self._restart = False + ## Called when the user starts using some tool. + # + # When the user starts using a tool, we should pause slicing to prevent + # continuously slicing while the user is dragging some tool handle. + # + # \param tool The tool that the user is using. def _onToolOperationStarted(self, tool): self._terminate() # Do not continue slicing once a tool has started self._enabled = False # Do not reslice when a tool is doing it's 'thing' + ## Called when the user stops using some tool. + # + # This indicates that we can safely start slicing again. + # + # \param tool The tool that the user was using. def _onToolOperationStopped(self, tool): self._enabled = True # Tool stop, start listening for changes again. + ## Called when the user changes the active view mode. def _onActiveViewChanged(self): if Application.getInstance().getController().getActiveView(): view = Application.getInstance().getController().getActiveView() - if view.getPluginId() == "LayerView": + if view.getPluginId() == "LayerView": #If switching to layer view, we should process the layers if that hasn't been done yet. self._layer_view_active = True # There is data and we're not slicing at the moment # if we are slicing, there is no need to re-calculate the data as it will be invalid in a moment. @@ -304,6 +340,9 @@ class CuraEngineBackend(Backend): def _onInstanceChanged(self): self._terminate() + ## Called when the back-end self-terminates. + # + # We should reset our state and start listening for new connections. def _onBackendQuit(self): if not self._restart and self._process: Logger.log("d", "Backend quit with return code %s. Resetting process and socket.", self._process.wait()) From c6d3677d6f2f46ab159f750e655d24acf8cf46ff Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 17:00:58 +0200 Subject: [PATCH 340/424] Remove unused function There are no machine instances any more. We can just listen for setting value changes. Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 0410fc77fa..df4d5f6dd2 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -337,9 +337,6 @@ class CuraEngineBackend(Backend): else: self._layer_view_active = False - def _onInstanceChanged(self): - self._terminate() - ## Called when the back-end self-terminates. # # We should reset our state and start listening for new connections. From d235b36692db5b7d48998b294da2ce812fedd09c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 17:03:25 +0200 Subject: [PATCH 341/424] Fix computation of material length from volume The setting value was obtained wrongly. Contributes to issue CURA-1278. --- cura/PrintInformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 994dac69d0..2663cab5a0 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -63,6 +63,6 @@ class PrintInformation(QObject): self.currentPrintTimeChanged.emit() # Material amount is sent as an amount of mm^3, so calculate length from that - r = Application.getInstance().getGlobalContainerStack().getValue("material_diameter") / 2 + r = Application.getInstance().getGlobalContainerStack().getProperty("material_diameter", "value") / 2 self._material_amount = round((amount / (math.pi * r ** 2)) / 1000, 2) self.materialAmountChanged.emit() From 6116f592b3de0aced9e12ead0804e35550c9b0a8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 17:04:56 +0200 Subject: [PATCH 342/424] Remove print This was printing all settings that were being sent to the engine. Could've been useful, actually. Maybe I'll re-add it in the form of a log. Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/StartSliceJob.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 0b01b11992..70c56dfcc5 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -131,7 +131,6 @@ class StartSliceJob(Job): def _sendGlobalSettings(self): message = self._socket.createMessage("cura.proto.SettingList") settings = self._getAllSettingValues() #Get all the settings to send. - print(settings) start_gcode = settings["machine_start_gcode"] settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode #Pre-compute material_bed_temp_prepend and material_print_temp_prepend. settings["material_print_temp_prepend"] = "{material_print_temperature}" not in start_gcode From eb8b3e01e3b2ba39bbbad377dcd5aa6d0f354d40 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 18:10:35 +0200 Subject: [PATCH 343/424] Properly catch exceptions when serializing containers and check for dirty state --- cura/CuraApplication.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index bfe342d1e4..dc3d777c2f 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -193,7 +193,17 @@ class CuraApplication(QtApplication): ## Cura has multiple locations where instance containers need to be saved, so we need to handle this differently. def _onExit(self): for instance in ContainerRegistry.getInstance().findInstanceContainers(): - data = instance.serialize() + if not instance.isDirty(): + continue + + try: + data = instance.serialize() + except NotImplementedError: + continue + except Exception: + Logger.logException("e", "An exception occurred when serializing container %s", instance.getId()) + continue + file_name = urllib.parse.quote_plus(instance.getId()) + ".inst.cfg" instance_type = instance.getMetaDataEntry("type") path = None @@ -211,7 +221,17 @@ class CuraApplication(QtApplication): f.write(data) for stack in ContainerRegistry.getInstance().findContainerStacks(): - data = stack.serialize() + if not stack.isDirty(): + continue + + try: + data = stack.serialize() + except NotImplementedError: + continue + except Exception: + Logger.logException("e", "An exception occurred when serializing container %s", instance.getId()) + continue + file_name = urllib.parse.quote_plus(stack.getId()) + ".stack.cfg" path = Resources.getStoragePath(self.ResourceTypes.MachineStack, file_name) with SaveFile(path, "wt", -1, "utf-8") as f: From ea5dc00080f4fcee2fc21c20c04bacc9c188638b Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 18:11:03 +0200 Subject: [PATCH 344/424] Bump LayerView API version to 3 It does not use any setting API so it is safe --- plugins/LayerView/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/LayerView/__init__.py b/plugins/LayerView/__init__.py index 3d43532126..67750fb562 100644 --- a/plugins/LayerView/__init__.py +++ b/plugins/LayerView/__init__.py @@ -14,7 +14,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": catalog.i18nc("@info:whatsthis", "Provides the Layer view."), - "api": 2 + "api": 3 }, "view": { "name": catalog.i18nc("@item:inlistbox", "Layers"), From 8284ab9de539828825c31f182f9a95ba4e2f8f69 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 18:11:24 +0200 Subject: [PATCH 345/424] Insert printers and materials pages at the right location --- resources/qml/Cura.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index b03c5ed06a..b8ea7b1a72 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -549,9 +549,9 @@ UM.MainWindow //: View preferences page title insertPage(1, catalog.i18nc("@title:tab","View"), Qt.resolvedUrl("ViewPage.qml")); - insertPage(2, catalog.i18nc("@title:tab", "Printers"), Qt.resolvedUrl("MachinesPage.qml")); + insertPage(3, catalog.i18nc("@title:tab", "Printers"), Qt.resolvedUrl("MachinesPage.qml")); - insertPage(3, catalog.i18nc("@title:tab", "Materials"), Qt.resolvedUrl("Preferences/MaterialsPage.qml")) + insertPage(4, catalog.i18nc("@title:tab", "Materials"), Qt.resolvedUrl("Preferences/MaterialsPage.qml")); //Force refresh setPage(0); From f90be96bc66b5339d1e6e709450d13a670f93b8a Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 18:12:25 +0200 Subject: [PATCH 346/424] Add back the Profiles page --- resources/qml/Cura.qml | 2 + resources/qml/Preferences/ProfilesPage.qml | 222 +++++++++++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 resources/qml/Preferences/ProfilesPage.qml diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index b8ea7b1a72..733def1b81 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -553,6 +553,8 @@ UM.MainWindow insertPage(4, catalog.i18nc("@title:tab", "Materials"), Qt.resolvedUrl("Preferences/MaterialsPage.qml")); + insertPage(5, catalog.i18nc("@title:tab", "Profiles"), Qt.resolvedUrl("Preferences/ProfilesPage.qml")); + //Force refresh setPage(0); } diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml new file mode 100644 index 0000000000..6e5d39cb49 --- /dev/null +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -0,0 +1,222 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 1.1 +import QtQuick.Dialogs 1.2 + +import UM 1.2 as UM + +UM.ManagementPage +{ + id: base; + + title: catalog.i18nc("@title:tab", "Profiles"); + addText: catalog.i18nc("@label", "Duplicate") + + model: UM.InstanceContainersModel { filter: { "type": "quality" } } + + onAddObject: { + var selectedProfile; + if (objectList.currentIndex == 0) { + // Current settings + selectedProfile = UM.MachineManager.createProfile(); + } else { + selectedProfile = UM.MachineManager.duplicateProfile(currentItem.name); + } + base.selectProfile(selectedProfile); + + renameDialog.removeWhenRejected = true; + renameDialog.open(); + renameDialog.selectText(); + } + onRemoveObject: confirmDialog.open(); + onRenameObject: { renameDialog.removeWhenRejected = false; renameDialog.open(); renameDialog.selectText(); } + + addEnabled: currentItem != null; + removeEnabled: currentItem != null ? !currentItem.readOnly : false; + renameEnabled: currentItem != null ? !currentItem.readOnly : false; + + scrollviewCaption: catalog.i18nc("@label %1 is printer name","Printer: %1").arg(UM.MachineManager.activeMachineInstance) + + signal selectProfile(string name) + onSelectProfile: { + objectList.currentIndex = objectList.model.find("name", name); + } + + Item { + visible: base.currentItem != null + anchors.fill: parent + + Label { + id: profileName + text: base.currentItem ? base.currentItem.name : "" + font: UM.Theme.getFont("large") + width: parent.width + elide: Text.ElideRight + } + + ScrollView { + anchors.left: parent.left + anchors.top: profileName.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.right: parent.right + anchors.bottom: parent.bottom + + Column + { + spacing: UM.Theme.getSize("default_margin").height + + Row + { + visible: base.currentItem.id == -1 || base.currentItem.active + Button + { + text: { + var profileName = UM.MachineManager.activeProfile; + profileName = (profileName.length > 20) ? profileName.substring(0, 20) + '...' : profileName; + return catalog.i18nc("@action:button", "Update \"%1\"".arg(profileName)); + } + enabled: UM.ActiveProfile.hasCustomisedValues && !UM.ActiveProfile.readOnly + onClicked: UM.ActiveProfile.updateProfile() + } + + Button + { + text: catalog.i18nc("@action:button", "Discard changes"); + enabled: UM.ActiveProfile.hasCustomisedValues + onClicked: UM.ActiveProfile.discardChanges() + } + } + + Grid + { + id: containerGrid + columns: 2 + spacing: UM.Theme.getSize("default_margin").width + + Label { + text: base.currentItem == null ? "" : + base.currentItem.id == -1 ? catalog.i18nc("@label", "Based on") : catalog.i18nc("@label", "Profile type") + } + Label { + text: base.currentItem == null ? "" : + base.currentItem.id == -1 ? UM.MachineManager.activeProfile : + base.currentItem.readOnly ? catalog.i18nc("@label", "Protected profile") : catalog.i18nc("@label", "Custom profile") + } + + Column { + Repeater { + model: base.currentItem ? base.currentItem.settings : null + Label { + text: modelData.name.toString(); + elide: Text.ElideMiddle; + } + } + } + Column { + Repeater { + model: base.currentItem ? base.currentItem.settings : null + Label { text: modelData.value.toString(); } + } + } + } + } + } + } + + buttons: Row { + + Button + { + text: catalog.i18nc("@action:button", "Import"); + iconName: "document-import"; + onClicked: importDialog.open(); + } + + Button + { + text: catalog.i18nc("@action:button", "Export"); + iconName: "document-export"; + onClicked: exportDialog.open(); + } + } + + Item + { + UM.I18nCatalog { id: catalog; name: "uranium"; } + + UM.ConfirmRemoveDialog + { + id: confirmDialog; + object: base.currentItem != null ? base.currentItem.name : ""; + onYes: base.model.removeProfile(base.currentItem.name); + } + UM.RenameDialog + { + id: renameDialog; + object: base.currentItem != null ? base.currentItem.name : ""; + property bool removeWhenRejected: false; + onAccepted: base.model.renameProfile(base.currentItem.name, newName.trim()); + onRejected: { + if(removeWhenRejected) { + base.model.removeProfile(base.currentItem.name) + } + } + } + MessageDialog + { + id: messageDialog + title: catalog.i18nc("@window:title", "Import Profile"); + standardButtons: StandardButton.Ok + modality: Qt.ApplicationModal + } + + FileDialog + { + id: importDialog; + title: catalog.i18nc("@title:window", "Import Profile"); + selectExisting: true; + nameFilters: base.model.getFileNameFiltersRead() + folder: base.model.getDefaultPath() + onAccepted: + { + var result = base.model.importProfile(fileUrl) + messageDialog.text = result.message + if(result.status == "ok") + { + messageDialog.icon = StandardIcon.Information + } + else if(result.status == "duplicate") + { + messageDialog.icon = StandardIcon.Warning + } + else + { + messageDialog.icon = StandardIcon.Critical + } + messageDialog.open() + } + } + + FileDialog + { + id: exportDialog; + title: catalog.i18nc("@title:window", "Export Profile"); + selectExisting: false; + nameFilters: base.model.getFileNameFiltersWrite() + folder: base.model.getDefaultPath() + onAccepted: + { + var result = base.model.exportProfile(base.currentItem.id, base.currentItem.name, fileUrl, selectedNameFilter) + if(result && result.status == "error") + { + messageDialog.icon = StandardIcon.Critical + messageDialog.text = result.message + messageDialog.open() + } + // else pop-up Message thing from python code + } + } + } +} From a1115649cfa69a63dc6aa6d51546612daad8e64a Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 18:13:22 +0200 Subject: [PATCH 347/424] Rename all variant profiles to .inst.cfg and correctly mark them as type variant Still some issues with formulas causing errors, but it is getting closer --- ...ed_plus_0.25.cfg => ultimaker2_extended_plus_0.25.inst.cfg} | 3 ++- ...nded_plus_0.4.cfg => ultimaker2_extended_plus_0.4.inst.cfg} | 3 ++- ...nded_plus_0.6.cfg => ultimaker2_extended_plus_0.6.inst.cfg} | 3 ++- ...nded_plus_0.8.cfg => ultimaker2_extended_plus_0.8.inst.cfg} | 3 ++- ...{ultimaker2_plus_0.25.cfg => ultimaker2_plus_0.25.inst.cfg} | 3 ++- .../{ultimaker2_plus_0.4.cfg => ultimaker2_plus_0.4.inst.cfg} | 3 ++- .../{ultimaker2_plus_0.6.cfg => ultimaker2_plus_0.6.inst.cfg} | 3 ++- .../{ultimaker2_plus_0.8.cfg => ultimaker2_plus_0.8.inst.cfg} | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) rename resources/variants/{ultimaker2_extended_plus_0.25.cfg => ultimaker2_extended_plus_0.25.inst.cfg} (84%) rename resources/variants/{ultimaker2_extended_plus_0.4.cfg => ultimaker2_extended_plus_0.4.inst.cfg} (82%) rename resources/variants/{ultimaker2_extended_plus_0.6.cfg => ultimaker2_extended_plus_0.6.inst.cfg} (83%) rename resources/variants/{ultimaker2_extended_plus_0.8.cfg => ultimaker2_extended_plus_0.8.inst.cfg} (83%) rename resources/variants/{ultimaker2_plus_0.25.cfg => ultimaker2_plus_0.25.inst.cfg} (84%) rename resources/variants/{ultimaker2_plus_0.4.cfg => ultimaker2_plus_0.4.inst.cfg} (81%) rename resources/variants/{ultimaker2_plus_0.6.cfg => ultimaker2_plus_0.6.inst.cfg} (83%) rename resources/variants/{ultimaker2_plus_0.8.cfg => ultimaker2_plus_0.8.inst.cfg} (83%) diff --git a/resources/variants/ultimaker2_extended_plus_0.25.cfg b/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg similarity index 84% rename from resources/variants/ultimaker2_extended_plus_0.25.cfg rename to resources/variants/ultimaker2_extended_plus_0.25.inst.cfg index 2bc14d7588..0c0154c03b 100644 --- a/resources/variants/ultimaker2_extended_plus_0.25.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg @@ -5,6 +5,7 @@ definition = ultimaker2_extended_plus [metadata] author = Ultimaker +type = variant [values] machine_nozzle_size = 0.25 @@ -13,4 +14,4 @@ coasting_volume = 0.1 coasting_min_volume = 0.17 speed_wall = round(speed_print / 1.2, 1) speed_wall_0 = 1 if speed_wall < 5 else (speed_wall - 5) -speed_topbottom = round(speed_print / 1.5, 1) \ No newline at end of file +speed_topbottom = round(speed_print / 1.5, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.4.cfg b/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg similarity index 82% rename from resources/variants/ultimaker2_extended_plus_0.4.cfg rename to resources/variants/ultimaker2_extended_plus_0.4.inst.cfg index a0de0ad2d7..87b74b2572 100644 --- a/resources/variants/ultimaker2_extended_plus_0.4.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg @@ -5,10 +5,11 @@ definition = ultimaker2_extended_plus [metadata] author = Ultimaker +type = variant [values] machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 1.05 speed_wall = round(speed_print / 1.25, 1) speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2.25, 1) \ No newline at end of file +speed_topbottom = round(speed_print / 2.25, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.6.cfg b/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg similarity index 83% rename from resources/variants/ultimaker2_extended_plus_0.6.cfg rename to resources/variants/ultimaker2_extended_plus_0.6.inst.cfg index 10fa9dd4de..343b2d85e5 100644 --- a/resources/variants/ultimaker2_extended_plus_0.6.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg @@ -5,6 +5,7 @@ definition = ultimaker2_extended_plus [metadata] author = Ultimaker +type = variant [values] machine_nozzle_size = 0.6 @@ -12,4 +13,4 @@ machine_nozzle_tip_outer_diameter = 1.25 coasting_volume = 1.36 speed_wall = round(speed_print * 4 / 3, 1) speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) \ No newline at end of file +speed_topbottom = round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.8.cfg b/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg similarity index 83% rename from resources/variants/ultimaker2_extended_plus_0.8.cfg rename to resources/variants/ultimaker2_extended_plus_0.8.inst.cfg index 2980215ebd..c1bb4555c1 100644 --- a/resources/variants/ultimaker2_extended_plus_0.8.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg @@ -5,6 +5,7 @@ definition = ultimaker2_extended_plus [metadata] author = Ultimaker +type = variant [values] machine_nozzle_size = 0.8 @@ -12,4 +13,4 @@ machine_nozzle_tip_outer_diameter = 1.35 coasting_volume = 3.22 speed_wall = round(speed_print * 4 / 3, 1) speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) \ No newline at end of file +speed_topbottom = round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_plus_0.25.cfg b/resources/variants/ultimaker2_plus_0.25.inst.cfg similarity index 84% rename from resources/variants/ultimaker2_plus_0.25.cfg rename to resources/variants/ultimaker2_plus_0.25.inst.cfg index 18839a8871..51a4b44a4a 100644 --- a/resources/variants/ultimaker2_plus_0.25.cfg +++ b/resources/variants/ultimaker2_plus_0.25.inst.cfg @@ -5,6 +5,7 @@ definition = ultimaker2_plus [metadata] author = Ultimaker +type = variant [values] machine_nozzle_size = 0.25 @@ -13,4 +14,4 @@ coasting_volume = 0.1 coasting_min_volume = 0.17 speed_wall = round(speed_print / 1.2, 1) speed_wall_0 = 1 if speed_wall < 5 else (speed_wall - 5) -speed_topbottom = round(speed_print / 1.5, 1) \ No newline at end of file +speed_topbottom = round(speed_print / 1.5, 1) diff --git a/resources/variants/ultimaker2_plus_0.4.cfg b/resources/variants/ultimaker2_plus_0.4.inst.cfg similarity index 81% rename from resources/variants/ultimaker2_plus_0.4.cfg rename to resources/variants/ultimaker2_plus_0.4.inst.cfg index b7dc47ea6e..aaea23a8df 100644 --- a/resources/variants/ultimaker2_plus_0.4.cfg +++ b/resources/variants/ultimaker2_plus_0.4.inst.cfg @@ -5,10 +5,11 @@ definition = ultimaker2_plus [metadata] author = Ultimaker +type = variant [values] machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 1.05 speed_wall = round(speed_print / 1.25, 1) speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2.25, 1) \ No newline at end of file +speed_topbottom = round(speed_print / 2.25, 1) diff --git a/resources/variants/ultimaker2_plus_0.6.cfg b/resources/variants/ultimaker2_plus_0.6.inst.cfg similarity index 83% rename from resources/variants/ultimaker2_plus_0.6.cfg rename to resources/variants/ultimaker2_plus_0.6.inst.cfg index d6a7da7437..c416b2ec3c 100644 --- a/resources/variants/ultimaker2_plus_0.6.cfg +++ b/resources/variants/ultimaker2_plus_0.6.inst.cfg @@ -5,6 +5,7 @@ definition = ultimaker2_plus [metadata] author = Ultimaker +type = variant [values] machine_nozzle_size = 0.6 @@ -12,4 +13,4 @@ machine_nozzle_tip_outer_diameter = 1.25 coasting_volume = 1.36 speed_wall = round(speed_print * 4 / 3, 1) speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) \ No newline at end of file +speed_topbottom = round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_plus_0.8.cfg b/resources/variants/ultimaker2_plus_0.8.inst.cfg similarity index 83% rename from resources/variants/ultimaker2_plus_0.8.cfg rename to resources/variants/ultimaker2_plus_0.8.inst.cfg index cb97151642..3b577384ec 100644 --- a/resources/variants/ultimaker2_plus_0.8.cfg +++ b/resources/variants/ultimaker2_plus_0.8.inst.cfg @@ -5,6 +5,7 @@ definition = ultimaker2_plus [metadata] author = Ultimaker +type = variant [values] machine_nozzle_size = 0.8 @@ -12,4 +13,4 @@ machine_nozzle_tip_outer_diameter = 1.35 coasting_volume = 3.22 speed_wall = round(speed_print * 4 / 3, 1) speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) \ No newline at end of file +speed_topbottom = round(speed_print / 2, 1) From b6aa78cc8d858ba851f571f910fdd5fc4bad9c0e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 23:15:21 +0200 Subject: [PATCH 348/424] Use getAllKeys of ContainerStack to get all setting values Instead of traversing the setting definitions ourselves, let the stack do it. This code should be reusable for other places where we want to get certain properties of all settings, hopefully. Contributes to issues CURA-1278 and CURA-1588. --- plugins/CuraEngineBackend/StartSliceJob.py | 42 +++++----------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 70c56dfcc5..c0019b4401 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -130,10 +130,17 @@ class StartSliceJob(Job): # per-extruder settings or per-object settings. def _sendGlobalSettings(self): message = self._socket.createMessage("cura.proto.SettingList") - settings = self._getAllSettingValues() #Get all the settings to send. + + #Get all the settings to send. + stack = Application.getInstance().getGlobalContainerStack() + keys = stack.getAllKeys() + settings = { } + for key in keys: + settings[key] = stack.getProperty(key, "value") start_gcode = settings["machine_start_gcode"] settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode #Pre-compute material_bed_temp_prepend and material_print_temp_prepend. settings["material_print_temp_prepend"] = "{material_print_temperature}" not in start_gcode + for key, value in settings.items(): #Add all submessages for each individual setting. setting_message = message.addRepeatedMessage("settings") setting_message.name = key @@ -162,35 +169,4 @@ class StartSliceJob(Job): setting.name = key setting.value = str(value).encode() - Job.yieldThread() - - ## Gets the current values for all child definitions of a definition. - # - # To be clear, it looks up all child definitions, and returns the CURRENT - # VALUE of the keys of these definitions according to the global stack. It - # doesn't return the "value" property in the definition. - # - # \param definition The setting definition to get the child settings of. - def _getAllChildSettingValues(self, definition): - setting_values = { } - for child in definition.children: - setting_values[child.key] = self._stack.getProperty(child.key, "value") - for key, value in self._getAllChildSettingValues(child).items(): - setting_values[key] = value - return setting_values - - ## Gets all setting values as a dictionary. - # - # \return A dictionary with the setting keys as keys and the setting - # values as values. - def _getAllSettingValues(self): - setting_values = {} - - definition_containers = [container for container in self._stack.getContainers() if container.__class__ == DefinitionContainer] #To get all keys, get all definitions from all definition containers. - for definition_container in definition_containers: - for definition in definition_container.definitions: - setting_values[definition.key] = self._stack.getProperty(definition.key, "value") - for key, value in self._getAllChildSettingValues(definition).items(): - setting_values[key] = value - - return setting_values \ No newline at end of file + Job.yieldThread() \ No newline at end of file From 1cbb3a3f285b5093c00afb2be4ca27c839df365c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 23 May 2016 23:47:38 +0200 Subject: [PATCH 349/424] Prevent slicing if there is an invalid setting value E.g. higher than maximum_value. This seems to work okay but is largely untested because switching to advanced mode gives a segfault. Contributes to issues CURA-1278 and CURA-1588. --- .../CuraEngineBackend/CuraEngineBackend.py | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index df4d5f6dd2..cc0d1b1600 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -11,6 +11,7 @@ from UM.Qt.Bindings.BackendProxy import BackendState #To determine the state of from UM.Message import Message from UM.PluginRegistry import PluginRegistry from UM.Resources import Resources +from UM.Settings.Validator import ValidatorState #To find if a setting is in an error state. We can't slice then. from cura.OneAtATimeIterator import OneAtATimeIterator from . import ProcessSlicedLayersJob @@ -127,15 +128,26 @@ class CuraEngineBackend(Backend): self._process_layers_job.abort() self._process_layers_job = None - #TODO: Re-add don't slice with error stuff. - #if self._profile.hasErrorValue(): - # Logger.log("w", "Profile has error values. Aborting slicing") - # if self._message: - # self._message.hide() - # self._message = None - # self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) - # self._message.show() - # return #No slicing if we have error values since those are by definition illegal values. + #Don't slice if there is a setting with an error value. + stack = Application.getInstance().getGlobalContainerStack() + for key in stack.getAllKeys(): + validation_state = stack.getProperty(key, "validationState") + #Only setting instances have a validation state, so settings which + #are not overwritten by any instance will have none. The property + #then, and only then, evaluates to None. We make the assumption that + #the definition defines the setting with a default value that is + #valid. Therefore we can allow both ValidatorState.Valid and None as + #allowable validation states. + #TODO: This assumption is wrong! If the definition defines an inheritance function that through inheritance evaluates to a disallowed value, a setting is still invalid even though it's default! + #TODO: Therefore we must also validate setting definitions. + if validation_state != None and validation_state != ValidatorState.Valid: + Logger.log("w", "Setting %s is not valid, but %s. Aborting slicing.", key, validation_state) + if self._message: #Hide any old message before creating a new one. + self._message.hide() + self._message = None + self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) + self._message.show() + return self.processingProgress.emit(0.0) self.backendStateChange.emit(BackendState.NOT_STARTED) From fa1d262123387918414b74e69a33a57ee2e10910 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 May 2016 01:16:11 +0200 Subject: [PATCH 350/424] Fix getting platform centre With the new setting system. Contributes to issues CURA-1278 and CURA-1591. --- plugins/CuraEngineBackend/ProcessSlicedLayersJob.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py index 6a947866d3..59feec0fc2 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py @@ -62,8 +62,6 @@ class ProcessSlicedLayersJob(Job): self._progress.hide() return - settings = Application.getInstance().getMachineManager().getWorkingProfile() - mesh = MeshData() layer_data = LayerData.LayerData() layer_count = len(self._layers) @@ -132,8 +130,9 @@ class ProcessSlicedLayersJob(Job): new_node.setMeshData(mesh) new_node.setParent(self._scene.getRoot()) # Note: After this we can no longer abort! - if not settings.getSettingValue("machine_center_is_zero"): - new_node.setPosition(Vector(-settings.getSettingValue("machine_width") / 2, 0.0, settings.getSettingValue("machine_depth") / 2)) + settings = Application.getInstance().getGlobalContainerStack() + if not settings.getProperty("machine_center_is_zero", "value"): + new_node.setPosition(Vector(-settings.getProperty("machine_width", "value") / 2, 0.0, settings.getProperty("machine_depth", "value") / 2)) if self._progress: self._progress.setProgress(100) From 59b8d5c169bc762dfd80e847f1c6b23d10239217 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 May 2016 02:24:11 +0200 Subject: [PATCH 351/424] Fix saving g-code to file The settings that are serialised at the end of the g-code are now the serialised global container stack. That's fairly useless since the serialised version of a container stack just lists the IDs of the containers in the stack, not the settings themselves. One of these containers is likely a current_profile container and that's all the information you'll get from that serialisation. Contributes to issue CURA-1278. --- plugins/GCodeWriter/GCodeWriter.py | 23 ++++++++++++----------- plugins/GCodeWriter/__init__.py | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index ee766ef221..5db25aeac2 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -32,7 +32,7 @@ class GCodeWriter(MeshWriter): def write(self, stream, node, mode = MeshWriter.OutputMode.TextMode): if mode != MeshWriter.OutputMode.TextMode: - Logger.log("e", "GCode Writer does not support non-text mode") + Logger.log("e", "GCode Writer does not support non-text mode.") return False scene = Application.getInstance().getController().getScene() @@ -40,26 +40,27 @@ class GCodeWriter(MeshWriter): if gcode_list: for gcode in gcode_list: stream.write(gcode) - # Serialise the profile and put them at the end of the file. - profile = self._serialiseProfile(Application.getInstance().getMachineManager().getWorkingProfile()) - stream.write(profile) + # Serialise the current container stack and put it at the end of the file. + settings = self._serialiseSettings(Application.getInstance().getGlobalContainerStack()) + stream.write(settings) return True return False - ## Serialises the profile to prepare it for saving in the g-code. + ## Serialises a container stack to prepare it for writing at the end of the + # g-code. # - # The profile are serialised, and special characters (including newline) + # The settings are serialised, and special characters (including newline) # are escaped. # - # \param profile The profile to serialise. - # \return A serialised string of the profile. - def _serialiseProfile(self, profile): + # \param settings A container stack to serialise. + # \return A serialised string of the settings. + def _serialiseSettings(self, settings): prefix = ";SETTING_" + str(GCodeWriter.version) + " " # The prefix to put before each line. prefix_length = len(prefix) - # Serialise a deepcopy to remove the defaults from the profile - serialised = copy.deepcopy(profile).serialise() + #TODO: This just serialises the container stack, which only indicates the IDs of the containers in that stack, not the settings themselves, making this about 9001x as useless as the fax functionality in Adobe Acrobat. + serialised = settings.serialize() # Escape characters that have a special meaning in g-code comments. pattern = re.compile("|".join(GCodeWriter.escape_characters.keys())) diff --git a/plugins/GCodeWriter/__init__.py b/plugins/GCodeWriter/__init__.py index cd8a5d3418..efe3368c61 100644 --- a/plugins/GCodeWriter/__init__.py +++ b/plugins/GCodeWriter/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": catalog.i18nc("@info:whatsthis", "Writes GCode to a file."), - "api": 2 + "api": 3 }, "mesh_writer": { From 673f63cf51d9100d9a655e1a8a8a892125a8d738 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 May 2016 02:26:02 +0200 Subject: [PATCH 352/424] Remove unused import The deep copy is no longer needed. Also updated copyright year. Contributes to issue CURA-1278. --- plugins/GCodeWriter/GCodeWriter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index 5db25aeac2..3cbed77aab 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -1,11 +1,10 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2016 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from UM.Mesh.MeshWriter import MeshWriter from UM.Logger import Logger from UM.Application import Application import re #For escaping characters in the settings. -import copy class GCodeWriter(MeshWriter): From 8b5c4b0361bf1aa9d5ad6572452700ee7579adf0 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 May 2016 02:28:56 +0200 Subject: [PATCH 353/424] Document GCodeWriter class Contributes to issue CURA-1278. --- plugins/GCodeWriter/GCodeWriter.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index 3cbed77aab..ec5d1ceaf8 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -6,7 +6,16 @@ from UM.Logger import Logger from UM.Application import Application import re #For escaping characters in the settings. - +## Writes g-code to a file. +# +# While this poses as a mesh writer, what this really does is take the g-code +# in the entire scene and write it to an output device. Since the g-code of a +# single mesh isn't separable from the rest what with rafts and travel moves +# and all, it doesn't make sense to write just a single mesh. +# +# So this plug-in takes the g-code that is stored in the root of the scene +# node tree, adds a bit of extra information about the profiles and writes +# that to the output device. class GCodeWriter(MeshWriter): ## The file format version of the serialised g-code. # From d602c0754fa0a89ed5b5545b75d6f7d582198e17 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 May 2016 03:00:16 +0200 Subject: [PATCH 354/424] Properly serialise all settings to g-code file This makes for ugly g-code files, true, but at least the functionality of saving settings is useful now: It's traceable. Could've implemented this somewhere else too, but this is fine for now. Contributes to issue CURA-1278. --- plugins/GCodeWriter/GCodeWriter.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index ec5d1ceaf8..d304f0d046 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -4,6 +4,7 @@ from UM.Mesh.MeshWriter import MeshWriter from UM.Logger import Logger from UM.Application import Application +from UM.Settings.InstanceContainer import InstanceContainer #To create a complete setting profile to store in the g-code. import re #For escaping characters in the settings. ## Writes g-code to a file. @@ -67,8 +68,11 @@ class GCodeWriter(MeshWriter): prefix = ";SETTING_" + str(GCodeWriter.version) + " " # The prefix to put before each line. prefix_length = len(prefix) - #TODO: This just serialises the container stack, which only indicates the IDs of the containers in that stack, not the settings themselves, making this about 9001x as useless as the fax functionality in Adobe Acrobat. - serialised = settings.serialize() + all_settings = InstanceContainer("G-code-imported-profile") #Create a new 'profile' with ALL settings so that the slice can be precisely reproduced. + all_settings.setDefinition(settings.getBottom()) + for key in settings.getAllKeys(): + all_settings.setProperty(key, "value", settings.getProperty(key, "value")) #Just copy everything over to the setting instance. + serialised = all_settings.serialize() # Escape characters that have a special meaning in g-code comments. pattern = re.compile("|".join(GCodeWriter.escape_characters.keys())) From b1d5cad89842c3474fe4508a51cc14000f0690fd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 May 2016 11:43:57 +0200 Subject: [PATCH 355/424] Document QTbug Took a while to find! Contributes to issue CURA-1278. --- resources/qml/Settings/SettingView.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 6b09c8b9a3..65c7546d02 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -44,6 +44,7 @@ ScrollView property var settingDefinitionsModel: definitionsModel property var propertyProvider: provider + //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 asynchronous: true source: From 332321b99119f7b0ebe96a11776bd6114c43d608 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 24 May 2016 11:50:39 +0200 Subject: [PATCH 356/424] Disable asynchronous loading of SettingItem when Qt Version < 5.5 --- resources/qml/Settings/SettingView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 65c7546d02..0e99ecc4b7 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -45,7 +45,7 @@ ScrollView property var propertyProvider: provider //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 - asynchronous: true + asynchronous: QT_VERSION_STR.split(".")[1] >= 5 source: { From c80455c6bca2d79a54b5a0225bb6e14afdc2f64d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 May 2016 15:04:08 +0200 Subject: [PATCH 357/424] Fix creating print job name Also fixed up the code style of that bit. Perhaps this should've been done in Python, but that is for later. Contributes to issue CURA-1278. --- resources/qml/Cura.qml | 2 +- resources/qml/JobSpecs.qml | 50 ++++++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 733def1b81..52a8498f5e 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -813,7 +813,7 @@ UM.MainWindow base.visible = true; restart(); } - else if(UM.MachineManager.activeMachineInstance == "") + else if(Cura.MachineManager.activeMachineName == "") { addMachineDialog.firstRun = true; addMachineDialog.open(); diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index fac4fd841d..60e2c6698e 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -7,15 +7,16 @@ import QtQuick.Controls.Styles 1.1 import QtQuick.Layouts 1.1 import UM 1.1 as UM +import Cura 1.0 as Cura Rectangle { id: base; property bool activity: Printer.getPlatformActivity; property string fileBaseName - property variant activeMachineInstance: UM.MachineManager.activeMachineInstance + property variant activeMachineName: Cura.MachineManager.activeMachineName - onActiveMachineInstanceChanged: + onActiveMachineNameChanged: { base.createFileName() } @@ -28,27 +29,34 @@ Rectangle { height: childrenRect.height color: "transparent" - function createFileName(){ - var splitMachineName = UM.MachineManager.activeMachineInstance.split(" ") - var abbrMachine = '' - for (var i = 0; i < splitMachineName.length; i++){ - if (splitMachineName[i].search(/ultimaker/i) != -1){ - abbrMachine += 'UM' - } - else{ - if (splitMachineName[i].charAt(0).search(/[0-9]/g) == -1) - abbrMachine += splitMachineName[i].charAt(0) - } - var regExpAdditives = /[0-9\+]/g; - var resultAdditives = splitMachineName[i].match(regExpAdditives); - if (resultAdditives != null){ - for (var j = 0; j < resultAdditives.length; j++){ - abbrMachine += resultAdditives[j] - - } + function createFileName() + { + var splitMachineName = Cura.MachineManager.activeMachineName.split(" "); + var abbrMachine = ''; + for (var i = 0; i < splitMachineName.length; i++) + { + if (splitMachineName[i].search(/ultimaker/i) != -1) + { + abbrMachine += 'UM'; + } + else + { + if (splitMachineName[i].charAt(0).search(/[0-9]/g) == -1) + { + abbrMachine += splitMachineName[i].charAt(0); } } - printJobTextfield.text = abbrMachine + '_' + base.fileBaseName + var regExpAdditives = /[0-9\+]/g; + var resultAdditives = splitMachineName[i].match(regExpAdditives); + if (resultAdditives != null) + { + for (var j = 0; j < resultAdditives.length; j++) + { + abbrMachine += resultAdditives[j]; + } + } + } + printJobTextfield.text = abbrMachine + '_' + base.fileBaseName; } Connections { From fd3788ba7c8f830daf5a71f071aef79e01e09c4f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 25 May 2016 11:06:48 +0200 Subject: [PATCH 358/424] Removed stray = sign. CURA-1278 CURA-1592 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index e53b5d338b..67534222fb 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -153,7 +153,7 @@ Item { { if(text != "") { - listview.model.filter.label = = {"global_only":"False", "label": text} + listview.model.filter.label = {"global_only":"False", "label": text} } else { From 5f54d611cf3f9ab7de3bc485229f28bc2fb23513 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 25 May 2016 11:14:11 +0200 Subject: [PATCH 359/424] Per object settings filter now uses correct bool types (instead of strings) CURA-1278 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 67534222fb..48ed7caaa5 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -153,11 +153,11 @@ Item { { if(text != "") { - listview.model.filter.label = {"global_only":"False", "label": text} + listview.model.filter.label = {"global_only": false, "label": text} } else { - listview.model.filter = {"global_only":"False"} + listview.model.filter = {"global_only": false} } } } @@ -182,7 +182,7 @@ Item { containerId: Cura.MachineManager.activeDefinitionId filter: { - "global_only": "False" + "global_only": false } } delegate:Loader From 81cdb3fd8c5000b5fb8d3b1004476b7b55fcbf83 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 25 May 2016 11:28:58 +0200 Subject: [PATCH 360/424] Added wildcard to filtering CURA-1278 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 48ed7caaa5..9b78116d24 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -153,7 +153,7 @@ Item { { if(text != "") { - listview.model.filter.label = {"global_only": false, "label": text} + listview.model.filter = {"global_only": false, "label": "*" + text} } else { From 2e0205f174e3f778943f08978e051eaa752e283c Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:21:33 +0200 Subject: [PATCH 361/424] Store the global container stack as an instance property This reduces the amount of function calls and makes it simpler to check for container existance --- cura/MachineManagerModel.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 0f45f0a7b1..b0fce98311 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -8,7 +8,10 @@ import UM.Settings class MachineManagerModel(QObject): def __init__(self, parent = None): super().__init__(parent) + + self._global_container_stack = None Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerChanged) + self._onGlobalContainerChanged() ## When the global container is changed, active material probably needs to be updated. self.globalContainerChanged.connect(self.activeMaterialChanged) @@ -31,10 +34,16 @@ class MachineManagerModel(QObject): activeQualityChanged = pyqtSignal() def _onGlobalContainerChanged(self): - Preferences.getInstance().setValue("cura/active_machine", Application.getInstance().getGlobalContainerStack().getId()) - Application.getInstance().getGlobalContainerStack().containersChanged.connect(self._onInstanceContainersChanged) + if self._global_container_stack: + self._global_container_stack.containersChanged.disconnect(self._onInstanceContainersChanged) + + self._global_container_stack = Application.getInstance().getGlobalContainerStack() self.globalContainerChanged.emit() + if self._global_container_stack: + Preferences.getInstance().setValue("cura/active_machine", self._global_container_stack.getId()) + self._global_container_stack.containersChanged.connect(self._onInstanceContainersChanged) + def _onInstanceContainersChanged(self, container): container_type = container.getMetaDataEntry("type") if container_type == "material": From b1f887a70f846307ac9361a1dcd4b7bd4f613202 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:22:59 +0200 Subject: [PATCH 362/424] Use the global stack instance variable and account for it potentially being None --- cura/MachineManagerModel.py | 117 +++++++++++++++++++++++------------- 1 file changed, 76 insertions(+), 41 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index b0fce98311..eb92aa422e 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -110,78 +110,111 @@ class MachineManagerModel(QObject): @pyqtProperty(str, notify = globalContainerChanged) def activeMachineName(self): - return Application.getInstance().getGlobalContainerStack().getName() + if self._global_container_stack: + return self._global_container_stack.getName() + + return "" @pyqtProperty(str, notify = globalContainerChanged) def activeMachineId(self): - return Application.getInstance().getGlobalContainerStack().getId() + if self._global_container_stack: + return self._global_container_stack.getId() + + return "" @pyqtProperty(str, notify = activeMaterialChanged) def activeMaterialName(self): - material = Application.getInstance().getGlobalContainerStack().findContainer({"type":"material"}) - if material: - return material.getName() + if self._global_container_stack: + material = self._global_container_stack.findContainer({"type":"material"}) + if material: + return material.getName() + + return "" @pyqtProperty(str, notify=activeMaterialChanged) def activeMaterialId(self): - material = Application.getInstance().getGlobalContainerStack().findContainer({"type": "material"}) - if material: - return material.getId() + if self._global_container_stack: + material = self._global_container_stack.findContainer({"type": "material"}) + if material: + return material.getId() + + return "" @pyqtProperty(str, notify=activeQualityChanged) def activeQualityName(self): - quality = Application.getInstance().getGlobalContainerStack().findContainer({"type": "quality"}) - if quality: - return quality.getName() + if self._global_container_stack: + quality = self._global_container_stack.findContainer({"type": "quality"}) + if quality: + return quality.getName() + return "" @pyqtProperty(str, notify=activeQualityChanged) def activeQualityId(self): - quality = Application.getInstance().getGlobalContainerStack().findContainer({"type": "quality"}) - if quality: - return quality.getId() + if self._global_container_stack: + quality = self._global_container_stack.findContainer({"type": "quality"}) + if quality: + return quality.getId() + return "" @pyqtSlot(str) def setActiveMaterial(self, material_id): containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=material_id) - old_material = Application.getInstance().getGlobalContainerStack().findContainer({"type":"material"}) + if not containers or not self._global_container_stack: + return + + old_material = self._global_container_stack.findContainer({"type":"material"}) if old_material: - material_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_material) - Application.getInstance().getGlobalContainerStack().replaceContainer(material_index, containers[0]) + material_index = self._global_container_stack.getContainerIndex(old_material) + self._global_container_stack.replaceContainer(material_index, containers[0]) @pyqtSlot(str) def setActiveVariant(self, variant_id): containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=variant_id) - old_variant = Application.getInstance().getGlobalContainerStack().findContainer({"type": "variant"}) + if not containers or not self._global_container_stack: + return + + old_variant = self._global_container_stack.findContainer({"type": "variant"}) if old_variant: - variant_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_variant) - Application.getInstance().getGlobalContainerStack().replaceContainer(variant_index, containers[0]) + variant_index = self._global_container_stack.getContainerIndex(old_variant) + self._global_container_stack.replaceContainer(variant_index, containers[0]) @pyqtSlot(str) def setActiveQuality(self, quality_id): containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = quality_id) - old_quality = Application.getInstance().getGlobalContainerStack().findContainer({"type": "quality"}) + if not containers or not self._global_container_stack: + return + + old_quality = self._global_container_stack.findContainer({"type": "quality"}) if old_quality: - quality_index = Application.getInstance().getGlobalContainerStack().getContainerIndex(old_quality) - Application.getInstance().getGlobalContainerStack().replaceContainer(quality_index, containers[0]) + quality_index = self._global_container_stack.getContainerIndex(old_quality) + self._global_container_stack.replaceContainer(quality_index, containers[0]) @pyqtProperty(str, notify = activeVariantChanged) def activeVariantName(self): - variant = Application.getInstance().getGlobalContainerStack().findContainer({"type": "variant"}) - if variant: - return variant.getName() + if self._global_container_stack: + variant = self._global_container_stack.findContainer({"type": "variant"}) + if variant: + return variant.getName() + + return "" @pyqtProperty(str, notify = activeVariantChanged) def activeVariantId(self): - variant = Application.getInstance().getGlobalContainerStack().findContainer({"type": "variant"}) - if variant: - return variant.getId() + if self._global_container_stack: + variant = self._global_container_stack.findContainer({"type": "variant"}) + if variant: + return variant.getId() + + return "" @pyqtProperty(str, notify = globalContainerChanged) def activeDefinitionId(self): - definition = Application.getInstance().getGlobalContainerStack().getBottom() - if definition: - return definition.id - return None + if self._global_container_stack: + definition = self._global_container_stack.getBottom() + if definition: + return definition.id + + return "" @pyqtSlot(str, str) def renameMachine(self, machine_id, new_name): @@ -193,17 +226,19 @@ class MachineManagerModel(QObject): def removeMachine(self, machine_id): UM.Settings.ContainerRegistry.getInstance().removeContainer(machine_id) - @pyqtProperty(bool) + @pyqtProperty(bool, notify = globalContainerChanged) def hasMaterials(self): - # Todo: Still hardcoded. - # We should implement this properly when it's clear how a machine notifies us if it can handle materials - return True + if self._global_container_stack: + return self._global_container_stack.getMetaDataEntry("has_materials", False) - @pyqtProperty(bool) + return False + + @pyqtProperty(bool, notify = globalContainerChanged) def hasVariants(self): - # Todo: Still hardcoded. - # We should implement this properly when it's clear how a machine notifies us if it can handle variants - return True + if self._global_container_stack: + return self._global_container_stack.getMetaDataEntry("has_variants", False) + + return False def createMachineManagerModel(engine, script_engine): return MachineManagerModel() From 396f023bdf7bbde07b9f8e74b553a560d0076dfd Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:23:23 +0200 Subject: [PATCH 363/424] Account for global container stack being None in the backend plugin --- plugins/CuraEngineBackend/CuraEngineBackend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index cc0d1b1600..e7fb946bb6 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -57,7 +57,8 @@ class CuraEngineBackend(Backend): #When any setting property changed, call the _onSettingChanged function. #This function will then see if we need to start slicing. - Application.getInstance().getGlobalContainerStack().propertyChanged.connect(self._onSettingChanged) + if Application.getInstance().getGlobalContainerStack(): + Application.getInstance().getGlobalContainerStack().propertyChanged.connect(self._onSettingChanged) #When you update a setting and other settings get changed through inheritance, many propertyChanged signals are fired. #This timer will group them up, and only slice for the last setting changed signal. From 24210246eec01790fe668caf2a836d20460b766e Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:23:49 +0200 Subject: [PATCH 364/424] Add preferred variant, material and quality to UM2+ definition --- resources/definitions/ultimaker2_plus.def.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker2_plus.def.json b/resources/definitions/ultimaker2_plus.def.json index 646b424c5c..9f68c2a16b 100644 --- a/resources/definitions/ultimaker2_plus.def.json +++ b/resources/definitions/ultimaker2_plus.def.json @@ -10,7 +10,10 @@ "category": "Ultimaker", "file_formats": "text/x-gcode", "platform": "ultimaker2_platform.obj", - "platform_texture": "Ultimaker2Plusbackplate.png" + "platform_texture": "Ultimaker2Plusbackplate.png", + "preferred_variant": "ultimaker2_plus_0.4", + "preferred_material": "pla", + "preferred_quality": "high" }, "overrides": { From a1d48fd51151a28760476f2dbd1b041bedf98b02 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:25:03 +0200 Subject: [PATCH 365/424] When creating a new container stack, add empty containers for things where we cannot find containers Additionally, record this information in the metadata of the stack --- cura/MachineManagerModel.py | 39 +++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index eb92aa422e..8354f3a140 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -63,34 +63,52 @@ class MachineManagerModel(QObject): def addMachine(self,name, definition_id): definitions = UM.Settings.ContainerRegistry.getInstance().findDefinitionContainers(id=definition_id) if definitions: + definition = definitions[0] + new_global_stack = UM.Settings.ContainerStack(name) new_global_stack.addMetaDataEntry("type", "machine") UM.Settings.ContainerRegistry.getInstance().addContainer(new_global_stack) + empty_container = UM.Settings.ContainerRegistry.getInstance().getEmptyInstanceContainer() + + variants = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "variant", definition = definition.id) + if variants: + new_global_stack.addMetaDataEntry("has_variants", True) + + preferred_variant_id = definitions[0].getMetaDataEntry("preferred_variant") + variant_instance_container = empty_container + if preferred_variant_id: + preferred_variant_id = preferred_variant_id.lower() + container = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = preferred_variant_id) + if container: + variant_instance_container = container[0] + + if variants and variant_instance_container == empty_container: + variant_instance_container = variants[0] + + materials = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "material", definition = definition.id) + if materials: + new_global_stack.addMetaDataEntry("has_materials", True) preferred_material_id = definitions[0].getMetaDataEntry("preferred_material") - material_instance_container = None + material_instance_container = empty_container if preferred_material_id: preferred_material_id = preferred_material_id.lower() container = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = preferred_material_id) if container: material_instance_container = container[0] + if materials and material_instance_container == empty_container: + material_instance_container = materials[0] + preferred_quality_id = definitions[0].getMetaDataEntry("preferred_quality") - quality_instance_container = None + quality_instance_container = empty_container if preferred_quality_id: preferred_quality_id = preferred_quality_id.lower() container = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = preferred_quality_id) if container: quality_instance_container = container[0] - ## DEBUG CODE - variant_instance_container = UM.Settings.InstanceContainer("test_variant") - variant_instance_container.addMetaDataEntry("type", "variant") - variant_instance_container.setDefinition(definitions[0]) - - UM.Settings.ContainerRegistry.getInstance().addContainer(variant_instance_container) - current_settings_instance_container = UM.Settings.InstanceContainer(name + "_current_settings") current_settings_instance_container.addMetaDataEntry("machine", name) current_settings_instance_container.addMetaDataEntry("type", "user") @@ -99,9 +117,10 @@ class MachineManagerModel(QObject): # If a definition is found, its a list. Should only have one item. new_global_stack.addContainer(definitions[0]) + if variant_instance_container: + new_global_stack.addContainer(variant_instance_container) if material_instance_container: new_global_stack.addContainer(material_instance_container) - new_global_stack.addContainer(variant_instance_container) if quality_instance_container: new_global_stack.addContainer(quality_instance_container) new_global_stack.addContainer(current_settings_instance_container) From e29cc5e699d70476936f652710964935d9d92025 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:26:19 +0200 Subject: [PATCH 366/424] Create machine-specific material containers for machine specific overrides in XML material files --- .../XmlMaterialProfile/XmlMaterialProfile.py | 67 ++++++++++++++++--- 1 file changed, 59 insertions(+), 8 deletions(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 5566301a09..50c39238fd 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -2,10 +2,16 @@ # Cura is released under the terms of the AGPLv3 or higher. import math +import copy import xml.etree.ElementTree as ET +from UM.Logger import Logger + import UM.Settings +# The namespace is prepended to the tag name but between {}. +# We are only interested in the actual tag name, so discard everything +# before the last } def _tag_without_namespace(element): return element.tag[element.tag.rfind("}") + 1:] @@ -17,7 +23,6 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): raise NotImplementedError("Writing material profiles has not yet been implemented") def deserialize(self, serialized): - print("deserialize material profile") data = ET.fromstring(serialized) self.addMetaDataEntry("type", "material") @@ -27,9 +32,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): metadata = data.iterfind("./um:metadata/*", self.__namespaces) for entry in metadata: - # The namespace is prepended to the tag name but between {}. - # We are only interested in the actual tag name. - tag_name = entry.tag[entry.tag.rfind("}") + 1:] + tag_name = _tag_without_namespace(entry) if tag_name == "name": brand = entry.find("./um:brand", self.__namespaces) @@ -47,7 +50,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): property_values = {} properties = data.iterfind("./um:properties/*", self.__namespaces) for entry in properties: - tag_name = entry.tag[entry.tag.rfind("}") + 1:] + tag_name = _tag_without_namespace(entry) property_values[tag_name] = entry.text diameter = float(property_values.get("diameter", 2.85)) # In mm @@ -66,12 +69,50 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): self.addMetaDataEntry("properties", property_values) + global_setting_values = {} settings = data.iterfind("./um:settings/um:setting", self.__namespaces) for entry in settings: - tag_name = _tag_without_namespace(entry) + key = entry.get("key") + if key in self.__material_property_setting_map: + self.setProperty(self.__material_property_setting_map[key], "value", entry.text, self._definition) + global_setting_values[key] = entry.text + + machines = data.iterfind("./um:settings/um:machine", self.__namespaces) + for machine in machines: + machine_setting_values = {} + settings = machine.iterfind("./um:setting", self.__namespaces) + for entry in settings: + key = entry.get("key") + if key in self.__material_property_setting_map: + machine_setting_values[self.__material_property_setting_map[key]] = entry.text + + identifiers = machine.iterfind("./um:machine_identifier", self.__namespaces) + for identifier in identifiers: + machine_id = self.__product_id_map.get(identifier.get("product"), None) + if machine_id is None: + Logger.log("w", "Cannot create material for unknown machine %s", machine_id) + continue + + definitions = UM.Settings.ContainerRegistry.getInstance().findDefinitionContainers(id = machine_id) + if not definitions: + Logger.log("w", "No definition found for machine ID %s", machine_id) + continue + + new_material = XmlMaterialProfile(self.id + "_" + machine_id) + new_material.setName(self.getName()) + new_material.setMetaData(self.getMetaData()) + new_material.setDefinition(definitions[0]) + + for key, value in global_setting_values.items(): + new_material.setProperty(key, "value", value, definitions[0]) + + for key, value in machine_setting_values.items(): + new_material.setProperty(key, "value", value, definitions[0]) + + new_material._dirty = False + + UM.Settings.ContainerRegistry.getInstance().addContainer(new_material) - if tag_name in self.__material_property_setting_map: - self.setProperty(self.__material_property_setting_map[tag_name], "value", entry.text) __material_property_setting_map = { "print temperature": "material_print_temperature", @@ -79,6 +120,16 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): "standby temperature": "material_standby_temperature", } + __product_id_map = { + "Ultimaker2": "ultimaker2", + "Ultimaker2+": "ultimaker2_plus", + "Ultimaker2go": "ultimaker2_go", + "Ultimaker2extended": "ultimaker2_extended", + "Ultimaker2extended+": "ultimaker2_extended_plus", + "Ultimaker Original": "ultimaker_original", + "Ultimaker Original+": "ultimaker_original_plus" + } + __namespaces = { "um": "http://www.ultimaker.com/material" } From 2654033fae9847f5c321a8a93379433039085825 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:26:51 +0200 Subject: [PATCH 367/424] Show the add machine dialog when we do not have an active machine --- resources/qml/Cura.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 52a8498f5e..42098e9883 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -813,9 +813,8 @@ UM.MainWindow base.visible = true; restart(); } - else if(Cura.MachineManager.activeMachineName == "") + else if(Cura.MachineManager.activeMachineId == null || Cura.MachineManager.activeMachineId == "") { - addMachineDialog.firstRun = true; addMachineDialog.open(); } } From b2a8810d04cc927c9fb7dab05b5b3f1abfd83945 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:28:29 +0200 Subject: [PATCH 368/424] Filter available materials by the machine definition Since we now have some machine-specific materials --- resources/qml/Preferences/MaterialsPage.qml | 2 +- resources/qml/SidebarHeader.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index f1f3432a41..4ebe281c08 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -13,7 +13,7 @@ UM.ManagementPage title: catalog.i18nc("@title:tab", "Materials"); - model: UM.InstanceContainersModel { filter: { "type": "material" } } + model: UM.InstanceContainersModel { filter: { "type": "material", "definition": Cura.MachineManager.activeDefinitionId } } /* onAddObject: { var selectedMaterial = UM.MaterialManager.createProfile(); base.selectMaterial(selectedMaterial); } onRemoveObject: confirmDialog.open(); diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 5284178ba7..d8bc4291bb 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -197,7 +197,7 @@ Item id: materialSelectionInstantiator model: UM.InstanceContainersModel { - filter: {"type": "material"} + filter: { "type": "material", "definition": Cura.MachineManager.activeDefinitionId } } MenuItem { From 81d0b34f202e19adac3dd23586a8abe15e851a20 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:28:53 +0200 Subject: [PATCH 369/424] Update example XML material to use the right product names --- resources/materials/generic_pla.xml.fdm_material | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/materials/generic_pla.xml.fdm_material b/resources/materials/generic_pla.xml.fdm_material index b64ecdc61b..a4fe02c195 100644 --- a/resources/materials/generic_pla.xml.fdm_material +++ b/resources/materials/generic_pla.xml.fdm_material @@ -16,7 +16,6 @@ Generic PLA profile. Serves as an example file, data in this file is not correct 1.3 2.85 - 750 210 @@ -24,9 +23,8 @@ Generic PLA profile. Serves as an example file, data in this file is not correct 175 - - - + + 150 @@ -36,6 +34,7 @@ Generic PLA profile. Serves as an example file, data in this file is not correct + 150 80 From ab0d34d9acd4de2673a76327fa849d6a9ec2df3b Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:29:15 +0200 Subject: [PATCH 370/424] Add layer height to high quality profile so we have something that changes --- resources/quality/high.inst.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/quality/high.inst.cfg b/resources/quality/high.inst.cfg index 89dcd4c9bc..0329e9ffe1 100644 --- a/resources/quality/high.inst.cfg +++ b/resources/quality/high.inst.cfg @@ -7,3 +7,4 @@ definition = fdmprinter type = quality [values] +layer_height = 0.06 From 9bb4917ae74b3d6d129e7e215976964dffa6f749 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 11:30:47 +0200 Subject: [PATCH 371/424] Import Cura in materials preferences page so we can use the active definition id --- resources/qml/Preferences/MaterialsPage.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index 4ebe281c08..03ede39a5c 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -6,6 +6,7 @@ import QtQuick.Controls 1.1 import QtQuick.Dialogs 1.2 import UM 1.2 as UM +import Cura 1.0 as Cura UM.ManagementPage { From 6522aae915cccb2c2b4c82635dd99377783e326c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 25 May 2016 11:50:58 +0200 Subject: [PATCH 372/424] Improve slice trigger documentation Contributes to issue CURA-1278. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index e7fb946bb6..aa42a08393 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -55,10 +55,9 @@ class CuraEngineBackend(Backend): self._onActiveViewChanged() self._stored_layer_data = [] - #When any setting property changed, call the _onSettingChanged function. - #This function will then see if we need to start slicing. + #Triggers for when to (re)start slicing: if Application.getInstance().getGlobalContainerStack(): - Application.getInstance().getGlobalContainerStack().propertyChanged.connect(self._onSettingChanged) + Application.getInstance().getGlobalContainerStack().propertyChanged.connect(self._onSettingChanged) #Note: Only starts slicing when the value changed. #When you update a setting and other settings get changed through inheritance, many propertyChanged signals are fired. #This timer will group them up, and only slice for the last setting changed signal. From 2683907121eb7384016dfb04603388cb0dfb12e4 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 25 May 2016 13:57:16 +0200 Subject: [PATCH 373/424] Show Ultimaker Original and Ultimaker Original + in Add Machine wizard CURA-1278 --- resources/definitions/ultimaker_original.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index f445057860..1dbdb95d8c 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -4,6 +4,7 @@ "name": "Ultimaker Original", "inherits": "ultimaker", "metadata": { + "visible": true, "author": "Ultimaker", "manufacturer": "Ultimaker", "category": "Ultimaker", From f349221fa6ffa48045ddee4b69fef19cffb24cd2 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 25 May 2016 14:56:05 +0200 Subject: [PATCH 374/424] Make simple mode extruder selection work with settings_rework CURA-1278 & CURA-790 --- resources/qml/SidebarSimple.qml | 67 ++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 9c68c2ef81..56ceb39b18 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -268,15 +268,13 @@ Item function populateExtruderModel() { -// extruderModel.clear() -// var extruder_count = UM.MachineManager.getSettingValue("machine_extruder_count"); -// for(var extruder = 0; extruder < extruder_count ; extruder++) { -// extruderModel.append({ -// name: catalog.i18nc("@label", "Extruder %1").arg(extruder), -// text: catalog.i18nc("@label", "Extruder %1").arg(extruder), -// value: extruder -// }) -// } + extruderModel.clear(); + for(var extruder = 0; extruder < machineExtruderCount.properties.value ; extruder++) { + print(catalog.i18nc("@label", "Extruder %1").arg(extruder)); + extruderModel.append({ + text: catalog.i18nc("@label", "Extruder %1").arg(extruder) + }) + } } Rectangle { @@ -286,8 +284,7 @@ Item anchors.left: parent.left width: parent.width height: childrenRect.height - // Use both UM.ActiveProfile and UM.MachineManager to force UM.MachineManager.getSettingValue() to be reevaluated -// visible: UM.ActiveProfile.settingValues.getValue("machine_extruder_count") || (UM.MachineManager.getSettingValue("machine_extruder_count") > 1) + visible: machineExtruderCount.properties.value > 1 Label { id: mainExtruderLabel @@ -305,9 +302,9 @@ Item anchors.top: parent.top anchors.left: supportExtruderLabel.right style: UM.Theme.styles.combobox -// currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("extruder_nr") : 0 + currentIndex: mainExtruderNr.properties.value onActivated: { -// UM.MachineManager.setSettingValue("extruder_nr", index) + mainExtruderNr.setPropertyValue("value", index) } } @@ -328,9 +325,9 @@ Item anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: supportExtruderLabel.right style: UM.Theme.styles.combobox -// currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_extruder_nr") : 0 + currentIndex: supportExtruderNr.properties.value onActivated: { - UM.MachineManager.setSettingValue("support_extruder_nr", index) + supportExtruderNr.setPropertyValue("value", index) } } @@ -338,12 +335,12 @@ Item id: extruderModel Component.onCompleted: populateExtruderModel() } -// Connections -// { -// id: machineChange -// target: UM.MachineManager -// onActiveMachineInstanceChanged: populateExtruderModel() -// } + Connections + { + id: machineChange + target: Cura.MachineManager + onGlobalContainerChanged: populateExtruderModel() + } } Rectangle { @@ -400,4 +397,32 @@ Item watchedProperties: [ "value" ] storeIndex: 0 } + + UM.SettingPropertyProvider + { + id: machineExtruderCount + + containerStackId: Cura.MachineManager.activeMachineId + key: "machine_extruder_count" + watchedProperties: [ "value" ] + storeIndex: 0 + } + UM.SettingPropertyProvider + { + id: supportExtruderNr + + containerStackId: Cura.MachineManager.activeMachineId + key: "support_extruder_nr" + watchedProperties: [ "value" ] + storeIndex: 0 + } + UM.SettingPropertyProvider + { + id: mainExtruderNr + + containerStackId: Cura.MachineManager.activeMachineId + key: "extruder_nr" + watchedProperties: [ "value" ] + storeIndex: 0 + } } From 6305c70820f19dc3aa29cadc314655cdb78b3635 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 25 May 2016 15:12:56 +0200 Subject: [PATCH 375/424] Remove old version of FDM printer base file --- resources/machines/fdmprinter.json | 2403 ---------------------------- 1 file changed, 2403 deletions(-) delete mode 100644 resources/machines/fdmprinter.json diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json deleted file mode 100644 index c85c46f786..0000000000 --- a/resources/machines/fdmprinter.json +++ /dev/null @@ -1,2403 +0,0 @@ -{ - "id": "fdmprinter", - "visible": false, - "version": 1, - "name": "FDM Printer Base Description", - "author": "Ultimaker B.V.", - "manufacturer": "Ultimaker", - "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", - - "add_pages": [], - - "machine_settings": { - "machine_show_variants": { - "description": "Wether to show the different variants of this machine, which are described in separate json files.", - "default": false - }, - "machine_start_gcode": { - "description": "Gcode commands to be executed at the very start - separated by \\n.", - "default": "G28 ; Home\nG1 Z15.0 F6000 ;move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0", - "global_only": true - }, - "machine_end_gcode": { - "description": "Gcode commands to be executed at the very end - separated by \\n.", - "default": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84", - "global_only": true - }, - "material_bed_temp_wait": { - "description": "Whether to insert a command to wait until the bed temperature is reached at the start.", - "default": true, - "global_only": true - }, - "material_print_temp_wait": { - "description": "Whether to insert a command to wait until the nozzle temperatures are reached at the start.", - "default": true, - "global_only": true - }, - "material_print_temp_prepend": { - "description": "Whether to include nozzle temperature commands at the start of the gcode. When the start_gcode already contains nozzle temperature commands Cura frontend will automatically disable this setting.", - "default": true, - "global_only": true - }, - "material_bed_temp_prepend": { - "description": "Whether to include bed temperature commands at the start of the gcode. When the start_gcode already contains bed temperature commands Cura frontend will automatically disable this setting.", - "default": true, - "global_only": true - }, - "machine_width": { - "description": "The width (X-direction) of the printable area.", - "default": 100, - "global_only": true - }, - "machine_depth": { - "description": "The depth (Y-direction) of the printable area.", - "default": 100, - "global_only": true - }, - "machine_height": { - "description": "The height (Z-direction) of the printable area.", - "default": 100, - "global_only": true - }, - "machine_heated_bed": { - "description": "Whether the machine has a heated bed present.", - "default": false, - "global_only": true - }, - "machine_center_is_zero": { - "description": "Whether the X/Y coordinates of the zero position of the printer is at the center of the printable area.", - "default": false, - "global_only": true - }, - "machine_extruder_count": { - "description": "Number of extruder trains. An extruder train is the combination of a feeder, bowden tube, and nozzle.", - "default": 1, - "global_only": true - }, - "machine_nozzle_tip_outer_diameter": { - "description": "The outer diameter of the tip of the nozzle.", - "default": 1, - "SEE_machine_extruder_trains": true, - "global_only": true - }, - "machine_nozzle_head_distance": { - "description": "The height difference between the tip of the nozzle and the lowest part of the print head.", - "default": 3, - "SEE_machine_extruder_trains": true, - "global_only": true - }, - "machine_nozzle_expansion_angle": { - "description": "The angle between the horizontal plane and the conical part right above the tip of the nozzle.", - "default": 45, - "SEE_machine_extruder_trains": true, - "global_only": true - }, - "machine_heat_zone_length": { - "description": "The distance from the tip of the nozzle in which heat from the nozzle is transfered to the filament.", - "default": 16, - "SEE_machine_extruder_trains": true, - "global_only": true - }, - "machine_nozzle_heat_up_speed": { - "description": "The speed (°C/s) by which the nozzle heats up averaged over the window of normal printing temperatures and the standby temperature.", - "default": 2.0, - "SEE_machine_extruder_trains": true, - "global_only": true - }, - "machine_nozzle_cool_down_speed": { - "description": "The speed (°C/s) by which the nozzle cools down averaged over the window of normal printing temperatures and the standby temperature.", - "default": 2.0, - "SEE_machine_extruder_trains": true, - "global_only": true - }, - "machine_gcode_flavor": { - "description": "The type of gcode to be generated.", - "default": "RepRap", - "global_only": true - }, - "machine_disallowed_areas": { - "description": "A list of polygons with areas the print head is not allowed to enter.", - "type": "polygons", - "default": [], - "global_only": true - }, - "machine_head_polygon": { - "description": "A 2D silhouette of the print head (fan caps excluded).", - "type": "polygon", - "default": [ - [ - -1, - 1 - ], - [ - -1, - -1 - ], - [ - 1, - -1 - ], - [ - 1, - 1 - ] - ], - "global_only": true - }, - "machine_head_with_fans_polygon": { - "description": "A 2D silhouette of the print head (fan caps included).", - "type": "polygon", - "default": [ - [ - -20, - 10 - ], - [ - 10, - 10 - ], - [ - 10, - -10 - ], - [ - -20, - -10 - ] - ], - "global_only": true - }, - "gantry_height": { - "description": "The height difference between the tip of the nozzle and the gantry system (X and Y axes).", - "default": 99999999999, - "global_only": true - } - }, - "categories": { - "machine": { - "label": "Machine", - "visible": true, - "icon": "category_machine", - "settings": { - "machine_nozzle_size": { - "label": "Nozzle Diameter", - "description": "The inner diameter of the nozzle. Change this setting when using a non-standard nozzle size.", - "unit": "mm", - "type": "float", - "default": 0.4, - "min_value": "0.001", - "max_value_warning": "10", - "visible": false - } - }, - "global_only": true - }, - "resolution": { - "label": "Quality", - "visible": true, - "icon": "category_layer_height", - "settings": { - "layer_height": { - "label": "Layer Height", - "description": "The height of each layer in mm. Higher values produce faster prints in lower resolution, lower values produce slower prints in higher resolution.", - "unit": "mm", - "type": "float", - "default": 0.1, - "min_value": "0.001", - "min_value_warning": "0.04", - "max_value_warning": "0.8 * machine_nozzle_size", - "global_only": "True" - }, - "layer_height_0": { - "label": "Initial Layer Height", - "description": "The height of the initial layer in mm. A thicker initial layer makes adhesion to the build plate easier.", - "unit": "mm", - "type": "float", - "default": 0.3, - "min_value": "0.001", - "min_value_warning": "0.04", - "max_value_warning": "0.8 * machine_nozzle_size", - "visible": false, - "global_only": "True" - }, - "line_width": { - "label": "Line Width", - "description": "Width of a single line. Generally, the width of each line should correspond to the width of the nozzle. However, slightly reducing this value could produce better prints.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "2 * machine_nozzle_size", - "default": 0.4, - "type": "float", - "visible": false, - "inherit_function": "machine_nozzle_size", - "children": { - "wall_line_width": { - "label": "Wall Line Width", - "description": "Width of a single wall line.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false, - "children": { - "wall_line_width_0": { - "label": "Outer Wall Line Width", - "description": "Width of the outermost wall line. By lowering this value, higher levels of detail can be printed.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false - }, - "wall_line_width_x": { - "label": "Inner Wall(s) Line Width", - "description": "Width of a single wall line for all wall lines except the outermost one.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false - } - } - }, - "skin_line_width": { - "label": "Top/bottom Line Width", - "description": "Width of a single top/bottom line.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false - }, - "infill_line_width": { - "label": "Infill Line Width", - "description": "Width of a single infill line.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false - }, - "skirt_line_width": { - "label": "Skirt Line Width", - "description": "Width of a single skirt line.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false, - "global_only": true - }, - "support_line_width": { - "label": "Support Line Width", - "description": "Width of a single support structure line.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false, - "enabled": "support_enable", - "global_only": true - }, - "support_roof_line_width": { - "label": "Support Roof Line Width", - "description": "Width of a single support roof line.", - "unit": "mm", - "default": 0.4, - "min_value": "0.0001", - "max_value_warning": "machine_nozzle_size * 2", - "type": "float", - "visible": false, - "enabled": "support_roof_enable", - "global_only": true - } - } - } - } - }, - "shell": { - "label": "Shell", - "visible": true, - "icon": "category_shell", - "settings": { - "wall_thickness": { - "label": "Wall Thickness", - "description": "The thickness of the outside walls in the horizontal direction. This value divided by the wall line width defines the number of walls.", - "unit": "mm", - "default": 0.8, - "min_value": "0", - "min_value_warning": "line_width", - "max_value_warning": "5 * line_width", - "type": "float", - "visible": true, - "children": { - "wall_line_count": { - "label": "Wall Line Count", - "description": "The number of walls. When calculated by the wall thickness, this value is rounded to a whole number.", - "default": 2, - "min_value": "0", - "type": "int", - "visible": false, - "inherit_function": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" - } - } - }, - "top_bottom_thickness": { - "label": "Top/Bottom Thickness", - "description": "The thickness of the top/bottom layers in the print. This value divided by the layer height defines the number of top/bottom layers.", - "unit": "mm", - "default": 0.8, - "min_value": "0", - "max_value": "5", - "min_value_warning": "0.6", - "type": "float", - "visible": true, - "children": { - "top_thickness": { - "label": "Top Thickness", - "description": "The thickness of the top layers in the print. This value divided by the layer height defines the number of top layers.", - "unit": "mm", - "default": 0.8, - "min_value": "0", - "max_value_warning": "100", - "type": "float", - "visible": false, - "children": { - "top_layers": { - "label": "Top Layers", - "description": "The number of top layers. When calculated by the top thickness, this value is rounded to a whole number.", - "default": 8, - "min_value": "0", - "max_value_warning": "100", - "type": "int", - "visible": false, - "inherit_function": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" - } - } - }, - "bottom_thickness": { - "label": "Bottom Thickness", - "description": "The thickness of the bottom layers in the print. This value divided by the layer height defines the number of bottom layers.", - "unit": "mm", - "default": 0.6, - "min_value": "0", - "type": "float", - "visible": false, - "children": { - "bottom_layers": { - "label": "Bottom Layers", - "description": "The number of bottom layers. When calculated by the bottom thickness, this value is rounded to a whole number.", - "min_value": "0", - "default": 6, - "type": "int", - "visible": false, - "inherit_function": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" - } - } - } - } - }, - "top_bottom_pattern": { - "label": "Top/Bottom Pattern", - "description": "The pattern of the top/bottom layers.", - "type": "enum", - "options": { - "lines": "Lines", - "concentric": "Concentric", - "zigzag": "Zig Zag" - }, - "default": "lines", - "visible": false - }, - "wall_0_inset": { - "label": "Outer Wall Inset", - "description": "Inset applied to the path of the outer wall. If the outer wall is smaller than the nozzle, and printed after the inner walls, use this offset to get the hole in the nozzle to overlap with the inner walls instead of the outside of the object.", - "unit": "mm", - "type": "float", - "default": 0.0, - "inherit_function": "(machine_nozzle_size - wall_line_width_0) / 2 if wall_line_width_0 < machine_nozzle_size else 0", - "min_value_warning": "0", - "max_value_warning": "machine_nozzle_size", - "visible": false - }, - "alternate_extra_perimeter": { - "label": "Alternate Extra Wall", - "description": "Prints an extra wall at every other layer. This way infill gets caught between these extra walls, resulting in stronger prints.", - "type": "boolean", - "default": false, - "visible": false, - "inherit": false - }, - "travel_compensate_overlapping_walls_enabled": { - "label": "Compensate Wall Overlaps", - "description": "Compensate the flow for parts of a wall being printed where there is already a wall in place.", - "type": "boolean", - "default": true, - "visible": false, - "children": { - "travel_compensate_overlapping_walls_0_enabled": { - "label": "Compensate Outer Wall Overlaps", - "description": "Compensate the flow for parts of an outer wall being printed where there is already a wall in place.", - "type": "boolean", - "default": true, - "visible": false, - "inherit_function": "parent_value" - }, - "travel_compensate_overlapping_walls_x_enabled": { - "label": "Compensate Inner Wall Overlaps", - "description": "Compensate the flow for parts of an inner wall being printed where there is already a wall in place.", - "type": "boolean", - "default": true, - "visible": false, - "inherit_function": "parent_value" - } - } - }, - "xy_offset": { - "label": "Horizontal Expansion", - "description": "Amount of offset applied to all polygons in each layer. Positive values can compensate for too big holes; negative values can compensate for too small holes.", - "unit": "mm", - "type": "float", - "min_value_warning": "-10", - "max_value_warning": "10", - "default": 0, - "visible": false - }, - "z_seam_type": { - "label": "Z Seam Alignment", - "description": "Starting point of each path in a layer. When paths in consecutive layers start at the same point a vertical seam may show on the print. When aligning these at the back, the seam is easiest to remove. When placed randomly the inaccuracies at the paths' start will be less noticeable. When taking the shortest path the print will be quicker.", - "type": "enum", - "options": { - "back": "Back", - "shortest": "Shortest", - "random": "Random" - }, - "default": "shortest", - "visible": false - }, - "skin_no_small_gaps_heuristic": { - "label": "Ignore Small Z Gaps", - "description": "When the model has small vertical gaps, about 5% extra computation time can be spent on generating top and bottom skin in these narrow spaces. In such case, disable the setting.", - "type": "boolean", - "default": true, - "visible": false - } - } - }, - "infill": { - "label": "Infill", - "visible": true, - "icon": "category_infill", - "settings": { - "infill_sparse_density": { - "label": "Infill Density", - "description": "Adjusts the density of infill of the print.", - "unit": "%", - "type": "float", - "default": 20, - "min_value": "0", - "max_value_warning": "100", - "children": { - "infill_line_distance": { - "label": "Infill Line Distance", - "description": "Distance between the printed infill lines. This setting is calculated by the infill density and the infill line width.", - "unit": "mm", - "type": "float", - "default": 2, - "min_value": "0", - "visible": false, - "inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" - } - } - }, - "infill_pattern": { - "label": "Infill Pattern", - "description": "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, triangle and concentric patterns are fully printed every layer.", - "type": "enum", - "visible": false, - "options": { - "grid": "Grid", - "lines": "Lines", - "triangles": "Triangles", - "concentric": "Concentric", - "zigzag": "Zig Zag" - }, - "default": "grid", - "inherit_function": "'lines' if infill_sparse_density > 25 else 'grid'" - }, - "infill_overlap": { - "label": "Infill Overlap Percentage", - "description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.", - "unit": "%", - "type": "float", - "default": 10, - "inherit_function": "10 if infill_sparse_density < 95 and infill_pattern != \"concentric\" else 0", - "min_value_warning": "-50", - "max_value_warning": "100", - "visible": false, - "enabled": "infill_pattern != \"concentric\"", - "children": { - "infill_overlap_mm": { - "label": "Infill Overlap", - "description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.", - "unit": "mm", - "type": "float", - "default": 0.04, - "min_value_warning": "-0.5 * machine_nozzle_size", - "max_value_warning": "machine_nozzle_size", - "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 and infill_pattern != \"concentric\" else 0", - "visible": false, - "enabled": "infill_pattern != \"concentric\"" - } - } - }, - "skin_overlap": { - "label": "Skin Overlap Percentage", - "description": "The amount of overlap between the skin and the walls. A slight overlap allows the walls to connect firmly to the skin.", - "unit": "%", - "type": "float", - "default": 5, - "min_value_warning": "-50", - "max_value_warning": "100", - "inherit_function": "5 if top_bottom_pattern != \"concentric\" else 0", - "visible": false, - "enabled": "top_bottom_pattern != \"concentric\"", - "children": { - "skin_overlap_mm": { - "label": "Skin Overlap", - "description": "The amount of overlap between the skin and the walls. A slight overlap allows the walls to connect firmly to the skin.", - "unit": "mm", - "type": "float", - "default": 0.02, - "min_value_warning": "-0.5 * machine_nozzle_size", - "max_value_warning": "machine_nozzle_size", - "inherit_function": "skin_line_width * parent_value / 100 if top_bottom_pattern != \"concentric\" else 0", - "visible": false, - "enabled": "top_bottom_pattern != \"concentric\"" - } - } - }, - "infill_wipe_dist": { - "label": "Infill Wipe Distance", - "description": "Distance of a travel move inserted after every infill line, to make the infill stick to the walls better. This option is similar to infill overlap, but without extrusion and only on one end of the infill line.", - "unit": "mm", - "type": "float", - "default": 0.04, - "inherit_function": "wall_line_width_0 / 4 if wall_line_count == 1 else wall_line_width_x / 4", - "min_value_warning": "0", - "max_value_warning": "machine_nozzle_size", - "visible": false - }, - "infill_sparse_thickness": { - "label": "Infill Layer Thickness", - "description": "The thickness per layer of infill material. This value should always be a multiple of the layer height and is otherwise rounded.", - "unit": "mm", - "type": "float", - "default": 0.1, - "min_value": "0.0001", - "max_value_warning": "0.32", - "max_value": "layer_height * 8", - "visible": false, - "inherit_function": "layer_height" - }, - "infill_before_walls": { - "label": "Infill Before Walls", - "description": "Print the infill before printing the walls. Printing the walls first may lead to more accurate walls, but overhangs print worse. Printing the infill first leads to sturdier walls, but the infill pattern might sometimes show through the surface.", - "type": "boolean", - "default": true, - "visible": false - } - } - }, - "material": { - "label": "Material", - "visible": true, - "icon": "category_material", - "settings": { - "material_flow_dependent_temperature": { - "label": "Auto Temperature", - "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", - "type": "boolean", - "default": false, - "visible": false, - "enabled": "False", - "global_only": true - }, - "material_print_temperature": { - "label": "Printing Temperature", - "description": "The temperature used for printing. Set at 0 to pre-heat the printer manually.", - "unit": "°C", - "type": "float", - "default": 210, - "min_value": "0", - "max_value_warning": "260", - "enabled": "not (material_flow_dependent_temperature)" - }, - "material_flow_temp_graph": { - "label": "Flow Temperature Graph", - "description": "Data linking material flow (in mm3 per second) to temperature (degrees Celsius).", - "unit": "", - "type": "string", - "default": "[[3.5,200],[7.0,240]]", - "enabled": "False", - "enabled_before_removal": "material_flow_dependent_temperature", - "global_only": true - }, - "material_extrusion_cool_down_speed": { - "label": "Extrusion Cool Down Speed Modifier", - "description": "The extra speed by which the nozzle cools while extruding. The same value is used to signify the heat up speed lost when heating up while extruding.", - "unit": "°C/s", - "type": "float", - "default": 0.5, - "min_value": "0", - "max_value_warning": "10.0", - "global_only": "True", - "enabled": "False", - "enabled_before_removal": "material_flow_dependent_temperature or machine_extruder_count > 1", - "visible": false - }, - "material_bed_temperature": { - "label": "Bed Temperature", - "description": "The temperature used for the heated bed. Set at 0 to pre-heat the printer manually.", - "unit": "°C", - "type": "float", - "default": 60, - "min_value": "0", - "max_value_warning": "260", - "enabled": "machine_heated_bed", - "global_only": "True" - }, - "material_diameter": { - "label": "Diameter", - "description": "Adjusts the diameter of the filament used. Match this value with the diameter of the used filament.", - "unit": "mm", - "type": "float", - "default": 2.85, - "min_value": "0.0001", - "min_value_warning": "0.4", - "max_value_warning": "3.5", - "global_only": "True" - }, - "material_flow": { - "label": "Flow", - "description": "Flow compensation: the amount of material extruded is multiplied by this value.", - "unit": "%", - "default": 100, - "type": "float", - "min_value": "5", - "min_value_warning": "50", - "max_value_warning": "150" - }, - "retraction_enable": { - "label": "Enable Retraction", - "description": "Retract the filament when the nozzle is moving over a non-printed area. ", - "type": "boolean", - "default": true, - "visible": true - }, - "retraction_amount": { - "label": "Retraction Distance", - "description": "The length of material retracted during a retraction move.", - "unit": "mm", - "type": "float", - "default": 6.5, - "min_value_warning": "-0.0001", - "max_value_warning": "10.0", - "visible": false, - "inherit": false, - "enabled": "retraction_enable" - }, - "retraction_speed": { - "label": "Retraction Speed", - "description": "The speed at which the filament is retracted and primed during a retraction move.", - "unit": "mm/s", - "type": "float", - "default": 25, - "min_value": "0", - "max_value": "299792458000", - "max_value_warning": "100", - "visible": false, - "inherit": false, - "enabled": "retraction_enable", - "children": { - "retraction_retract_speed": { - "label": "Retraction Retract Speed", - "description": "The speed at which the filament is retracted during a retraction move.", - "unit": "mm/s", - "type": "float", - "default": 25, - "min_value": "0", - "max_value": "299792458000", - "max_value_warning": "100", - "visible": false, - "enabled": "retraction_enable" - }, - "retraction_prime_speed": { - "label": "Retraction Prime Speed", - "description": "The speed at which the filament is primed during a retraction move.", - "unit": "mm/s", - "type": "float", - "default": 25, - "min_value": "0", - "max_value": "299792458000", - "max_value_warning": "100", - "visible": false, - "enabled": "retraction_enable" - } - } - }, - "retraction_extra_prime_amount": { - "label": "Retraction Extra Prime Amount", - "description": "Some material can ooze away during a travel move, which can be compensated for here.", - "unit": "mm³", - "type": "float", - "default": 0, - "min_value_warning": "-0.0001", - "max_value_warning": "5.0", - "visible": false, - "inherit": false, - "enabled": "retraction_enable" - }, - "retraction_min_travel": { - "label": "Retraction Minimum Travel", - "description": "The minimum distance of travel needed for a retraction to happen at all. This helps to get fewer retractions in a small area.", - "unit": "mm", - "type": "float", - "default": 1.5, - "inherit_function": "line_width * 2", - "min_value": "0", - "max_value_warning": "10", - "visible": false, - "inherit": false, - "enabled": "retraction_enable" - }, - "retraction_count_max": { - "label": "Maximum Retraction Count", - "description": "This setting limits the number of retractions occurring within the minimum extrusion distance window. Further retractions within this window will be ignored. This avoids retracting repeatedly on the same piece of filament, as that can flatten the filament and cause grinding issues.", - "default": 45, - "min_value": "0", - "max_value_warning": "100", - "type": "int", - "visible": false, - "inherit": false, - "enabled": "retraction_enable" - }, - "retraction_extrusion_window": { - "label": "Minimum Extrusion Distance Window", - "description": "The window in which the maximum retraction count is enforced. This value should be approximately the same as the retraction distance, so that effectively the number of times a retraction passes the same patch of material is limited.", - "unit": "mm", - "type": "float", - "default": 4.5, - "min_value": "0", - "max_value_warning": "retraction_amount * 2", - "visible": false, - "inherit_function": "retraction_amount", - "enabled": "retraction_enable" - }, - "retraction_hop": { - "label": "Z Hop when Retracting", - "description": "Whenever a retraction is done, the build plate is lowered to create clearance between the nozzle and the print. It prevents the nozzle from hitting the print during travel moves, reducing the chance to knock the print from the build plate.", - "unit": "mm", - "type": "float", - "default": 0, - "min_value_warning": "-0.0001", - "max_value_warning": "10", - "visible": false, - "inherit": false, - "enabled": "retraction_enable" - } - } - }, - "speed": { - "label": "Speed", - "visible": true, - "icon": "category_speed", - "settings": { - "speed_print": { - "label": "Print Speed", - "description": "The speed at which printing happens.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value_warning": "150", - "max_value": "299792458000", - "default": 60, - "children": { - "speed_infill": { - "label": "Infill Speed", - "description": "The speed at which infill is printed.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "default": 60, - "visible": false - }, - "speed_wall": { - "label": "Wall Speed", - "description": "The speed at which the walls are printed.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "default": 30, - "visible": false, - "inherit_function": "parent_value / 2", - "children": { - "speed_wall_0": { - "label": "Outer Wall Speed", - "description": "The speed at which the outermost walls are printed. Printing the outer wall at a lower speed improves the final skin quality. However, having a large difference between the inner wall speed and the outer wall speed will effect quality in a negative way.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "default": 30, - "visible": false - }, - "speed_wall_x": { - "label": "Inner Wall Speed", - "description": "The speed at which all inner walls are printed Printing the inner wall faster than the outer wall will reduce printing time. It works well to set this in between the outer wall speed and the infill speed.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "default": 60, - "visible": false, - "inherit_function": "parent_value * 2" - } - } - }, - "speed_topbottom": { - "label": "Top/Bottom Speed", - "description": "The speed at which top/bottom layers are printed.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "default": 30, - "visible": false, - "inherit_function": "parent_value / 2" - }, - "speed_support": { - "label": "Support Speed", - "description": "The speed at which the support structure is printed. Printing support at higher speeds can greatly reduce printing time. The surface quality of the support structure is not important since it is removed after printing.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "default": 60, - "visible": false, - "inherit_function": "speed_print", - "enabled": "support_roof_enable", - "children": { - "speed_support_infill": { - "label": "Support Infill Speed", - "description": "The speed at which the infill of support is printed. Printing the infill at lower speeds improves stability.", - "unit": "mm/s", - "type": "float", - "default": 60, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "visible": false, - "inherit": true, - "enabled": "support_enable", - "global_only": true - }, - "speed_support_roof": { - "label": "Support Roof Speed", - "description": "The speed at which the roofs of support are printed. Printing the support roof at lower speeds can improve overhang quality.", - "unit": "mm/s", - "type": "float", - "default": 40, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "visible": false, - "enabled": "support_roof_enable", - "inherit_function": "parent_value / 1.5", - "global_only": true - } - } - } - } - }, - "speed_travel": { - "label": "Travel Speed", - "description": "The speed at which travel moves are made.", - "unit": "mm/s", - "type": "float", - "default": 120, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "300", - "inherit_function": "speed_print if magic_spiralize else 120", - "global_only": true - }, - "speed_layer_0": { - "label": "Initial Layer Speed", - "description": "The print speed for the initial layer. A lower value is advised to improve adhesion to the build plate.", - "unit": "mm/s", - "type": "float", - "default": 30, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "300", - "visible": false - }, - "skirt_speed": { - "label": "Skirt Speed", - "description": "The speed at which the skirt and brim are printed. Normally this is done at the initial layer speed, but sometimes you might want to print the skirt at a different speed.", - "unit": "mm/s", - "type": "float", - "default": 30, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "300", - "visible": false, - "inherit_function": "speed_layer_0", - "global_only": true - }, - "speed_slowdown_layers": { - "label": "Number of Slower Layers", - "description": "The first few layers are printed slower than the rest of the object, to get better adhesion to the build plate and improve the overall success rate of prints. The speed is gradually increased over these layers.", - "type": "int", - "default": 2, - "min_value": "0", - "max_value": "299792458000", - "max_value_warning": "300", - "visible": false, - "global_only": true - } - } - }, - "travel": { - "label": "Travel", - "visible": true, - "icon": "category_travel", - "settings": { - "retraction_combing": { - "label": "Combing Mode", - "description": "Combing keeps the nozzle within already printed areas when traveling. This results in slightly longer travel moves but reduces the need for retractions. If combing is off, the material will retract and the nozzle moves in a straight line to the next point. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only.", - "type": "enum", - "options": { - "off": "Off", - "all": "All", - "noskin": "No Skin" - }, - "default": "all", - "visible": false, - "global_only": true - }, - "travel_avoid_other_parts": { - "label": "Avoid Printed Parts when Traveling", - "description": "The nozzle avoids already printed parts when traveling. This option is only available when combing is enabled.", - "type": "boolean", - "default": true, - "visible": false, - "enabled": "retraction_combing != \"off\"", - "global_only": "True" - }, - "travel_avoid_distance": { - "label": "Travel Avoid Distance", - "description": "The distance between the nozzle and already printed parts when avoiding during travel moves.", - "unit": "mm", - "type": "float", - "default": 1.5, - "inherit_function": "machine_nozzle_tip_outer_diameter / 2 * 1.25", - "min_value": "0", - "max_value_warning": "machine_nozzle_tip_outer_diameter * 5", - "visible": false, - "inherit": false, - "enabled": "retraction_combing != \"off\" and travel_avoid_other_parts", - "global_only": "True" - } - } - }, - "cooling": { - "label": "Cooling", - "visible": true, - "icon": "category_cool", - "settings": { - "cool_fan_enabled": { - "label": "Enable Cooling Fans", - "description": "Enables the cooling fans while printing. The fans improve print quality on layers with short layer times and bridging / overhangs.", - "type": "boolean", - "default": true, - "global_only": "True" - }, - "cool_fan_speed": { - "label": "Fan Speed", - "description": "The speed at which the cooling fans spin.", - "unit": "%", - "type": "float", - "min_value": "0", - "max_value": "100", - "default": 100, - "visible": false, - "inherit_function": "100.0 if cool_fan_enabled else 0.0", - "enabled": "cool_fan_enabled", - "global_only": "True", - "children": { - "cool_fan_speed_min": { - "label": "Regular Fan Speed", - "description": "The speed at which the fans spin before hitting the threshold. When a layer prints faster than the threshold, the fan speed gradually inclines towards the maximum fan speed.", - "unit": "%", - "type": "float", - "min_value": "0", - "max_value": "100", - "inherit_function": "parent_value", - "default": 100, - "visible": false, - "enabled": "cool_fan_enabled", - "global_only": "True" - }, - "cool_fan_speed_max": { - "label": "Maximum Fan Speed", - "description": "The speed at which the fans spin on the minimum layer time. The fan speed gradually increases between the regular fan speed and maximum fan speed when the threshold is hit.", - "unit": "%", - "type": "float", - "min_value": "max(0, cool_fan_speed_min)", - "max_value": "100", - "default": 100, - "visible": false, - "enabled": "cool_fan_enabled", - "global_only": "True" - } - } - }, - "cool_min_layer_time_fan_speed_max": { - "label": "Regular/Maximum Fan Speed Threshold", - "description": "The layer time which sets the threshold between regular fan speed and maximum fan speed. Layers that print slower than this time use regular fan speed. For faster layers the fan speed gradually increases towards the maximum fan speed.", - "unit": "sec", - "type": "float", - "default": 10, - "min_value": "cool_min_layer_time", - "max_value_warning": "600", - "visible": false, - "global_only": "True" - }, - "cool_fan_full_at_height": { - "label": "Regular Fan Speed at Height", - "description": "The height at which the fans spin on regular fan speed. At the layers below the fan speed gradually increases from zero to regular fan speed.", - "unit": "mm", - "type": "float", - "default": 0.5, - "inherit_function": "layer_height_0", - "min_value": "0", - "max_value_warning": "10.0", - "visible": false, - "global_only": "True", - "children": { - "cool_fan_full_layer": { - "label": "Regular Fan Speed at Layer", - "description": "The layer at which the fans spin on regular fan speed. If regular fan speed at height is set, this value is calculated and rounded to a whole number.", - "type": "int", - "default": 1, - "min_value": "0", - "max_value_warning": "100", - "visible": false, - "inherit_function": "max(0, int(round((parent_value - layer_height_0) / layer_height, 0)))", - "global_only": "True" - } - } - }, - "cool_min_layer_time": { - "label": "Minimum Layer Time", - "description": "The minimum time spent in a layer. This forces the printer to slow down, to at least spend the time set here in one layer. This allows the printed material to cool down properly before printing the next layer.", - "unit": "sec", - "type": "float", - "default": 5, - "min_value": "0", - "max_value_warning": "600", - "visible": false, - "global_only": "True" - }, - "cool_min_speed": { - "label": "Minimum Speed", - "description": "The minimum print speed, despite slowing down due to the minimum layer time. When the printer would slow down too much, the pressure in the nozzle would be too low and result in bad print quality.", - "unit": "mm/s", - "type": "float", - "default": 10, - "min_value": "0", - "max_value_warning": "100", - "visible": false, - "global_only": "True" - }, - "cool_lift_head": { - "label": "Lift Head", - "description": "When the minimum speed is hit because of minimum layer time, lift the head away from the print and wait the extra time until the minimum layer time is reached.", - "type": "boolean", - "default": false, - "visible": false, - "global_only": "True" - } - } - }, - "support": { - "label": "Support", - "visible": true, - "icon": "category_support", - "settings": { - "support_enable": { - "label": "Enable Support", - "description": "Enable support structures. These structures support parts of the model with severe overhangs.", - "type": "boolean", - "default": false - }, - "support_type": { - "label": "Support Placement", - "description": "Adjusts the placement of the support structures. The placement can be set to touching build plate or everywhere. When set to everywhere the support structures will also be printed on the model.", - "type": "enum", - "options": { - "buildplate": "Touching Buildplate", - "everywhere": "Everywhere" - }, - "default": "everywhere", - "enabled": "support_enable" - }, - "support_angle": { - "label": "Support Overhang Angle", - "description": "The minimum angle of overhangs for which support is added. At a value of 0° all overhangs are supported, 90° will not provide any support.", - "unit": "°", - "type": "float", - "min_value": "0", - "max_value": "90", - "default": 50, - "visible": false, - "enabled": "support_enable" - }, - "support_pattern": { - "label": "Support Pattern", - "description": "The pattern of the support structures of the print. The different options available result in sturdy or easy to remove support.", - "type": "enum", - "options": { - "lines": "Lines", - "grid": "Grid", - "triangles": "Triangles", - "concentric": "Concentric", - "zigzag": "Zig Zag" - }, - "default": "zigzag", - "visible": false, - "enabled": "support_enable", - "global_only": true - }, - "support_connect_zigzags": { - "label": "Connect Support ZigZags", - "description": "Connect the ZigZags. This will increase the strength of the zig zag support structure.", - "type": "boolean", - "default": true, - "visible": false, - "enabled": "support_enable and (support_pattern == \"zigzag\")", - "global_only": true - }, - "support_infill_rate": { - "label": "Support Density", - "description": "Adjusts the density of the support structure. A higher value results in better overhangs, but the supports are harder to remove.", - "unit": "%", - "type": "float", - "min_value": "0", - "max_value_warning": "100", - "default": 15, - "visible": false, - "enabled": "support_enable", - "global_only": true, - "children": { - "support_line_distance": { - "label": "Support Line Distance", - "description": "Distance between the printed support structure lines. This setting is calculated by the support density.", - "unit": "mm", - "type": "float", - "min_value": "0", - "default": 2.66, - "visible": false, - "enabled": "support_enable", - "inherit_function": "(support_line_width * 100) / parent_value * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", - "global_only": true - } - } - }, - "support_z_distance": { - "label": "Support Z Distance", - "description": "Distance from the top/bottom of the support structure to the print. This gap provides clearance to remove the supports after the model is printed. This value is rounded down to a multiple of the layer height.", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "10", - "default": 0.15, - "visible": false, - "enabled": "support_enable", - - "children": { - "support_top_distance": { - "label": "Support Top Distance", - "description": "Distance from the top of the support to the print.", - "unit": "mm", - "min_value": "0", - "max_value_warning": "10", - "default": 0.15, - "type": "float", - "visible": false, - "enabled": "support_enable" - }, - "support_bottom_distance": { - "label": "Support Bottom Distance", - "description": "Distance from the print to the bottom of the support.", - "unit": "mm", - "min_value": "0", - "max_value_warning": "10", - "default": 0.1, - "inherit_function": "0.1 if support_type == 'everywhere' else 0", - "type": "float", - "visible": false, - "enabled": "support_enable and support_type == 'everywhere'" - } - } - }, - "support_xy_distance": { - "label": "Support X/Y Distance", - "description": "Distance of the support structure from the print in the X/Y directions.", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "10", - "default": 0.7, - "visible": false, - "enabled": "support_enable" - }, - "support_xy_overrides_z": { - "label": "Support Distance Priority", - "description": "Whether the Support X/Y Distance overrides the Support Z Distance or vice versa. When X/Y overrides Z the X/Y distance can push away the support from the model, influencing the actual Z distance to the overhang. We can disable this by not applying the X/Y distance around overhangs.", - "type": "enum", - "options": { - "xy_overrides_z": "X/Y overrides Z", - "z_overrides_xy": "Z overrides X/Y" - }, - "default": "z_overrides_xy", - "visible": false, - "enabled": "support_enable" - }, - "support_xy_distance_overhang": { - "label": "Minimum Support X/Y Distance", - "description": "Distance of the support structure from the overhang in the X/Y directions. ", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "10", - "default": 0.2, - "visible": false, - "inherit_function": "machine_nozzle_size / 2", - "enabled": "support_enable and support_xy_overrides_z==\"z_overrides_xy\"" - }, - "support_bottom_stair_step_height": { - "label": "Support Stair Step Height", - "description": "The height of the steps of the stair-like bottom of support resting on the model. A low value makes the support harder to remove, but too high values can lead to unstable support structures.", - "unit": "mm", - "type": "float", - "default": 0.3, - "min_value": "0", - "max_value_warning": "1.0", - "visible": false, - "enabled": "support_enable" - }, - "support_join_distance": { - "label": "Support Join Distance", - "description": "The maximum distance between support structures in the X/Y directions. When seperate structures are closer together than this value, the structures merge into one.", - "unit": "mm", - "type": "float", - "default": 2.0, - "min_value_warning": "0", - "max_value_warning": "10", - "visible": false, - "enabled": "support_enable" - }, - "support_offset": { - "label": "Support Horizontal Expansion", - "description": "Amount of offset applied to all support polygons in each layer. Positive values can smooth out the support areas and result in more sturdy support.", - "unit": "mm", - "type": "float", - "default": 0.2, - "min_value_warning": "-0.5", - "max_value_warning": "5.0", - "visible": false, - "enabled": "support_enable" - }, - "support_area_smoothing": { - "label": "Support Area Smoothing", - "description": "Maximum distance in the X/Y directions of a line segment which is to be smoothed out. Ragged lines are introduced by the join distance and support bridge, which cause the machine to resonate. Smoothing the support areas won't cause them to break with the constraints, except it might change the overhang.", - "unit": "mm", - "type": "float", - "default": 0.6, - "min_value": "0", - "max_value_warning": "1.0", - "visible": false, - "enabled": "support_enable" - }, - "support_roof_enable": { - "label": "Enable Support Roof", - "description": "Generate a dense top skin at the top of the support on which the model is printed.", - "type": "boolean", - "default": false, - "visible": true, - "enabled": "support_enable" - }, - "support_roof_height": { - "label": "Support Roof Thickness", - "description": "The thickness of the support roofs.", - "unit": "mm", - "type": "float", - "default": 1, - "min_value": "0", - "max_value_warning": "10", - "visible": false, - "enabled": "support_roof_enable" - }, - "support_roof_density": { - "label": "Support Roof Density", - "description": "Adjusts the density of the roof of the support structure. A higher value results in better overhangs, but the supports are harder to remove.", - "unit": "%", - "type": "float", - "default": 100, - "min_value": "0", - "max_value_warning": "100", - "enabled":"support_roof_enable", - "global_only": true, - "children": { - "support_roof_line_distance": { - "label": "Support Roof Line Distance", - "description": "Distance between the printed support roof lines. This setting is calculated by the support roof Density, but can be adjusted separately.", - "unit": "mm", - "type": "float", - "default": 0.4, - "min_value": "0", - "visible": false, - "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", - "enabled": "support_roof_enable", - "global_only": true - } - } - }, - "support_roof_pattern": { - "label": "Support Roof Pattern", - "description": "The pattern with which the top of the support is printed.", - "type": "enum", - "visible": false, - "options": { - "lines": "Lines", - "grid": "Grid", - "triangles": "Triangles", - "concentric": "Concentric", - "zigzag": "Zig Zag" - }, - "default": "concentric", - "enabled": "support_roof_enable", - "global_only": true - }, - "support_use_towers": { - "label": "Use Towers", - "description": "Use specialized towers to support tiny overhang areas. These towers have a larger diameter than the region they support. Near the overhang the towers' diameter decreases, forming a roof.", - "type": "boolean", - "default": true, - "visible": false, - "enabled": "support_enable" - }, - "support_tower_diameter": { - "label": "Tower Diameter", - "description": "The diameter of a special tower.", - "unit": "mm", - "type": "float", - "default": 3.0, - "min_value": "0", - "max_value_warning": "10", - "visible": false, - "enabled": "support_enable and support_use_towers" - }, - "support_minimal_diameter": { - "label": "Minimum Diameter", - "description": "Minimum diameter in the X/Y directions of a small area which is to be supported by a specialized support tower.", - "unit": "mm", - "type": "float", - "default": 3.0, - "min_value": "0", - "max_value_warning": "10", - "max_value": "support_tower_diameter", - "inherit": true, - "visible": false, - "enabled": "support_enable and support_use_towers" - }, - "support_tower_roof_angle": { - "label": "Tower Roof Angle", - "description": "The angle of a rooftop of a tower. A higher value results in pointed tower roofs, a lower value results in flattened tower roofs.", - "unit": "°", - "type": "int", - "min_value": "0", - "max_value": "90", - "default": 65, - "visible": false, - "enabled": "support_enable and support_use_towers" - } - } - }, - "platform_adhesion": { - "label": "Platform Adhesion", - "visible": true, - "icon": "category_adhesion", - "settings": { - "adhesion_type": { - "label": "Platform Adhesion Type", - "description": "Different options that help to improve both priming your extrusion and adhesion to the build plate. Brim adds a single layer flat area around the base of your object to prevent warping. Raft adds a thick grid with a roof below the object. Skirt is a line printed around the object, but not connected to the model.", - "type": "enum", - "options": { - "skirt": "Skirt", - "brim": "Brim", - "raft": "Raft" - }, - "default": "brim", - "global_only": "True" - }, - "skirt_line_count": { - "label": "Skirt Line Count", - "description": "Multiple skirt lines help to prime your extrusion better for small objects. Setting this to 0 will disable the skirt.", - "type": "int", - "default": 1, - "min_value": "0", - "max_value_warning": "10", - "enabled": "adhesion_type == \"skirt\"", - "global_only": "True", - "visible": false - }, - "skirt_gap": { - "label": "Skirt Distance", - "description": "The horizontal distance between the skirt and the first layer of the print.\nThis is the minimum distance, multiple skirt lines will extend outwards from this distance.", - "unit": "mm", - "type": "float", - "default": 3, - "min_value_warning": "0", - "max_value_warning": "100", - "enabled": "adhesion_type == \"skirt\"", - "global_only": "True", - "visible": false - }, - "skirt_minimal_length": { - "label": "Skirt Minimum Length", - "description": "The minimum length of the skirt. If this length is not reached by the skirt line count, more skirt lines will be added until the minimum length is reached. Note: If the line count is set to 0 this is ignored.", - "unit": "mm", - "type": "float", - "default": 250, - "min_value": "0", - "min_value_warning": "25", - "max_value_warning": "2500", - "enabled": "adhesion_type == \"skirt\"", - "global_only": "True", - "visible": false - }, - "brim_width": { - "label": "Brim Width", - "description": "The distance from the model to the outermost brim line. A larger brim enhances adhesion to the build plate, but also reduces the effective print area.", - "type": "float", - "unit": "mm", - "default": 8.0, - "min_value": "0.0", - "max_value_warning": "100.0", - "enabled": "adhesion_type == \"brim\"", - "global_only": "True", - "visible": true, - "children": { - "brim_line_count": { - "label": "Brim Line Count", - "description": "The number of lines used for a brim. More brim lines enhance adhesion to the build plate, but also reduces the effective print area.", - "type": "int", - "default": 20, - "min_value": "0", - "max_value_warning": "300", - "inherit_function": "math.ceil(parent_value / skirt_line_width)", - "enabled": "adhesion_type == \"brim\"", - "global_only": "True", - "visible": false - } - } - }, - "raft_margin": { - "label": "Raft Extra Margin", - "description": "If the raft is enabled, this is the extra raft area around the object which is also given a raft. Increasing this margin will create a stronger raft while using more material and leaving less area for your print.", - "unit": "mm", - "type": "float", - "default": 5, - "min_value_warning": "0", - "max_value_warning": "10", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_airgap": { - "label": "Raft Air Gap", - "description": "The gap between the final raft layer and the first layer of the object. Only the first layer is raised by this amount to lower the bonding between the raft layer and the object. Makes it easier to peel off the raft.", - "unit": "mm", - "type": "float", - "default": 0.3, - "min_value": "0", - "max_value_warning": "1.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": true - }, - "layer_0_z_overlap": { - "label": "Initial Layer Z Overlap", - "description": "Make the first and second layer of the object overlap in the Z direction to compensate for the filament lost in the airgap. All models above the first model layer will be shifted down by this amount.", - "unit": "mm", - "type": "float", - "default": 0.22, - "inherit_function": "raft_airgap / 2", - "min_value": "0", - "max_value_warning": "layer_height", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": true - }, - "raft_surface_layers": { - "label": "Raft Top Layers", - "description": "The number of top layers on top of the 2nd raft layer. These are fully filled layers that the object sits on. 2 layers result in a smoother top surface than 1.", - "type": "int", - "default": 2, - "min_value": "0", - "max_value_warning": "20", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": true - }, - "raft_surface_thickness": { - "label": "Raft Top Layer Thickness", - "description": "Layer thickness of the top raft layers.", - "unit": "mm", - "type": "float", - "default": 0.1, - "min_value": "0", - "max_value_warning": "2.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_surface_line_width": { - "label": "Raft Top Line Width", - "description": "Width of the lines in the top surface of the raft. These can be thin lines so that the top of the raft becomes smooth.", - "unit": "mm", - "type": "float", - "default": 0.3, - "min_value": "0.0001", - "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_surface_line_spacing": { - "label": "Raft Top Spacing", - "description": "The distance between the raft lines for the top raft layers. The spacing should be equal to the line width, so that the surface is solid.", - "unit": "mm", - "type": "float", - "default": 0.3, - "min_value": "0.0001", - "max_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"", - "inherit_function": "raft_surface_line_width", - "global_only": "True", - "visible": false - }, - "raft_interface_thickness": { - "label": "Raft Middle Thickness", - "description": "Layer thickness of the middle raft layer.", - "unit": "mm", - "type": "float", - "default": 0.27, - "min_value": "0", - "max_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_interface_line_width": { - "label": "Raft Middle Line Width", - "description": "Width of the lines in the middle raft layer. Making the second layer extrude more causes the lines to stick to the bed.", - "unit": "mm", - "type": "float", - "default": 1, - "inherit_function": "line_width", - "min_value": "0.0001", - "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_interface_line_spacing": { - "label": "Raft Middle Spacing", - "description": "The distance between the raft lines for the middle raft layer. The spacing of the middle should be quite wide, while being dense enough to support the top raft layers.", - "unit": "mm", - "type": "float", - "default": 1.0, - "min_value": "0", - "max_value_warning": "15.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_base_thickness": { - "label": "Raft Base Thickness", - "description": "Layer thickness of the base raft layer. This should be a thick layer which sticks firmly to the printer bed.", - "unit": "mm", - "type": "float", - "default": 0.3, - "min_value": "0", - "max_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_base_line_width": { - "label": "Raft Base Line Width", - "description": "Width of the lines in the base raft layer. These should be thick lines to assist in bed adhesion.", - "unit": "mm", - "type": "float", - "default": 1, - "min_value": "0.0001", - "inherit_function": "line_width", - "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_base_line_spacing": { - "label": "Raft Line Spacing", - "description": "The distance between the raft lines for the base raft layer. Wide spacing makes for easy removal of the raft from the build plate.", - "unit": "mm", - "type": "float", - "default": 3.0, - "min_value": "0.0001", - "max_value_warning": "100", - "enabled": "adhesion_type == \"raft\"", - "global_only": "True", - "visible": false - }, - "raft_speed": { - "label": "Raft Print Speed", - "description": "The speed at which the raft is printed.", - "unit": "mm/s", - "type": "float", - "default": 30, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "200", - "enabled": "adhesion_type == \"raft\"", - "inherit_function": "speed_print / 60 * 30", - "global_only": "True", - "visible": false, - "children": { - "raft_surface_speed": { - "label": "Raft Surface Print Speed", - "description": "The speed at which the surface raft layers are printed. These should be printed a bit slower, so that the nozzle can slowly smooth out adjacent surface lines.", - "unit": "mm/s", - "type": "float", - "default": 30, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "100", - "enabled": "adhesion_type == \"raft\"", - "inherit_function": "parent_value", - "global_only": "True", - "visible": false - }, - "raft_interface_speed": { - "label": "Raft Interface Print Speed", - "description": "The speed at which the interface raft layer is printed. This should be printed quite slowly, as the volume of material coming out of the nozzle is quite high.", - "unit": "mm/s", - "type": "float", - "default": 15, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "150", - "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value", - "global_only": "True", - "visible": false - }, - "raft_base_speed": { - "label": "Raft Base Print Speed", - "description": "The speed at which the base raft layer is printed. This should be printed quite slowly, as the volume of material coming out of the nozzle is quite high.", - "unit": "mm/s", - "type": "float", - "default": 15, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "200", - "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value", - "global_only": "True", - "visible": false - } - } - }, - "raft_fan_speed": { - "label": "Raft Fan Speed", - "description": "The fan speed for the raft.", - "unit": "%", - "type": "float", - "min_value": "0", - "max_value": "100", - "default": 0, - "global_only": "True", - "visible": false, - "enabled": "adhesion_type == \"raft\"", - "children": { - "raft_surface_fan_speed": { - "label": "Raft Surface Fan Speed", - "description": "The fan speed for the surface raft layers.", - "unit": "%", - "type": "float", - "min_value": "0", - "max_value": "100", - "default": 0, - "global_only": "True", - "visible": false, - "inherit": true, - "enabled": "adhesion_type == \"raft\"" - }, - "raft_interface_fan_speed": { - "label": "Raft Interface Fan Speed", - "description": "The fan speed for the interface raft layer.", - "unit": "%", - "type": "float", - "min_value": "0", - "max_value": "100", - "default": 0, - "global_only": "True", - "visible": false, - "inherit": true, - "enabled": "adhesion_type == \"raft\"" - }, - "raft_base_fan_speed": { - "label": "Raft Base Fan Speed", - "description": "The fan speed for the base raft layer.", - "unit": "%", - "type": "float", - "min_value": "0", - "max_value": "100", - "default": 0, - "global_only": "True", - "visible": false, - "inherit": true, - "enabled": "adhesion_type == \"raft\"" - } - } - } - } - }, - "meshfix": { - "label": "Mesh Fixes", - "visible": true, - "icon": "category_fixes", - "settings": { - "meshfix_union_all": { - "label": "Union Overlapping Volumes", - "description": "Ignore the internal geometry arising from overlapping volumes and print the volumes as one. This may cause internal cavities to disappear.", - "type": "boolean", - "default": true, - "visible": false - }, - "meshfix_union_all_remove_holes": { - "label": "Remove All Holes", - "description": "Remove the holes in each layer and keep only the outside shape. This will ignore any invisible internal geometry. However, it also ignores layer holes which can be viewed from above or below.", - "type": "boolean", - "default": false, - "visible": false - }, - "meshfix_extensive_stitching": { - "label": "Extensive Stitching", - "description": "Extensive stitching tries to stitch up open holes in the mesh by closing the hole with touching polygons. This option can introduce a lot of processing time.", - "type": "boolean", - "default": false, - "visible": false - }, - "meshfix_keep_open_polygons": { - "label": "Keep Disconnected Faces", - "description": "Normally Cura tries to stitch up small holes in the mesh and remove parts of a layer with big holes. Enabling this option keeps those parts which cannot be stitched. This option should be used as a last resort option when everything else fails to produce proper GCode.", - "type": "boolean", - "default": false, - "visible": false - } - } - }, - "blackmagic": { - "label": "Special Modes", - "visible": true, - "icon": "category_blackmagic", - "settings": { - "print_sequence": { - "label": "Print Sequence", - "description": "Whether to print all objects one layer at a time or to wait for one object to finish, before moving on to the next. One at a time mode is only possible if all models are separated in such a way that the whole print head can move in between and all models are lower than the distance between the nozzle and the X/Y axes.", - "type": "enum", - "options": { - "all_at_once": "All at Once", - "one_at_a_time": "One at a Time" - }, - "default": "all_at_once", - "visible": true, - "global_only": true - }, - "magic_mesh_surface_mode": { - "label": "Surface Mode", - "description": "Treat the model as a surface only, a volume, or volumes with loose surfaces. The normal print mode only prints enclosed volumes. \"Surface\" prints a single wall tracing the mesh surface with no infill and no top/bottom skin. \"Both\" prints enclosed volumes like normal and any remaining polygons as surfaces.", - "type": "enum", - "options": { - "normal": "Normal", - "surface": "Surface", - "both": "Both" - }, - "default": "normal", - "visible": false - }, - "magic_spiralize": { - "label": "Spiralize Outer Contour", - "description": "Spiralize smooths out the Z move of the outer edge. This will create a steady Z increase over the whole print. This feature turns a solid object into a single walled print with a solid bottom. This feature used to be called Joris in older versions.", - "type": "boolean", - "default": false, - "visible": false, - "global_only": "True" - } - } - }, - "experimental": - { - "label": "Experimental", - "visible": true, - "icon": "category_blackmagic", - "settings": { - "draft_shield_enabled": { - "label": "Enable Draft Shield", - "description": "This will create a wall around the object, which traps (hot) air and shields against exterior airflow. Especially useful for materials which warp easily.", - "type": "boolean", - "default": false, - "global_only": true - }, - "draft_shield_dist": { - "label": "Draft Shield X/Y Distance", - "description": "Distance of the draft shield from the print, in the X/Y directions.", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "100", - "default": 10, - "visible": false, - "enabled": "draft_shield_enabled", - "global_only": true - }, - "draft_shield_height_limitation": { - "label": "Draft Shield Limitation", - "description": "Set the height of the draft shield. Choose to print the draft shield at the full height of the object or at a limited height.", - "type": "enum", - "options": { - "full": "Full", - "limited": "Limited" - }, - "default": "full", - "visible": false, - "enabled": "draft_shield_enabled", - "global_only": true - }, - "draft_shield_height": { - "label": "Draft Shield Height", - "description": "Height limitation of the draft shield. Above this height no draft shield will be printed.", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "9999", - "default": 0, - "inherit_function": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", - "visible": false, - "enabled": "draft_shield_height_limitation == \"limited\"", - "global_only": true - }, - "conical_overhang_enabled": { - "label": "Make Overhang Printable", - "description": "Change the geometry of the printed model such that minimal support is required. Steep overhangs will become shallow overhangs. Overhanging areas will drop down to become more vertical.", - "type": "boolean", - "default": false, - "visible": false - }, - "conical_overhang_angle": { - "label": "Maximum Model Angle", - "description": "The maximum angle of overhangs after the they have been made printable. At a value of 0° all overhangs are replaced by a piece of model connected to the build plate, 90° will not change the model in any way.", - "unit": "°", - "type": "float", - "min_value": "0", - "max_value": "89", - "default": 50, - "visible": true, - "enabled": "conical_overhang_enabled" - }, - "coasting_enable": { - "label": "Enable Coasting", - "description": "Coasting replaces the last part of an extrusion path with a travel path. The oozed material is used to print the last piece of the extrusion path in order to reduce stringing.", - "type": "boolean", - "default": false, - "visible": false, - "global_only": true - }, - "coasting_volume": { - "label": "Coasting Volume", - "description": "The volume otherwise oozed. This value should generally be close to the nozzle diameter cubed.", - "unit": "mm³", - "type": "float", - "default": 0.064, - "min_value": "0", - "max_value_warning": "2.0", - "visible": false, - "inherit": false, - "enabled": "coasting_enable", - "global_only": true - }, - "coasting_min_volume": { - "label": "Minimum Volume Before Coasting", - "description": "The smallest volume an extrusion path should have before allowing coasting. For smaller extrusion paths, less pressure has been built up in the bowden tube and so the coasted volume is scaled linearly. This value should always be larger than the Coasting Volume.", - "unit": "mm³", - "type": "float", - "default": 0.8, - "min_value": "0", - "max_value_warning": "10.0", - "visible": false, - "enabled": "coasting_enable", - "global_only": true - }, - "coasting_speed": { - "label": "Coasting Speed", - "description": "The speed by which to move during coasting, relative to the speed of the extrusion path. A value slightly under 100% is advised, since during the coasting move the pressure in the bowden tube drops.", - "unit": "%", - "type": "float", - "default": 90, - "min_value": "0.0001", - "max_value_warning": "100", - "visible": false, - "inherit": false, - "enabled": "coasting_enable", - "global_only": true - }, - "skin_outline_count": { - "label": "Extra Skin Wall Count", - "description": "Replaces the outermost part of the top/bottom pattern with a number of concentric lines. Using one or two lines improves roofs that start on infill material.", - "default": 0, - "min_value": "0", - "max_value_warning": "10", - "type": "int", - "visible": false - }, - "skin_alternate_rotation": { - "label": "Alternate Skin Rotation", - "description": "Alternate the direction in which the top/bottom layers are printed. Normally they are printed diagonally only. This setting adds the X-only and Y-only directions.", - "type": "boolean", - "default": false, - "visible": false, - "enabled": "top_bottom_pattern != \"concentric\"" - }, - "support_conical_enabled": { - "label": "Enable Conical Support", - "description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.", - "type": "boolean", - "default": false, - "visible": true, - "enabled": "support_enable" - }, - "support_conical_angle": { - "label": "Conical Support Angle", - "description": "The angle of the tilt of conical support. With 0 degrees being vertical, and 90 degrees being horizontal. Smaller angles cause the support to be more sturdy, but consist of more material. Negative angles cause the base of the support to be wider than the top.", - "unit": "°", - "type": "float", - "min_value": "-90", - "min_value_warning": "-45", - "max_value_warning": "45", - "max_value": "90", - "default": 30, - "visible": false, - "enabled": "support_conical_enabled and support_enable" - }, - "support_conical_min_width": { - "label": "Conical Support Minimum Width", - "description": "Minimum width to which the base of the conical support area is reduced. Small widths can lead to unstable support structures.", - "unit": "mm", - "default": 5.0, - "min_value": "0", - "min_value_warning": "machine_nozzle_size * 3", - "max_value_warning": "100.0", - "type": "float", - "visible": false, - "enabled": "support_conical_enabled and support_enable" - }, - "magic_fuzzy_skin_enabled": { - "label": "Fuzzy Skin", - "description": "Randomly jitter while printing the outer wall, so that the surface has a rough and fuzzy look.", - "type": "boolean", - "default": false, - "visible": false - }, - "magic_fuzzy_skin_thickness": { - "label": "Fuzzy Skin Thickness", - "description": "The width within which to jitter. It's advised to keep this below the outer wall width, since the inner walls are unaltered.", - "type": "float", - "unit": "mm", - "default": 0.3, - "min_value": "0.001", - "max_value_warning": "wall_line_width_0", - "visible": false, - "enabled": "magic_fuzzy_skin_enabled" - }, - "magic_fuzzy_skin_point_density": { - "label": "Fuzzy Skin Density", - "description": "The average density of points introduced on each polygon in a layer. Note that the original points of the polygon are discarded, so a low density results in a reduction of the resolution.", - "type": "float", - "unit": "1/mm", - "default": 1.25, - "min_value": "0.008", - "min_value_warning": "0.1", - "max_value_warning": "10", - "max_value": "2 / magic_fuzzy_skin_thickness", - "visible": false, - "enabled": "magic_fuzzy_skin_enabled", - "children": { - "magic_fuzzy_skin_point_dist": { - "label": "Fuzzy Skin Point Distance", - "description": "The average distance between the random points introduced on each line segment. Note that the original points of the polygon are discarded, so a high smoothness results in a reduction of the resolution. This value must be higher than half the Fuzzy Skin Thickness.", - "type": "float", - "unit": "mm", - "default": 0.8, - "min_value": "magic_fuzzy_skin_thickness / 2", - "min_value_warning": "0.1", - "max_value_warning": "10", - "inherit_function": "10000 if parent_value == 0 else 1 / parent_value", - "visible": false, - "enabled": "magic_fuzzy_skin_enabled" - } - } - }, - "wireframe_enabled": { - "label": "Wire Printing", - "description": "Print only the outside surface with a sparse webbed structure, printing 'in thin air'. This is realized by horizontally printing the contours of the model at given Z intervals which are connected via upward and diagonally downward lines.", - "type": "boolean", - "default": false, - "visible": false, - "global_only": "True" - }, - "wireframe_height": { - "label": "WP Connection Height", - "description": "The height of the upward and diagonally downward lines between two horizontal parts. This determines the overall density of the net structure. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 3, - "min_value": "0.0001", - "max_value_warning": "20", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_roof_inset": { - "label": "WP Roof Inset Distance", - "description": "The distance covered when making a connection from a roof outline inward. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 3, - "min_value": "0", - "min_value_warning": "machine_nozzle_size", - "max_value_warning": "20", - "visible": false, - "enabled": "wireframe_enabled", - "inherit_function": "wireframe_height", - "global_only": "True" - }, - "wireframe_printspeed": { - "label": "WP Speed", - "description": "Speed at which the nozzle moves when extruding material. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default": 5, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "50", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True", - "children": { - "wireframe_printspeed_bottom": { - "label": "WP Bottom Printing Speed", - "description": "Speed of printing the first layer, which is the only layer touching the build platform. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default": 5, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "50", - "visible": false, - "inherit": true, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_printspeed_up": { - "label": "WP Upward Printing Speed", - "description": "Speed of printing a line upward 'in thin air'. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default": 5, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "50", - "visible": false, - "inherit": true, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_printspeed_down": { - "label": "WP Downward Printing Speed", - "description": "Speed of printing a line diagonally downward. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default": 5, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "50", - "visible": false, - "inherit": true, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_printspeed_flat": { - "label": "WP Horizontal Printing Speed", - "description": "Speed of printing the horizontal contours of the object. Only applies to Wire Printing.", - "unit": "mm/s", - "type": "float", - "default": 5, - "min_value": "0.1", - "max_value": "299792458000", - "max_value_warning": "100", - "visible": false, - "inherit": true, - "enabled": "wireframe_enabled", - "global_only": "True" - } - } - }, - "wireframe_flow": { - "label": "WP Flow", - "description": "Flow compensation: the amount of material extruded is multiplied by this value. Only applies to Wire Printing.", - "unit": "%", - "default": 100, - "min_value": "0", - "max_value_warning": "100", - "type": "float", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True", - "children": { - "wireframe_flow_connection": { - "label": "WP Connection Flow", - "description": "Flow compensation when going up or down. Only applies to Wire Printing.", - "unit": "%", - "default": 100, - "min_value": "0", - "max_value_warning": "100", - "type": "float", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_flow_flat": { - "label": "WP Flat Flow", - "description": "Flow compensation when printing flat lines. Only applies to Wire Printing.", - "unit": "%", - "default": 100, - "min_value": "0", - "max_value_warning": "100", - "type": "float", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - } - } - }, - "wireframe_top_delay": { - "label": "WP Top Delay", - "description": "Delay time after an upward move, so that the upward line can harden. Only applies to Wire Printing.", - "unit": "sec", - "type": "float", - "default": 0, - "min_value": "0", - "max_value_warning": "1", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_bottom_delay": { - "label": "WP Bottom Delay", - "description": "Delay time after a downward move. Only applies to Wire Printing.", - "unit": "sec", - "type": "float", - "default": 0, - "min_value": "0", - "max_value_warning": "1", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_flat_delay": { - "label": "WP Flat Delay", - "description": "Delay time between two horizontal segments. Introducing such a delay can cause better adhesion to previous layers at the connection points, while too long delays cause sagging. Only applies to Wire Printing.", - "unit": "sec", - "type": "float", - "default": 0.1, - "min_value": "0", - "max_value_warning": "0.5", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_up_half_speed": { - "label": "WP Ease Upward", - "description": "Distance of an upward move which is extruded with half speed.\nThis can cause better adhesion to previous layers, while not heating the material in those layers too much. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 0.3, - "min_value": "0", - "max_value_warning": "5.0", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_top_jump": { - "label": "WP Knot Size", - "description": "Creates a small knot at the top of an upward line, so that the consecutive horizontal layer has a better chance to connect to it. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 0.6, - "min_value": "0", - "max_value_warning": "2.0", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_fall_down": { - "label": "WP Fall Down", - "description": "Distance with which the material falls down after an upward extrusion. This distance is compensated for. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 0.5, - "min_value": "0", - "max_value_warning": "wireframe_height", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_drag_along": { - "label": "WP Drag Along", - "description": "Distance with which the material of an upward extrusion is dragged along with the diagonally downward extrusion. This distance is compensated for. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 0.6, - "min_value": "0", - "max_value_warning": "wireframe_height", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_strategy": { - "label": "WP Strategy", - "description": "Strategy for making sure two consecutive layers connect at each connection point. Retraction lets the upward lines harden in the right position, but may cause filament grinding. A knot can be made at the end of an upward line to heighten the chance of connecting to it and to let the line cool; however, it may require slow printing speeds. Another strategy is to compensate for the sagging of the top of an upward line; however, the lines won't always fall down as predicted.", - "type": "enum", - "options": { - "compensate": "Compensate", - "knot": "Knot", - "retract": "Retract" - }, - "default": "compensate", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_straight_before_down": { - "label": "WP Straighten Downward Lines", - "description": "Percentage of a diagonally downward line which is covered by a horizontal line piece. This can prevent sagging of the top most point of upward lines. Only applies to Wire Printing.", - "type": "float", - "unit": "%", - "default": 20, - "min_value": "0", - "max_value": "100", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_roof_fall_down": { - "label": "WP Roof Fall Down", - "description": "The distance which horizontal roof lines printed 'in thin air' fall down when being printed. This distance is compensated for. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 2, - "min_value_warning": "0", - "max_value_warning": "wireframe_roof_inset", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_roof_drag_along": { - "label": "WP Roof Drag Along", - "description": "The distance of the end piece of an inward line which gets dragged along when going back to the outer outline of the roof. This distance is compensated for. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 0.8, - "min_value": "0", - "max_value_warning": "10", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_roof_outer_delay": { - "label": "WP Roof Outer Delay", - "description": "Time spent at the outer perimeters of hole which is to become a roof. Longer times can ensure a better connection. Only applies to Wire Printing.", - "type": "float", - "unit": "sec", - "default": 0.2, - "min_value": "0", - "max_value_warning": "2.0", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - }, - "wireframe_nozzle_clearance": { - "label": "WP Nozzle Clearance", - "description": "Distance between the nozzle and horizontally downward lines. Larger clearance results in diagonally downward lines with a less steep angle, which in turn results in less upward connections with the next layer. Only applies to Wire Printing.", - "type": "float", - "unit": "mm", - "default": 1, - "min_value_warning": "0", - "max_value_warning": "10.0", - "visible": false, - "enabled": "wireframe_enabled", - "global_only": "True" - } - } - } - } -} From fe53a4381932a231753d01a32751d508d2842172 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 09:41:25 +0200 Subject: [PATCH 376/424] Combine support checkbox & support extruder selection & remove main extruder selection CURA-790 --- resources/qml/SidebarSimple.qml | 141 +++++++++++++------------------- 1 file changed, 55 insertions(+), 86 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index d303952a8d..36d92b6e78 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -175,38 +175,35 @@ Item } Rectangle { - id: helpersCellLeft + id: helpersCell anchors.top: infillCellRight.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left - width: parent.width/100*35 - UM.Theme.getSize("default_margin").width + anchors.right: parent.right height: childrenRect.height Label{ + id: adhesionHelperLabel anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - //: Helpers selection label - text: catalog.i18nc("@label:listbox","Helpers:"); + anchors.verticalCenter: brimCheckBox.verticalCenter + width: parent.width/100*35 - 3 * UM.Theme.getSize("default_margin").width + //: Bed adhesion label + text: catalog.i18nc("@label:listbox","Bed Adhesion:"); font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); } - } - Rectangle { - id: helpersCellRight - anchors.top: helpersCellLeft.top - anchors.left: helpersCellLeft.right - width: parent.width/100*65 - UM.Theme.getSize("default_margin").width - height: childrenRect.height CheckBox{ id: brimCheckBox property bool hovered_ex: false anchors.top: parent.top - anchors.left: parent.left + anchors.left: adhesionHelperLabel.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width //: Setting enable skirt adhesion checkbox - text: catalog.i18nc("@option:check","Generate Brim"); + text: catalog.i18nc("@option:check","Print Brim"); style: UM.Theme.styles.checkbox; checked: platformAdhesionType.properties.value == "brim" @@ -231,16 +228,31 @@ Item } } } + + Label{ + id: supportHelperLabel + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.verticalCenter: supportCheckBox.verticalCenter + width: parent.width/100*35 - 3 * UM.Theme.getSize("default_margin").width + //: Support label + text: catalog.i18nc("@label:listbox","Support:"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + } + CheckBox{ id: supportCheckBox + visible: machineExtruderCount.properties.value <= 1 property bool hovered_ex: false anchors.top: brimCheckBox.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.left: parent.left + anchors.left: supportHelperLabel.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width //: Setting enable support checkbox - text: catalog.i18nc("@option:check","Generate Support Structure"); + text: catalog.i18nc("@option:check","Print Support Structure"); style: UM.Theme.styles.checkbox; checked: supportEnabled.properties.value == "True" @@ -264,74 +276,27 @@ Item } } } - } - function populateExtruderModel() - { - extruderModel.clear(); - for(var extruder = 0; extruder < machineExtruderCount.properties.value ; extruder++) { - print(catalog.i18nc("@label", "Extruder %1").arg(extruder)); - extruderModel.append({ - text: catalog.i18nc("@label", "Extruder %1").arg(extruder) - }) - } - } - - Rectangle { - id: multiExtrusionCell - anchors.top: helpersCellRight.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.left: parent.left - width: parent.width - height: childrenRect.height - visible: machineExtruderCount.properties.value > 1 - - Label { - id: mainExtruderLabel - text: catalog.i18nc("@label:listbox","Print object with:") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - width: base.width/100* 35 - 2*UM.Theme.getSize("default_margin").width - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: mainExtruderCombobox.verticalCenter - } - ComboBox { - id: mainExtruderCombobox - model: extruderModel - anchors.top: parent.top - anchors.left: supportExtruderLabel.right - style: UM.Theme.styles.combobox - currentIndex: mainExtruderNr.properties.value - onActivated: { - mainExtruderNr.setPropertyValue("value", index) - } - } - - Label { - id: supportExtruderLabel - visible: supportCheckBox.checked - text: catalog.i18nc("@label:listbox","Print support with:") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - width: base.width/100* 35 - 2*UM.Theme.getSize("default_margin").width - height: visible ? mainExtruderLabel.height : 0 - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: supportExtruderCombobox.verticalCenter - } ComboBox { id: supportExtruderCombobox - visible: supportCheckBox.checked + visible: machineExtruderCount.properties.value > 1 model: extruderModel - height: visible ? mainExtruderCombobox.height : 0 - anchors.top: mainExtruderCombobox.bottom + + anchors.top: brimCheckBox.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.left: supportExtruderLabel.right + anchors.left: supportHelperLabel.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width + width: parent.width/100*45 + style: UM.Theme.styles.combobox - currentIndex: supportExtruderNr.properties.value + currentIndex: supportEnabled.properties.value == "True" ? parseFloat(supportExtruderNr.properties.value) + 1 : 0 onActivated: { - supportExtruderNr.setPropertyValue("value", index) + if(index==0) { + supportEnabled.setPropertyValue("value", false); + } else { + supportEnabled.setPropertyValue("value", true); + supportExtruderNr.setPropertyValue("value", index - 1); + } } } @@ -347,9 +312,22 @@ Item } } + function populateExtruderModel() + { + extruderModel.clear(); + extruderModel.append({ + text: catalog.i18nc("@label", "Don't print support") + }) + for(var extruder = 0; extruder < machineExtruderCount.properties.value ; extruder++) { + extruderModel.append({ + text: catalog.i18nc("@label", "Print using Extruder %1").arg(extruder + 1) + }) + } + } + Rectangle { id: tipsCell - anchors.top: multiExtrusionCell.visible? multiExtrusionCell.bottom : helpersCellRight.bottom + anchors.top: helpersCell.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left width: parent.width @@ -420,13 +398,4 @@ Item watchedProperties: [ "value" ] storeIndex: 0 } - UM.SettingPropertyProvider - { - id: mainExtruderNr - - containerStackId: Cura.MachineManager.activeMachineId - key: "extruder_nr" - watchedProperties: [ "value" ] - storeIndex: 0 - } } From 098cf515df2b233d3704db052d45ede72bb768ca Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 25 May 2016 19:02:55 +0200 Subject: [PATCH 377/424] Fix tooltips for simple mode helpers CURA-790 --- resources/qml/SidebarSimple.qml | 22 ++++++++++++++++++++-- resources/themes/cura/styles.qml | 4 ++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 36d92b6e78..30190c32b2 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -218,7 +218,7 @@ Item onEntered: { parent.hovered_ex = true - base.showTooltip(brimCheckBox, Qt.point(-helpersCellRight.x, 0), + base.showTooltip(brimCheckBox, Qt.point(-brimCheckBox.x, 0), catalog.i18nc("@label", "Enable printing a brim. This will add a single-layer-thick flat area around your object which is easy to cut off afterwards.")); } onExited: @@ -266,7 +266,7 @@ Item onEntered: { parent.hovered_ex = true - base.showTooltip(supportCheckBox, Qt.point(-helpersCellRight.x, 0), + base.showTooltip(supportCheckBox, Qt.point(-supportCheckBox.x, 0), catalog.i18nc("@label", "Enable printing support structures. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); } onExited: @@ -289,6 +289,8 @@ Item width: parent.width/100*45 style: UM.Theme.styles.combobox + property bool hovered_ex: false + currentIndex: supportEnabled.properties.value == "True" ? parseFloat(supportExtruderNr.properties.value) + 1 : 0 onActivated: { if(index==0) { @@ -298,6 +300,22 @@ Item supportExtruderNr.setPropertyValue("value", index - 1); } } + MouseArea { + anchors.fill: parent + hoverEnabled: true + acceptedButtons: Qt.NoButton + onEntered: + { + parent.hovered_ex = true + base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0), + catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); + } + onExited: + { + parent.hovered_ex = false + base.hideTooltip(); + } + } } ListModel { diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index cb85abf0c1..b2c2329169 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -286,11 +286,11 @@ QtObject { implicitHeight: UM.Theme.getSize("setting_control").height; implicitWidth: UM.Theme.getSize("setting_control").width; - color: control.hovered ? Theme.getColor("setting_control_highlight") : Theme.getColor("setting_control"); + color: (control.hovered || control.hovered_ex) ? Theme.getColor("setting_control_highlight") : Theme.getColor("setting_control"); Behavior on color { ColorAnimation { duration: 50; } } border.width: Theme.getSize("default_lining").width; - border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border"); + border.color: (control.hovered || control.hovered_ex) ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border"); } label: Item { Label { From 6a77f67c34bd4e10996f1f9f28ce36aecd7e0d03 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 25 May 2016 23:27:46 +0200 Subject: [PATCH 378/424] Rearrange sidebar top CURA-340 --- resources/qml/Sidebar.qml | 22 +++++++++++----------- resources/qml/SidebarHeader.qml | 14 +------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 81823f039d..4109fd1586 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -56,22 +56,13 @@ Rectangle configureMachinesAction: base.configureMachinesAction; } - Rectangle { - id: headerSeparator - width: parent.width - height: UM.Theme.getSize("sidebar_lining").height - color: UM.Theme.getColor("sidebar_lining") - anchors.top: header.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - } - ProfileSetup { id: profileItem addProfileAction: base.addProfileAction updateProfileAction: base.updateProfileAction resetProfileAction: base.resetProfileAction manageProfilesAction: base.manageProfilesAction - anchors.top: settingsModeSelection.bottom + anchors.top: header.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width height: totalHeightProfileSetup @@ -80,6 +71,15 @@ Rectangle onHideTooltip: base.hideTooltip() } + Rectangle { + id: headerSeparator + width: parent.width + height: UM.Theme.getSize("sidebar_lining").height + color: UM.Theme.getColor("sidebar_lining") + anchors.top: profileItem.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + } + currentModeIndex: { var index = parseInt(UM.Preferences.getValue("cura/active_mode")) @@ -172,7 +172,7 @@ Rectangle id: sidebarContents anchors.bottom: footerSeparator.top - anchors.top: profileItem.bottom + anchors.top: settingsModeSelection.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: base.left anchors.right: base.right diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index d8bc4291bb..f880485fc5 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -25,23 +25,11 @@ Item color: UM.Theme.getColor("sidebar_header_bar") } - Label{ - id: printjobTabLabel - text: catalog.i18nc("@label:listbox","Print Job"); - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width; - anchors.top: sidebarTabRow.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - width: parent.width/100*45 - font: UM.Theme.getFont("large"); - color: UM.Theme.getColor("text") - } - Rectangle { id: machineSelectionRow width: base.width height: UM.Theme.getSize("sidebar_setup").height - anchors.top: printjobTabLabel.bottom + anchors.top: sidebarTabRow.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.horizontalCenter: parent.horizontalCenter From 85370dad8743b96b5ea5fcf3e99703b81f180cec Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 08:15:53 +0200 Subject: [PATCH 379/424] Fix indent CURA-340 --- resources/qml/SidebarSimple.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 30190c32b2..c828b5d3db 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -322,12 +322,12 @@ Item id: extruderModel Component.onCompleted: populateExtruderModel() } - Connections - { - id: machineChange - target: Cura.MachineManager - onGlobalContainerChanged: populateExtruderModel() - } + Connections + { + id: machineChange + target: Cura.MachineManager + onGlobalContainerChanged: populateExtruderModel() + } } function populateExtruderModel() From f0b956c3c66fcfaf53a6a5e32c59968c72678d1c Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 08:21:19 +0200 Subject: [PATCH 380/424] Add selection "tab" for active extruder Only visible for multi-extrusion printers. Doesn't do anything but setting a qml property, but is to be used to change the variant/material per extruder, and to apply a filter to the advanced mode settings. CURA-340 --- resources/qml/SidebarHeader.qml | 93 ++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index f880485fc5..282fa8af25 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -16,6 +16,7 @@ Item property Action configureMachinesAction; UM.I18nCatalog { id: catalog; name:"cura"} property int totalHeightHeader: childrenRect.height + property int currentExtruderIndex; Rectangle { id: sidebarTabRow @@ -87,9 +88,89 @@ Item } Rectangle { - id: variantRow + id: extruderSelection + width: parent.width/100*55 + visible: machineExtruderCount.properties.value > 1 + height: visible ? UM.Theme.getSize("sidebar_header_mode_toggle").height : 0 + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.top: machineSelectionRow.bottom anchors.topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 + Component{ + id: wizardDelegate + Button { + height: extruderSelection.height + anchors.left: parent.left + anchors.leftMargin: model.index * (extruderSelection.width / machineExtruderCount.properties.value) + anchors.verticalCenter: parent.verticalCenter + width: parent.width / machineExtruderCount.properties.value + text: model.text + exclusiveGroup: extruderMenuGroup; + checkable: true; + checked: base.currentExtruderIndex == index + onClicked: base.currentExtruderIndex = index + + style: ButtonStyle { + background: Rectangle { + border.width: UM.Theme.getSize("default_lining").width + border.color: control.checked ? UM.Theme.getColor("toggle_checked_border") : + control.pressed ? UM.Theme.getColor("toggle_active_border") : + control.hovered ? UM.Theme.getColor("toggle_hovered_border") : UM.Theme.getColor("toggle_unchecked_border") + color: control.checked ? UM.Theme.getColor("toggle_checked") : + control.pressed ? UM.Theme.getColor("toggle_active") : + control.hovered ? UM.Theme.getColor("toggle_hovered") : UM.Theme.getColor("toggle_unchecked") + Behavior on color { ColorAnimation { duration: 50; } } + Label { + anchors.centerIn: parent + color: control.checked ? UM.Theme.getColor("toggle_checked_text") : + control.pressed ? UM.Theme.getColor("toggle_active_text") : + control.hovered ? UM.Theme.getColor("toggle_hovered_text") : UM.Theme.getColor("toggle_unchecked_text") + font: UM.Theme.getFont("default") + text: control.text; + } + } + label: Item { } + } + } + } + ExclusiveGroup { id: extruderMenuGroup; } + ListView{ + id: extrudersList + property var index: 0 + model: extrudersListModel + delegate: wizardDelegate + anchors.top: parent.top + anchors.left: parent.left + width: parent.width + } + } + + ListModel + { + id: extrudersListModel + Component.onCompleted: populateExtruderModel() + } + Connections + { + id: machineChange + target: Cura.MachineManager + onGlobalContainerChanged: populateExtruderModel() + } + + function populateExtruderModel() + { + extrudersListModel.clear(); + for(var extruder = 0; extruder < machineExtruderCount.properties.value ; extruder++) { + extrudersListModel.append({ + text: catalog.i18nc("@label", "Extruder %1").arg(extruder + 1) + }) + } + } + + Rectangle { + id: variantRow + anchors.top: extruderSelection.visible ? extruderSelection.bottom : machineSelectionRow.bottom + anchors.topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 width: base.width height: visible ? UM.Theme.getSize("sidebar_setup").height : 0 visible: Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials @@ -214,4 +295,14 @@ Item } } } + + UM.SettingPropertyProvider + { + id: machineExtruderCount + + containerStackId: Cura.MachineManager.activeMachineId + key: "machine_extruder_count" + watchedProperties: [ "value" ] + storeIndex: 0 + } } From f7f9dc036e1a7a51f3cc98819f48ded47bfb22e0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 08:52:41 +0200 Subject: [PATCH 381/424] Show correct page when opening profile manager CURA-1278 --- resources/qml/Cura.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 6ea69c428b..04ca44369c 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -582,7 +582,7 @@ UM.MainWindow onTriggered: { UM.MachineManager.createProfile(); - preferences.setPage(4); + preferences.setPage(5); preferences.show(); // Show the renameDialog after a very short delay so the preference page has time to initiate @@ -606,7 +606,7 @@ UM.MainWindow onTriggered: { preferences.visible = true; - preferences.setPage(4); + preferences.setPage(5); } } From 5975fa1b0dd2ec35e82f351bdaa18d5015dea608 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 13:29:56 +0200 Subject: [PATCH 382/424] Fix enabled state of setting items Contributes to CURA-1278 --- resources/qml/Settings/SettingView.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 0e99ecc4b7..51f854b519 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -34,11 +34,11 @@ ScrollView id: delegate width: UM.Theme.getSize("sidebar").width; - height: provider.properties.enabled ? UM.Theme.getSize("section").height : 0 + height: provider.properties.enabled == "True" ? UM.Theme.getSize("section").height : 0 Behavior on height { NumberAnimation { duration: 100 } } - opacity: provider.properties.enabled ? 1 : 0 + opacity: provider.properties.enabled == "True" ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100 } } - enabled: provider.properties.enabled + enabled: provider.properties.enabled == "True" property var definition: model property var settingDefinitionsModel: definitionsModel From d5fa6d884f4cc8d2ed8aed462000c4e3ccb34270 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 13:32:14 +0200 Subject: [PATCH 383/424] Fix XML material profiles so the global properties are properly set Contributes to CURA-339 --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 50c39238fd..d73beec193 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -69,13 +69,15 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): self.addMetaDataEntry("properties", property_values) + self.setDefinition(UM.Settings.ContainerRegistry.getInstance().findDefinitionContainers(id = "fdmprinter")[0]) + global_setting_values = {} settings = data.iterfind("./um:settings/um:setting", self.__namespaces) for entry in settings: key = entry.get("key") if key in self.__material_property_setting_map: self.setProperty(self.__material_property_setting_map[key], "value", entry.text, self._definition) - global_setting_values[key] = entry.text + global_setting_values[self.__material_property_setting_map[key]] = entry.text machines = data.iterfind("./um:settings/um:machine", self.__namespaces) for machine in machines: From 8804c2837f67664b0585fb14f044f202f3a80d46 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 15:28:57 +0200 Subject: [PATCH 384/424] Make reset and restore default buttons work properly again Contributes to CURA-1278 --- resources/qml/Settings/SettingItem.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index ebbf93af84..013dcd1680 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -89,7 +89,7 @@ Item { { id: revertButton; - visible: propertyProvider.properties.state == "InstanceState.User" + visible: propertyProvider.stackLevel == 0 height: parent.height; width: height; @@ -102,8 +102,8 @@ Item { iconSource: UM.Theme.getIcon("reset") onClicked: { - base.resetRequested() - controlContainer.notifyReset(); + revertButton.focus = true + propertyProvider.removeFromContainer(0) } onEntered: base.showTooltip(catalog.i18nc("@label", "This setting has a value that is different from the profile.\n\nClick to restore the value of the profile.")) @@ -116,14 +116,14 @@ Item { id: inheritButton; //visible: has_profile_value && base.has_inherit_function && base.is_enabled - visible: propertyProvider.properties.state == "InstanceState.User" + visible: propertyProvider.properties.state == "InstanceState.User" && propertyProvider.stackLevel > 0 height: parent.height; width: height; onClicked: { - base.resetToDefaultRequested(); - controlContainer.notifyReset(); + focus = true; + propertyProvider.removeFromContainer(propertyProvider.stackLevel) } backgroundColor: UM.Theme.getColor("setting_control"); From 43ec037c554142b4cf72ef4b49850347cb9ad9f6 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 15:29:56 +0200 Subject: [PATCH 385/424] Do not load ComboBox items asynchronously Since there is a bug with Qt 5.5 that will do strange reordering. Contributes to CURA-1278 --- resources/qml/Settings/SettingView.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 51f854b519..34b07ce780 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -45,7 +45,9 @@ ScrollView property var propertyProvider: provider //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 - asynchronous: QT_VERSION_STR.split(".")[1] >= 5 + //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, + //causing nasty issues when selecting differnt options. So disable asynchronous loading of enum type completely. + asynchronous: model.type != "enum" source: { From 4fc1407c00b3fb709ca59a074565532388520ffd Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 15:32:08 +0200 Subject: [PATCH 386/424] Update variant profiles to use the right syntax for formulas Contributes to CURA-1278 --- resources/variants/ultimaker2_extended_plus_0.25.inst.cfg | 6 +++--- resources/variants/ultimaker2_extended_plus_0.4.inst.cfg | 6 +++--- resources/variants/ultimaker2_extended_plus_0.6.inst.cfg | 6 +++--- resources/variants/ultimaker2_extended_plus_0.8.inst.cfg | 6 +++--- resources/variants/ultimaker2_plus_0.25.inst.cfg | 6 +++--- resources/variants/ultimaker2_plus_0.4.inst.cfg | 6 +++--- resources/variants/ultimaker2_plus_0.6.inst.cfg | 6 +++--- resources/variants/ultimaker2_plus_0.8.inst.cfg | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg index 0c0154c03b..b499db6163 100644 --- a/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg @@ -12,6 +12,6 @@ machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 0.8 coasting_volume = 0.1 coasting_min_volume = 0.17 -speed_wall = round(speed_print / 1.2, 1) -speed_wall_0 = 1 if speed_wall < 5 else (speed_wall - 5) -speed_topbottom = round(speed_print / 1.5, 1) +speed_wall = =round(speed_print / 1.2, 1) +speed_wall_0 = =1 if speed_wall < 5 else (speed_wall - 5) +speed_topbottom = =round(speed_print / 1.5, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg index 87b74b2572..d2fb6f76b1 100644 --- a/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg @@ -10,6 +10,6 @@ type = variant [values] machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 1.05 -speed_wall = round(speed_print / 1.25, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2.25, 1) +speed_wall = =round(speed_print / 1.25, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2.25, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg index 343b2d85e5..e4f9f0ce45 100644 --- a/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg @@ -11,6 +11,6 @@ type = variant machine_nozzle_size = 0.6 machine_nozzle_tip_outer_diameter = 1.25 coasting_volume = 1.36 -speed_wall = round(speed_print * 4 / 3, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) +speed_wall = =round(speed_print * 4 / 3, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg index c1bb4555c1..18570ea75d 100644 --- a/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg @@ -11,6 +11,6 @@ type = variant machine_nozzle_size = 0.8 machine_nozzle_tip_outer_diameter = 1.35 coasting_volume = 3.22 -speed_wall = round(speed_print * 4 / 3, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) +speed_wall = =round(speed_print * 4 / 3, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_plus_0.25.inst.cfg b/resources/variants/ultimaker2_plus_0.25.inst.cfg index 51a4b44a4a..7cab771101 100644 --- a/resources/variants/ultimaker2_plus_0.25.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.25.inst.cfg @@ -12,6 +12,6 @@ machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 0.8 coasting_volume = 0.1 coasting_min_volume = 0.17 -speed_wall = round(speed_print / 1.2, 1) -speed_wall_0 = 1 if speed_wall < 5 else (speed_wall - 5) -speed_topbottom = round(speed_print / 1.5, 1) +speed_wall = =round(speed_print / 1.2, 1) +speed_wall_0 = =1 if speed_wall < 5 else (speed_wall - 5) +speed_topbottom = =round(speed_print / 1.5, 1) diff --git a/resources/variants/ultimaker2_plus_0.4.inst.cfg b/resources/variants/ultimaker2_plus_0.4.inst.cfg index aaea23a8df..748f367250 100644 --- a/resources/variants/ultimaker2_plus_0.4.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.4.inst.cfg @@ -10,6 +10,6 @@ type = variant [values] machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 1.05 -speed_wall = round(speed_print / 1.25, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2.25, 1) +speed_wall = =round(speed_print / 1.25, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2.25, 1) diff --git a/resources/variants/ultimaker2_plus_0.6.inst.cfg b/resources/variants/ultimaker2_plus_0.6.inst.cfg index c416b2ec3c..34d0f7a5cf 100644 --- a/resources/variants/ultimaker2_plus_0.6.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.6.inst.cfg @@ -11,6 +11,6 @@ type = variant machine_nozzle_size = 0.6 machine_nozzle_tip_outer_diameter = 1.25 coasting_volume = 1.36 -speed_wall = round(speed_print * 4 / 3, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) +speed_wall = =round(speed_print * 4 / 3, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_plus_0.8.inst.cfg b/resources/variants/ultimaker2_plus_0.8.inst.cfg index 3b577384ec..e719409060 100644 --- a/resources/variants/ultimaker2_plus_0.8.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.8.inst.cfg @@ -11,6 +11,6 @@ type = variant machine_nozzle_size = 0.8 machine_nozzle_tip_outer_diameter = 1.35 coasting_volume = 3.22 -speed_wall = round(speed_print * 4 / 3, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) +speed_wall = =round(speed_print * 4 / 3, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2, 1) From c814e47b0e1b61b6a8237bb5847067dca325f13a Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 26 May 2016 15:35:28 +0200 Subject: [PATCH 387/424] SettingView now works with PreferenceVisibility handler CURA-1278 --- resources/qml/Settings/SettingView.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 0e99ecc4b7..1069774563 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -27,7 +27,11 @@ ScrollView id: contents spacing: UM.Theme.getSize("default_lining").height; - model: UM.SettingDefinitionsModel { id: definitionsModel; containerId: Cura.MachineManager.activeDefinitionId } + model: UM.SettingDefinitionsModel { + id: definitionsModel; + containerId: Cura.MachineManager.activeDefinitionId + visibilityHandler: UM.SettingPreferenceVisibilityHandler {} + } delegate: Loader { From 7ce4e236772380b306c04067b72c0476b3951638 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 15:52:36 +0200 Subject: [PATCH 388/424] Add all categories to default visible list Since otherwise none of the children will be visible Contributes to CURA-1278 Fixes CURA-1614 --- cura/CuraApplication.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 9691b638a1..23e40e66b3 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -149,6 +149,7 @@ class CuraApplication(QtApplication): Preferences.getInstance().setDefault("local_file/last_used_type", "text/x-gcode") Preferences.getInstance().setDefault("general/visible_settings", """ + machine_settings resolution layer_height shell @@ -165,6 +166,7 @@ class CuraApplication(QtApplication): speed speed_print speed_travel + travel cooling cool_fan_enabled support @@ -177,8 +179,11 @@ class CuraApplication(QtApplication): raft_airgap layer_0_z_overlap raft_surface_layers + meshfix blackmagic print_sequence + dual + experimental """) JobQueue.getInstance().jobFinished.connect(self._onJobFinished) From e02e2bde8d242a3b788d9e53d9428927239fa03c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 26 May 2016 16:35:34 +0200 Subject: [PATCH 389/424] Remove semicolon at the end of the line --- .../CuraEngineBackend/CuraEngineBackend.py | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index d088288391..c9a0efbbcb 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -134,26 +134,26 @@ class CuraEngineBackend(Backend): self._process_layers_job.abort() self._process_layers_job = None - #Don't slice if there is a setting with an error value. - stack = Application.getInstance().getGlobalContainerStack() - for key in stack.getAllKeys(): - validation_state = stack.getProperty(key, "validationState") - #Only setting instances have a validation state, so settings which - #are not overwritten by any instance will have none. The property - #then, and only then, evaluates to None. We make the assumption that - #the definition defines the setting with a default value that is - #valid. Therefore we can allow both ValidatorState.Valid and None as - #allowable validation states. - #TODO: This assumption is wrong! If the definition defines an inheritance function that through inheritance evaluates to a disallowed value, a setting is still invalid even though it's default! - #TODO: Therefore we must also validate setting definitions. - if validation_state != None and validation_state != ValidatorState.Valid: - Logger.log("w", "Setting %s is not valid, but %s. Aborting slicing.", key, validation_state) - if self._message: #Hide any old message before creating a new one. - self._message.hide() - self._message = None - self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) - self._message.show() - return + # #Don't slice if there is a setting with an error value. + # stack = Application.getInstance().getGlobalContainerStack() + # for key in stack.getAllKeys(): + # validation_state = stack.getProperty(key, "validationState") + # #Only setting instances have a validation state, so settings which + # #are not overwritten by any instance will have none. The property + # #then, and only then, evaluates to None. We make the assumption that + # #the definition defines the setting with a default value that is + # #valid. Therefore we can allow both ValidatorState.Valid and None as + # #allowable validation states. + # #TODO: This assumption is wrong! If the definition defines an inheritance function that through inheritance evaluates to a disallowed value, a setting is still invalid even though it's default! + # #TODO: Therefore we must also validate setting definitions. + # if validation_state != None and validation_state != ValidatorState.Valid: + # Logger.log("w", "Setting %s is not valid, but %s. Aborting slicing.", key, validation_state) + # if self._message: #Hide any old message before creating a new one. + # self._message.hide() + # self._message = None + # self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) + # self._message.show() + # return self.processingProgress.emit(0.0) self.backendStateChange.emit(BackendState.NOT_STARTED) @@ -168,7 +168,7 @@ class CuraEngineBackend(Backend): self.slicingStarted.emit() slice_message = self._socket.createMessage("cura.proto.Slice") - settings_message = self._socket.createMessage("cura.proto.SettingList"); + settings_message = self._socket.createMessage("cura.proto.SettingList") self._start_slice_job = StartSliceJob.StartSliceJob(slice_message, settings_message) self._start_slice_job.start() self._start_slice_job.finished.connect(self._onStartSliceCompleted) From 214d385dae06952d5e6af212f453effe70636c58 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 26 May 2016 17:11:41 +0200 Subject: [PATCH 390/424] fix: moved extruder definition settings to a new file fdmextruder.def.json (CURA-1616) --- resources/definitions/fdmextruder.def.json | 119 +++++++++++++++++++++ resources/definitions/fdmprinter.def.json | 100 +---------------- 2 files changed, 124 insertions(+), 95 deletions(-) create mode 100644 resources/definitions/fdmextruder.def.json diff --git a/resources/definitions/fdmextruder.def.json b/resources/definitions/fdmextruder.def.json new file mode 100644 index 0000000000..6533d211c5 --- /dev/null +++ b/resources/definitions/fdmextruder.def.json @@ -0,0 +1,119 @@ +{ + "id": "fdmextruder", + "name": "Extruder", + "version": 2, + "metadata": + { + "type": "extruder", + "author": "Ultimaker B.V.", + "manufacturer": "Ultimaker", + "visible": false + }, + "settings": + { + "machine_settings": + { + "label": "Machine", + "type": "category", + "description": "Machine specific settings", + "children": + { + "extruder_nr": + { + "label": "Extruder", + "description": "The extruder train used for printing. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1" + }, + "machine_nozzle_offset_x": + { + "label": "Nozzle X Offset", + "description": "The x-coordinate of the offset of the nozzle.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_nozzle_offset_y": + { + "label": "Nozzle Y Offset", + "description": "The y-coordinate of the offset of the nozzle.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_start_code": + { + "label": "Extruder Start G-Code", + "description": "Start g-code to execute whenever turning the extruder on.", + "type": "str", + "default_value": "", + "global_only": "True" + }, + "machine_extruder_start_pos_abs": + { + "label": "Extruder Start Position Absolute", + "description": "Make the extruder starting position absolute rather than relative to the last-known location of the head.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "machine_extruder_start_pos_x": + { + "label": "Extruder Start Position X", + "description": "The x-coordinate of the starting position when turning the extruder on.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_start_pos_y": + { + "label": "Extruder Start Position Y", + "description": "The y-coordinate of the starting position when turning the extruder on.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_end_code": + { + "label": "Extruder End G-Code", + "description": "End g-code to execute whenever turning the extruder off.", + "type": "str", + "default_value": "", + "global_only": "True" + }, + "machine_extruder_end_pos_abs": + { + "label": "Extruder End Position Absolute", + "description": "Make the extruder ending position absolute rather than relative to the last-known location of the head.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "machine_extruder_end_pos_x": + { + "label": "Extruder End Position X", + "description": "The x-coordinate of the ending position when turning the extruder off.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_end_pos_y": + { + "label": "Extruder End Position Y", + "description": "The y-coordinate of the ending position when turning the extruder off.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + } + } + } +} diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 150fbbdffc..f8400d6d62 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4,6 +4,7 @@ "version": 2, "metadata": { + "type": "machine", "author": "Ultimaker B.V.", "category": "Ultimaker", "manufacturer": "Ultimaker", @@ -12,6 +13,10 @@ "preferred_material": "pla", "preferred_quality": "normal" }, + "machine_extruder_trains": + { + "0": "fdmextruder" + }, "settings": { "machine_settings": @@ -242,92 +247,6 @@ "minimum_value": "0.001", "maximum_value_warning": "10" }, - "machine_nozzle_offset_x": - { - "label": "Nozzle X Offset", - "description": "The x-coordinate of the offset of the nozzle.", - "type": "float", - "unit": "mm", - "default_value": 0, - "global_only": "True" - }, - "machine_nozzle_offset_y": - { - "label": "Nozzle Y Offset", - "description": "The y-coordinate of the offset of the nozzle.", - "type": "float", - "unit": "mm", - "default_value": 0, - "global_only": "True" - }, - "machine_extruder_start_code": - { - "label": "Extruder Start G-Code", - "description": "Start g-code to execute whenever turning the extruder on.", - "type": "str", - "default_value": "", - "global_only": "True" - }, - "machine_extruder_start_pos_abs": - { - "label": "Extruder Start Position Absolute", - "description": "Make the extruder starting position absolute rather than relative to the last-known location of the head.", - "type": "bool", - "default_value": false, - "global_only": "True" - }, - "machine_extruder_start_pos_x": - { - "label": "Extruder Start Position X", - "description": "The x-coordinate of the starting position when turning the extruder on.", - "type": "float", - "unit": "mm", - "default_value": 0, - "global_only": "True" - }, - "machine_extruder_start_pos_y": - { - "label": "Extruder Start Position Y", - "description": "The y-coordinate of the starting position when turning the extruder on.", - "type": "float", - "unit": "mm", - "default_value": 0, - "global_only": "True" - }, - "machine_extruder_end_code": - { - "label": "Extruder End G-Code", - "description": "End g-code to execute whenever turning the extruder off.", - "type": "str", - "default_value": "", - "global_only": "True" - }, - "machine_extruder_end_pos_abs": - { - "label": "Extruder End Position Absolute", - "description": "Make the extruder ending position absolute rather than relative to the last-known location of the head.", - "type": "bool", - "default_value": false, - "global_only": "True" - }, - "machine_extruder_end_pos_x": - { - "label": "Extruder End Position X", - "description": "The x-coordinate of the ending position when turning the extruder off.", - "type": "float", - "unit": "mm", - "default_value": 0, - "global_only": "True" - }, - "machine_extruder_end_pos_y": - { - "label": "Extruder End Position Y", - "description": "The y-coordinate of the ending position when turning the extruder off.", - "type": "float", - "unit": "mm", - "default_value": 0, - "global_only": "True" - }, "machine_use_extruder_offset_to_offset_coords": { "label": "Offset With Extruder", @@ -2201,15 +2120,6 @@ "description": "Settings used for printing with multiple extruders.", "children": { - "extruder_nr": - { - "label": "Extruder", - "description": "The extruder train used for printing. This is used in multi-extrusion.", - "type": "int", - "default_value": 0, - "minimum_value": "0", - "maximum_value": "machine_extruder_count - 1" - }, "adhesion_extruder_nr": { "label": "Platform Adhesion Extruder", From c01e7144d16511148db002a0316ae077e176ca0a Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 18:06:40 +0200 Subject: [PATCH 391/424] Consistently change the spelling of bounding box bounding box, bounding_box, boundingBox --- cura/CuraApplication.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 9691b638a1..48f283f7f1 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -111,7 +111,7 @@ class CuraApplication(QtApplication): self._i18n_catalog = None self._previous_active_tool = None self._platform_activity = False - self._scene_boundingbox = AxisAlignedBox() + self._scene_bounding_box = AxisAlignedBox() self._job_name = None self._center_after_select = False self._camera_animation = None @@ -384,26 +384,26 @@ class CuraApplication(QtApplication): @pyqtProperty(str, notify = sceneBoundingBoxChanged) def getSceneBoundingBoxString(self): - return self._i18n_catalog.i18nc("@info", "%(width).1f x %(depth).1f x %(height).1f mm") % {'width' : self._scene_boundingbox.width.item(), 'depth': self._scene_boundingbox.depth.item(), 'height' : self._scene_boundingbox.height.item()} + return self._i18n_catalog.i18nc("@info", "%(width).1f x %(depth).1f x %(height).1f mm") % {'width' : self._scene_bounding_box.width.item(), 'depth': self._scene_bounding_box.depth.item(), 'height' : self._scene_bounding_box.height.item()} def updatePlatformActivity(self, node = None): count = 0 - scene_boundingbox = None + scene_bounding_box = None for node in DepthFirstIterator(self.getController().getScene().getRoot()): if type(node) is not SceneNode or not node.getMeshData(): continue count += 1 - if not scene_boundingbox: - scene_boundingbox = copy.deepcopy(node.getBoundingBox()) + if not scene_bounding_box: + scene_bounding_box = copy.deepcopy(node.getBoundingBox()) else: - scene_boundingbox += node.getBoundingBox() + scene_bounding_box += node.getBoundingBox() - if not scene_boundingbox: - scene_boundingbox = AxisAlignedBox() + if not scene_bounding_box: + scene_bounding_box = AxisAlignedBox() - if repr(self._scene_boundingbox) != repr(scene_boundingbox): - self._scene_boundingbox = scene_boundingbox + if repr(self._scene_bounding_box) != repr(scene_bounding_box): + self._scene_bounding_box = scene_bounding_box self.sceneBoundingBoxChanged.emit() self._platform_activity = True if count > 0 else False From 53661b27393395183aa69889485baab40c385e32 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 22:18:34 +0200 Subject: [PATCH 392/424] Ensure a machine gets a unique names when adding or renaming a machine CURA-1606 --- cura/MachineManagerModel.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 8354f3a140..64990f9ab7 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -5,6 +5,8 @@ from UM.Preferences import Preferences import UM.Settings +import re + class MachineManagerModel(QObject): def __init__(self, parent = None): super().__init__(parent) @@ -64,6 +66,7 @@ class MachineManagerModel(QObject): definitions = UM.Settings.ContainerRegistry.getInstance().findDefinitionContainers(id=definition_id) if definitions: definition = definitions[0] + name = self._uniqueMachineName(name, definition.getName()) new_global_stack = UM.Settings.ContainerStack(name) new_global_stack.addMetaDataEntry("type", "machine") @@ -127,6 +130,25 @@ class MachineManagerModel(QObject): Application.getInstance().setGlobalContainerStack(new_global_stack) + # Create a name that is not empty and unique + def _uniqueMachineName(self, name, fallback_name): + name = name.strip() + num_check = re.compile("(.*?)\s*#\d$").match(name) + if(num_check): + name = num_check.group(1) + if name == "": + name = fallback_name + unique_name = name + i = 1 + + #Check both the id and the name, because they may not be the same and it is better if they are both unique + while UM.Settings.ContainerRegistry.getInstance().findContainers(None, id = unique_name) or + UM.Settings.ContainerRegistry.getInstance().findContainers(None, name = unique_name): + i = i + 1 + unique_name = "%s #%d" % (name, i) + + return unique_name + @pyqtProperty(str, notify = globalContainerChanged) def activeMachineName(self): if self._global_container_stack: @@ -239,6 +261,7 @@ class MachineManagerModel(QObject): def renameMachine(self, machine_id, new_name): containers = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = machine_id) if containers: + new_name = self._uniqueMachineName(new_name, containers[0].getBottom().getName()) containers[0].setName(new_name) @pyqtSlot(str) From b60e704aa6cfa86cb8c7b088ca8b94943affae06 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 22:29:21 +0200 Subject: [PATCH 393/424] Fix typo CURA-1606 --- cura/MachineManagerModel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 64990f9ab7..11cb55d2b4 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -142,8 +142,8 @@ class MachineManagerModel(QObject): i = 1 #Check both the id and the name, because they may not be the same and it is better if they are both unique - while UM.Settings.ContainerRegistry.getInstance().findContainers(None, id = unique_name) or - UM.Settings.ContainerRegistry.getInstance().findContainers(None, name = unique_name): + while UM.Settings.ContainerRegistry.getInstance().findContainers(None, id = unique_name) or \ + UM.Settings.ContainerRegistry.getInstance().findContainers(None, name = unique_name): i = i + 1 unique_name = "%s #%d" % (name, i) From 3311fa8033f8cf8832e972fc6b78f1c2ab0f462c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 27 May 2016 10:23:28 +0200 Subject: [PATCH 394/424] Add resource type for extruder definitions The definition is derived with inheritance, just like the printers. Therefore I decided to call this 'ExtruderStack' in line with how the resource type for the printer is named. Contributes to issue CURA-1278. --- cura/CuraApplication.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 0e7f3b4b42..403cda19e8 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -75,7 +75,7 @@ class CuraApplication(QtApplication): VariantInstanceContainer = Resources.UserType + 5 UserInstanceContainer = Resources.UserType + 6 MachineStack = Resources.UserType + 7 - ExtruderInstanceContainer = Resources.UserType + 8 + ExtruderStack = Resources.UserType + 8 Q_ENUMS(ResourceTypes) @@ -127,13 +127,14 @@ class CuraApplication(QtApplication): Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants") Resources.addStorageType(self.ResourceTypes.MaterialInstanceContainer, "materials") - Resources.addStorageType(self.ResourceTypes.ExtruderInstanceContainer, "extruders") + Resources.addStorageType(self.ResourceTypes.ExtruderStack, "extruders") Resources.addStorageType(self.ResourceTypes.UserInstanceContainer, "user") Resources.addStorageType(self.ResourceTypes.MachineStack, "machine_instances") ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.QualityInstanceContainer) ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.VariantInstanceContainer) ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.MaterialInstanceContainer) + ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.ExtruderStack) ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.UserInstanceContainer) ContainerRegistry.getInstance().addResourceType(self.ResourceTypes.MachineStack) From c9144460608e4b37ce850c51ac71439b54b14930 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 27 May 2016 11:26:41 +0200 Subject: [PATCH 395/424] Initial changes for perobject stuff CURA-1278 --- cura/SettingOverrideDecorator.py | 4 +- .../PerObjectSettingsTool/PerObjectItem.qml | 4 +- .../PerObjectSettingVisibilityHandler.py | 76 +++++++++++++++++ .../PerObjectSettingsModel.py | 33 +++----- .../PerObjectSettingsPanel.qml | 82 ++++++------------- plugins/PerObjectSettingsTool/__init__.py | 4 + 6 files changed, 119 insertions(+), 84 deletions(-) create mode 100644 plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py diff --git a/cura/SettingOverrideDecorator.py b/cura/SettingOverrideDecorator.py index 826970c51f..ae06be8512 100644 --- a/cura/SettingOverrideDecorator.py +++ b/cura/SettingOverrideDecorator.py @@ -14,8 +14,8 @@ from UM.Application import Application class SettingOverrideDecorator(SceneNodeDecorator): def __init__(self): super().__init__() - self._stack = ContainerStack(id = "SettingOverrideStack") - self._instance = InstanceContainer(id = "SettingOverrideInstanceContainer") + self._stack = ContainerStack(stack_id = "SettingOverrideStack") + self._instance = InstanceContainer(container_id = "SettingOverrideInstanceContainer") self._stack.addContainer(self._instance) Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged) diff --git a/plugins/PerObjectSettingsTool/PerObjectItem.qml b/plugins/PerObjectSettingsTool/PerObjectItem.qml index d2243ab562..e0d389443f 100644 --- a/plugins/PerObjectSettingsTool/PerObjectItem.qml +++ b/plugins/PerObjectSettingsTool/PerObjectItem.qml @@ -16,13 +16,13 @@ UM.TooltipArea width: childrenRect.width; height: childrenRect.height; - Button + CheckBox { id: check text: definition.label - //onClicked: delegateItem.settingsModel.setSettingVisible(model.key, checked); + onClicked: addedSettingsModel.setVisible(model.key, checked); } } diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py new file mode 100644 index 0000000000..e56ad520c6 --- /dev/null +++ b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py @@ -0,0 +1,76 @@ +from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal +from UM.Application import Application +from UM.Settings.SettingInstance import SettingInstance +from UM.Logger import Logger + +from cura.SettingOverrideDecorator import SettingOverrideDecorator + + +class PerObjectSettingVisibilityHandler(QObject): + def __init__(self, parent = None, *args, **kwargs): + super().__init__(parent = parent, *args, **kwargs) + self._selected_object_id = None + + visibilityChanged = pyqtSignal() + + def setSelectedObjectId(self, id): + self._selected_object_id = id + self.visibilityChanged.emit() + + @pyqtProperty("quint64", fset = setSelectedObjectId) + def selectedObjectId(self): + pass + + def setVisible(self, visible): + node = Application.getInstance().getController().getScene().findObject(self._selected_object_id) + if not node: + return + stack = node.callDecoration("getStack") + if not stack: + node.addDecorator(SettingOverrideDecorator()) + stack = node.callDecoration("getStack") + + settings = stack.getTop() + all_instances = settings.findInstances(**{}) + visibility_changed = False # Flag to check if at the end the signal needs to be emitted + + # Remove all instances that are not in visibility list + for instance in all_instances: + if instance.definition.key not in visible: + settings.removeInstance(instance.definition.key) + visibility_changed = True + + # Add all instances that are not added, but are in visiblity list + for item in visible: + if not settings.getInstance(item): + definition_container = Application.getInstance().getGlobalContainerStack().getBottom() + definitions = definition_container.findDefinitions(key = item) + if definitions: + settings.addInstance(SettingInstance(definitions[0], settings)) + visibility_changed = True + else: + Logger.log("w", "Unable to add instance (%s) to perobject visibility because we couldn't find the matching definition", item) + + if visibility_changed: + self.visibilityChanged.emit() + #settings.addInstance(SettingInstance()) + + def getVisible(self): + visible_settings = set() + node = Application.getInstance().getController().getScene().findObject(self._selected_object_id) + if not node: + return visible_settings + + stack = node.callDecoration("getStack") + if not stack: + return visible_settings + + settings = stack.getTop() + if not settings: + return visible_settings + + all_instances = settings.findInstances(**{}) + for instance in all_instances: + visible_settings.add(instance.definition.key) + return visible_settings + diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py b/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py index cbe22d129e..74a1fbed9a 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py @@ -13,21 +13,14 @@ from UM.Scene.SceneNode import SceneNode from . import SettingOverrideModel class PerObjectSettingsModel(ListModel): - IdRole = Qt.UserRole + 1 - XRole = Qt.UserRole + 2 - YRole = Qt.UserRole + 3 - MaterialRole = Qt.UserRole + 4 - ProfileRole = Qt.UserRole + 5 - SettingsRole = Qt.UserRole + 6 + IdRole = Qt.UserRole + 1 # ID of the node def __init__(self, parent = None): super().__init__(parent) self._scene = Application.getInstance().getController().getScene() self._root = self._scene.getRoot() self.addRoleName(self.IdRole,"id") - self.addRoleName(self.MaterialRole, "material") - self.addRoleName(self.ProfileRole, "profile") - self.addRoleName(self.SettingsRole, "settings") + self._updateModel() @pyqtSlot("quint64", str) @@ -48,7 +41,7 @@ class PerObjectSettingsModel(ListModel): node.removeDecorator(ProfileOverrideDecorator)''' @pyqtSlot("quint64", str) - def addSettingOverride(self, object_id, key): + def addOverride(self, object_id, key): machine = Application.getInstance().getMachineManager().getActiveMachineInstance() if not machine: return @@ -60,7 +53,7 @@ class PerObjectSettingsModel(ListModel): node.callDecoration("addSetting", key) @pyqtSlot("quint64", str) - def removeSettingOverride(self, object_id, key): + def removerOverride(self, object_id, key): node = self._scene.findObject(object_id) node.callDecoration("removeSetting", key) @@ -69,18 +62,14 @@ class PerObjectSettingsModel(ListModel): def _updateModel(self): self.clear() + for node in BreadthFirstIterator(self._root): if type(node) is not SceneNode or not node.isSelectable(): continue - node_profile = node.callDecoration("getProfile") - if not node_profile: - node_profile = "global" - else: - node_profile = node_profile.getName() - self.appendItem({ - "id": id(node), - "material": "", - "profile": node_profile, - "settings": SettingOverrideModel.SettingOverrideModel(node) - }) + node_stack = node.callDecoration("getStack") + + if not node_stack: + self.appendItem({ + "id": id(node) + }) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 9b78116d24..5213c7ee58 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -20,73 +20,38 @@ Item { width: childrenRect.width; height: childrenRect.height; - Column { + Column + { id: items anchors.top: parent.top; anchors.left: parent.left; spacing: UM.Theme.getSize("default_margin").height; - - Column { - id: customisedSettings + height: childrenRect.height; + ListView + { + id: contents spacing: UM.Theme.getSize("default_lining").height; - width: UM.Theme.getSize("setting").width + UM.Theme.getSize("setting").height/2; + height: childrenRect.height; - Repeater { - id: settings; - - model: UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex).settings - - UM.SettingItem { - width: UM.Theme.getSize("setting").width; - height: UM.Theme.getSize("setting").height; - - name: model.label; - type: model.type; - value: model.value; - description: model.description; - unit: model.unit; - valid: model.valid; - visible: !model.global_only - options: model.options - indent: false - - style: UM.Theme.styles.setting_item; - - onItemValueChanged: { - settings.model.setSettingValue(model.key, value) - } - - Button - { - anchors.left: parent.right; - - width: UM.Theme.getSize("setting").height; - height: UM.Theme.getSize("setting").height; - - onClicked: UM.ActiveTool.properties.getValue("Model").removeSettingOverride(UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex).id, model.key) - - style: ButtonStyle - { - background: Rectangle - { - color: control.hovered ? control.parent.style.controlHighlightColor : control.parent.style.controlColor; - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width/2 - height: parent.height/2 - sourceSize.width: width - sourceSize.height: width - color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button") - source: UM.Theme.getIcon("cross1") - } - } - } - } + model: UM.SettingDefinitionsModel { + id: addedSettingsModel; + containerId: Cura.MachineManager.activeDefinitionId + visibilityHandler: Cura.PerObjectSettingVisibilityHandler { + selectedObjectId: UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex).id } } + + delegate:Button + { + anchors.left: parent.right; + + width: 150 + height:50 + + text: model.label + } + } Button @@ -184,6 +149,7 @@ Item { { "global_only": false } + visibilityHandler: UM.SettingPreferenceVisibilityHandler {} } delegate:Loader { diff --git a/plugins/PerObjectSettingsTool/__init__.py b/plugins/PerObjectSettingsTool/__init__.py index d5d249b430..1779556ade 100644 --- a/plugins/PerObjectSettingsTool/__init__.py +++ b/plugins/PerObjectSettingsTool/__init__.py @@ -2,6 +2,8 @@ # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool +from . import PerObjectSettingVisibilityHandler +from PyQt5.QtQml import qmlRegisterType from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("cura") @@ -25,4 +27,6 @@ def getMetaData(): } def register(app): + qmlRegisterType(PerObjectSettingVisibilityHandler.PerObjectSettingVisibilityHandler, "Cura", 1, 0, + "PerObjectSettingVisibilityHandler") return { "tool": PerObjectSettingsTool.PerObjectSettingsTool() } From 64a613f407ad4065d5c30a96dbad82eae59c63d9 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 27 May 2016 11:47:50 +0200 Subject: [PATCH 396/424] Fix "Activate" button on the Manage Printers page CURA-1278 --- resources/qml/MachinesPage.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/qml/MachinesPage.qml b/resources/qml/MachinesPage.qml index 14425acc05..8c7a2c521d 100644 --- a/resources/qml/MachinesPage.qml +++ b/resources/qml/MachinesPage.qml @@ -22,9 +22,11 @@ UM.ManagementPage onAddObject: Printer.requestAddPrinter() onRemoveObject: confirmDialog.open(); onRenameObject: renameDialog.open(); + onActivateObject: Cura.MachineManager.setActiveMachine(base.currentItem.id) - removeEnabled: numInstances > 1 - renameEnabled: numInstances > 0 + removeEnabled: base.currentItem != null && numInstances > 1 + renameEnabled: base.currentItem != null && numInstances > 0 + activateEnabled: base.currentItem != null Flow { From 63556318425f595129aaee1aa8b6e98f1c9d1e39 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 27 May 2016 11:53:53 +0200 Subject: [PATCH 397/424] Activate another machine when we remove the currently active MachineManagerModel CURA-1278 --- cura/MachineManagerModel.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 11cb55d2b4..7b42483fca 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -266,6 +266,11 @@ class MachineManagerModel(QObject): @pyqtSlot(str) def removeMachine(self, machine_id): + # If the machine that is being removed is the currently active machine, set another machine as the active machine + if self._global_container_stack and self._global_container_stack.getId() == machine_id: + containers = UM.Settings.ContainerRegistry.getInstance().findContainerStacks() + if containers: + Application.getInstance().setGlobalContainerStack(containers[0]) UM.Settings.ContainerRegistry.getInstance().removeContainer(machine_id) @pyqtProperty(bool, notify = globalContainerChanged) From aa2d09aa0863b42284b001bbe99171ae26bbc2a0 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 27 May 2016 12:44:49 +0200 Subject: [PATCH 398/424] JSON lil fix: superflious comma (CURA-1616) --- resources/definitions/fdmextruder.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmextruder.def.json b/resources/definitions/fdmextruder.def.json index 6533d211c5..e9be929e72 100644 --- a/resources/definitions/fdmextruder.def.json +++ b/resources/definitions/fdmextruder.def.json @@ -112,7 +112,7 @@ "unit": "mm", "default_value": 0, "global_only": "True" - }, + } } } } From 990d05815be06e3929978f67c61465b611898e5d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 27 May 2016 14:00:38 +0200 Subject: [PATCH 399/424] Added qml files to import path --- cura/CuraApplication.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 0e7f3b4b42..29e2fe4667 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -320,6 +320,7 @@ class CuraApplication(QtApplication): MachineManagerModel.createMachineManagerModel) self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml")) + self._qml_import_paths.append(Resources.getPath(self.ResourceTypes.QmlFiles)) self.initializeEngine() if self._engine.rootObjects: From 41425fd36e35bfb74a8bc53e06106c55a7d2b10f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 27 May 2016 14:39:53 +0200 Subject: [PATCH 400/424] Replace symbols in default visible settings before usage These characters are just for visualisation in the code. They should never be used during the normal operation of the program, nor should they be saved to the file. So just replace them immediately. Contributes to issue CURA-1278. --- cura/CuraApplication.py | 72 ++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 2b0feb2b23..f0610a3538 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -150,42 +150,42 @@ class CuraApplication(QtApplication): Preferences.getInstance().setDefault("local_file/last_used_type", "text/x-gcode") Preferences.getInstance().setDefault("general/visible_settings", """ - machine_settings - resolution - layer_height - shell - wall_thickness - top_bottom_thickness - infill - infill_sparse_density - material - material_print_temperature - material_bed_temperature - material_diameter - material_flow - retraction_enable - speed - speed_print - speed_travel - travel - cooling - cool_fan_enabled - support - support_enable - support_type - support_roof_density - platform_adhesion - adhesion_type - brim_width - raft_airgap - layer_0_z_overlap - raft_surface_layers - meshfix - blackmagic - print_sequence - dual - experimental - """) + machine_settings + resolution + layer_height + shell + wall_thickness + top_bottom_thickness + infill + infill_sparse_density + material + material_print_temperature + material_bed_temperature + material_diameter + material_flow + retraction_enable + speed + speed_print + speed_travel + travel + cooling + cool_fan_enabled + support + support_enable + support_type + support_roof_density + platform_adhesion + adhesion_type + brim_width + raft_airgap + layer_0_z_overlap + raft_surface_layers + meshfix + blackmagic + print_sequence + dual + experimental + """.replace("\n", ";").replace(" ", "")) JobQueue.getInstance().jobFinished.connect(self._onJobFinished) From 89c1136d7fccd6f8370a10bc3ede18baba6b6a81 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 27 May 2016 15:28:54 +0200 Subject: [PATCH 401/424] Per object settings can now be added & changed CURA-1278 --- cura/SettingOverrideDecorator.py | 4 +- .../PerObjectSettingsTool/PerObjectItem.qml | 9 ++- .../PerObjectSettingVisibilityHandler.py | 1 - .../PerObjectSettingsPanel.qml | 68 +++++++++++++++---- .../PerObjectSettingsTool.py | 33 +++++---- 5 files changed, 85 insertions(+), 30 deletions(-) diff --git a/cura/SettingOverrideDecorator.py b/cura/SettingOverrideDecorator.py index ae06be8512..3e8815ec67 100644 --- a/cura/SettingOverrideDecorator.py +++ b/cura/SettingOverrideDecorator.py @@ -14,10 +14,12 @@ from UM.Application import Application class SettingOverrideDecorator(SceneNodeDecorator): def __init__(self): super().__init__() - self._stack = ContainerStack(stack_id = "SettingOverrideStack") + self._stack = ContainerStack(stack_id = id(self)) self._instance = InstanceContainer(container_id = "SettingOverrideInstanceContainer") self._stack.addContainer(self._instance) + ContainerRegistry.getInstance().addContainer(self._stack) + Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged) self._onGlobalContainerStackChanged() diff --git a/plugins/PerObjectSettingsTool/PerObjectItem.qml b/plugins/PerObjectSettingsTool/PerObjectItem.qml index e0d389443f..2dddf0b444 100644 --- a/plugins/PerObjectSettingsTool/PerObjectItem.qml +++ b/plugins/PerObjectSettingsTool/PerObjectItem.qml @@ -16,13 +16,18 @@ UM.TooltipArea width: childrenRect.width; height: childrenRect.height; - CheckBox + Button { id: check text: definition.label - onClicked: addedSettingsModel.setVisible(model.key, checked); + onClicked: + { + addedSettingsModel.setVisible(model.key, true); + settingPickDialog.visible = false + UM.ActiveTool.forceUpdate() + } } } diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py index e56ad520c6..9ef2515bed 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py @@ -53,7 +53,6 @@ class PerObjectSettingVisibilityHandler(QObject): if visibility_changed: self.visibilityChanged.emit() - #settings.addInstance(SettingInstance()) def getVisible(self): visible_settings = set() diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 5213c7ee58..8c9b63ac1b 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -10,16 +10,20 @@ import UM 1.2 as UM import Cura 1.0 as Cura import ".." - Item { id: base; - property int currentIndex: UM.ActiveTool.properties.getValue("SelectedIndex") UM.I18nCatalog { id: catalog; name: "cura"; } width: childrenRect.width; height: childrenRect.height; + + function updateContainerID() + { + console.log("containerid",UM.ActiveTool.properties.getValue("ContainerID")) + } + Column { id: items @@ -27,33 +31,69 @@ Item { anchors.left: parent.left; spacing: UM.Theme.getSize("default_margin").height; - height: childrenRect.height; - ListView + + Repeater { id: contents - spacing: UM.Theme.getSize("default_lining").height; height: childrenRect.height; - model: UM.SettingDefinitionsModel { + model: UM.SettingDefinitionsModel + { id: addedSettingsModel; containerId: Cura.MachineManager.activeDefinitionId - visibilityHandler: Cura.PerObjectSettingVisibilityHandler { - selectedObjectId: UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex).id + visibilityHandler: Cura.PerObjectSettingVisibilityHandler + { + selectedObjectId: UM.ActiveTool.properties.getValue("SelectedObjectId") } } - delegate:Button + delegate: Loader { - anchors.left: parent.right; + width: UM.Theme.getSize("setting").width; + height: UM.Theme.getSize("setting").height; - width: 150 - height:50 + property var definition: model + property var settingDefinitionsModel: addedSettingsModel + property var propertyProvider: provider - text: model.label + //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 + //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, + //causing nasty issues when selecting differnt options. So disable asynchronous loading of enum type completely. + asynchronous: model.type != "enum" + + source: + { + switch(model.type) // TODO: This needs to be fixed properly. Got frustrated with it not working, so this is the patch job! + { + case "int": + return "../../resources/qml/Settings/SettingTextField.qml" + case "float": + return "../../resources/qml/Settings/SettingTextField.qml" + case "enum": + return "../../resources/qml/Settings/SettingComboBox.qml" + case "bool": + return "../../resources/qml/Settings/SettingCheckBox.qml" + case "str": + return "../../resources/qml/Settings/SettingTextField.qml" + case "category": + return "../../resources/qml/Settings/SettingCategory.qml" + default: + return "../../resources/qml/Settings/SettingUnknown.qml" + } + } + + UM.SettingPropertyProvider + { + id: provider + + containerStackId: UM.ActiveTool.properties.getValue("ContainerID") + key: model.key + watchedProperties: [ "value", "enabled", "state", "validationState" ] + storeIndex: 0 + } } } - Button { id: customise_settings_button; diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py index dc65725839..c74800e83d 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py @@ -13,23 +13,16 @@ class PerObjectSettingsTool(Tool): super().__init__() self._model = None - self.setExposedProperties("Model", "SelectedIndex") + self.setExposedProperties("SelectedObjectId","ContainerID") Preferences.getInstance().preferenceChanged.connect(self._onPreferenceChanged) + Selection.selectionChanged.connect(self.propertyChanged) self._onPreferenceChanged("cura/active_mode") def event(self, event): return False - def getModel(self): - if not self._model: - self._model = PerObjectSettingsModel.PerObjectSettingsModel() - - #For some reason, casting this model to itself causes the model to properly be cast to a QVariant, even though it ultimately inherits from QVariant. - #Yeah, we have no idea either... - return PerObjectSettingsModel.PerObjectSettingsModel(self._model) - - def getSelectedIndex(self): + def getSelectedObjectId(self): try: selected_object = Selection.getSelectedObject(0) if selected_object.getParent().callDecoration("isGroup"): @@ -37,8 +30,24 @@ class PerObjectSettingsTool(Tool): except: selected_object = None selected_object_id = id(selected_object) - index = self.getModel().find("id", selected_object_id) - return index + return selected_object_id + + def getContainerID(self): + try: + selected_object = Selection.getSelectedObject(0) + if selected_object.getParent().callDecoration("isGroup"): + selected_object = selected_object.getParent() + try: + return selected_object.callDecoration("getStack").getId() + except: + print(":(") + return + except: + print(":((") + return + + def setContainerID(self, value): + pass def _onPreferenceChanged(self, preference): if preference == "cura/active_mode": From f5fce512380209c1a05687ef83c4d2bf0f8b0bec Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 27 May 2016 17:11:54 +0200 Subject: [PATCH 402/424] Fix "Defaults" button on General page CURA-1278 --- resources/qml/GeneralPage.qml | 37 +++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index 4f597ff32b..56782ea70a 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -5,6 +5,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import QtQuick.Controls.Styles 1.1 +import QtQml.Models 2.2 import UM 1.1 as UM @@ -28,18 +29,23 @@ UM.PreferencesPage function reset() { UM.Preferences.resetPreference("general/language") - UM.Preferences.resetPreference("physics/automatic_push_free") - UM.Preferences.resetPreference("mesh/scale_to_fit") - UM.Preferences.resetPreference("info/send_slice_info") - UM.Preferences.resetPreference("cura/jobname_prefix") - pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) - sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) - scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) - prefixJobNameCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/jobname_prefix")) var defaultLanguage = UM.Preferences.getValue("general/language") setDefaultLanguage(defaultLanguage) - if (UM.Models.pluginsModel.find("id", "UpdateChecker") > -1) { + UM.Preferences.resetPreference("physics/automatic_push_free") + pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) + UM.Preferences.resetPreference("mesh/scale_to_fit") + scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) + UM.Preferences.resetPreference("mesh/scale_tiny_meshes") + scaleTinyCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_tiny_meshes")) + UM.Preferences.resetPreference("cura/jobname_prefix") + prefixJobNameCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/jobname_prefix")) + + if (plugins.model.find("id", "SliceInfoPlugin") > -1) { + UM.Preferences.resetPreference("info/send_slice_info") + sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) + } + if (plugins.model.find("id", "UpdateChecker") > -1) { UM.Preferences.resetPreference("info/automatic_update_check") checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) } @@ -158,9 +164,9 @@ UM.PreferencesPage } UM.TooltipArea { - visible: UM.Models.pluginsModel.find("id", "UpdateChecker") > -1 + visible: plugins.model.find("id", "UpdateChecker") > -1 width: childrenRect.width - height: childrenRect.height + height: visible ? childrenRect.height : 0 text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") CheckBox @@ -173,8 +179,9 @@ UM.PreferencesPage } UM.TooltipArea { + visible: plugins.model.find("id", "SliceInfoPlugin-1") > -1 width: childrenRect.width - height: childrenRect.height + height: visible ? childrenRect.height : 0 text: catalog.i18nc("@info:tooltip","Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.") CheckBox @@ -199,5 +206,11 @@ UM.PreferencesPage onCheckedChanged: UM.Preferences.setValue("cura/jobname_prefix", checked) } } + + DelegateModel + { + id: plugins + model: UM.PluginsModel { } + } } } From 525f608b242a70d553e18ed724f4b40694950936 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 27 May 2016 17:17:26 +0200 Subject: [PATCH 403/424] Remove reference to machine_extruder_count This setting is not defined in this definition so it can't find the value of it here. I've re-introduced the maximum_value statically in the Jedi implementations of this setting. Contributes to issue CURA-1278 and CURA-351. --- resources/definitions/fdmextruder.def.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/definitions/fdmextruder.def.json b/resources/definitions/fdmextruder.def.json index e9be929e72..f755d72c4a 100644 --- a/resources/definitions/fdmextruder.def.json +++ b/resources/definitions/fdmextruder.def.json @@ -24,8 +24,7 @@ "description": "The extruder train used for printing. This is used in multi-extrusion.", "type": "int", "default_value": 0, - "minimum_value": "0", - "maximum_value": "machine_extruder_count - 1" + "minimum_value": "0" }, "machine_nozzle_offset_x": { From 6aa00a951f95d2e91158a6cb359205829c5e3ade Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 27 May 2016 17:21:14 +0200 Subject: [PATCH 404/424] Fix triggering actions from the extensions menu Contributes to CURA-1540, CURA-1278 --- resources/qml/Cura.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 04ca44369c..a7f4a43c22 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -305,6 +305,7 @@ UM.MainWindow Instantiator { + id: extenions model: UM.ExtensionModel { } Menu @@ -319,7 +320,7 @@ UM.MainWindow MenuItem { text: model.text - onTriggered: UM.Models.extensionModel.subMenuTriggered(name, model.text) + onTriggered: extenions.model.subMenuTriggered(name, model.text) } onObjectAdded: sub_menu.insertItem(index, object) onObjectRemoved: sub_menu.removeItem(object) From 472012a5b9451fc338d012de34e44deae8cca5c5 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 27 May 2016 17:46:53 +0200 Subject: [PATCH 405/424] Fix debug code introduced in f5fce512380209c1a05687ef83c4d2bf0f8b0bec --- resources/qml/GeneralPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index 56782ea70a..dcd5c66d73 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -179,7 +179,7 @@ UM.PreferencesPage } UM.TooltipArea { - visible: plugins.model.find("id", "SliceInfoPlugin-1") > -1 + visible: plugins.model.find("id", "SliceInfoPlugin") > -1 width: childrenRect.width height: visible ? childrenRect.height : 0 text: catalog.i18nc("@info:tooltip","Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.") From c63eb3871c3c60a1d1b153221a0c93078347ec10 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 12:22:12 +0200 Subject: [PATCH 406/424] Account for the changes to BackendState in Uranium Contributes to CURA-1278 --- .../CuraEngineBackend/CuraEngineBackend.py | 9 ++--- resources/qml/SaveButton.qml | 40 +++++++++++++------ 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index c9a0efbbcb..989e3a0c50 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -1,13 +1,12 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. -from UM.Backend.Backend import Backend +from UM.Backend.Backend import Backend, BackendState from UM.Application import Application from UM.Scene.SceneNode import SceneNode from UM.Preferences import Preferences from UM.Signal import Signal from UM.Logger import Logger -from UM.Qt.Bindings.BackendProxy import BackendState #To determine the state of the slicing job. from UM.Message import Message from UM.PluginRegistry import PluginRegistry from UM.Resources import Resources @@ -156,12 +155,12 @@ class CuraEngineBackend(Backend): # return self.processingProgress.emit(0.0) - self.backendStateChange.emit(BackendState.NOT_STARTED) if self._message: self._message.setProgress(-1) else: self._message = Message(catalog.i18nc("@info:status", "Slicing..."), 0, False, -1) self._message.show() + self.backendStateChange.emit(BackendState.NotStarted) self._scene.gcode_list = [] self._slicing = True @@ -274,13 +273,13 @@ class CuraEngineBackend(Backend): self._message.setProgress(round(message.amount * 100)) self.processingProgress.emit(message.amount) - self.backendStateChange.emit(BackendState.PROCESSING) + self.backendStateChange.emit(BackendState.Processing) ## Called when the engine sends a message that slicing is finished. # # \param message The protobuf message signalling that slicing is finished. def _onSlicingFinishedMessage(self, message): - self.backendStateChange.emit(BackendState.DONE) + self.backendStateChange.emit(BackendState.Done) self.processingProgress.emit(1.0) self._slicing = False diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 64bdcdf540..db147b3e69 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -14,21 +14,35 @@ Rectangle { property real progress: UM.Backend.progress; property int backendState: UM.Backend.state; + property bool activity: Printer.getPlatformActivity; //Behavior on progress { NumberAnimation { duration: 250; } } property int totalHeight: childrenRect.height + UM.Theme.getSize("default_margin").height property string fileBaseName - property string statusText: { - if(base.backendState == 0) { - if(!activity) { - return catalog.i18nc("@label:PrintjobStatus","Please load a 3d model"); - } else { - return catalog.i18nc("@label:PrintjobStatus","Preparing to slice..."); + property string statusText: + { + if(base.backendState == 1) + { + if(!activity) + { + return catalog.i18nc("@label:PrintjobStatus", "Please load a 3d model"); } - } else if(base.backendState == 1) { - return catalog.i18nc("@label:PrintjobStatus","Slicing..."); - } else { - return catalog.i18nc("@label:PrintjobStatus","Ready to ") + UM.OutputDeviceManager.activeDeviceShortDescription; + else + { + return catalog.i18nc("@label:PrintjobStatus", "Preparing to slice..."); + } + } + else if(base.backendState == 2) + { + return catalog.i18nc("@label:PrintjobStatus", "Slicing..."); + } + else if(base.backendState == 3) + { + return catalog.i18nc("@label:PrintjobStatus %1 is target operation","Ready to %1").arg(UM.OutputDeviceManager.activeDeviceShortDescription); + } + else if(base.backendState == 4) + { + return catalog.i18nc("@label:PrintjobStatus", "Unable to slice due to errors") } } @@ -60,7 +74,7 @@ Rectangle { height: parent.height color: UM.Theme.getColor("progressbar_control") radius: UM.Theme.getSize("progressbar_radius").width - visible: base.backendState == 1 ? true : false + visible: base.backendState == 2 ? true : false } } @@ -76,7 +90,7 @@ Rectangle { id: saveToButton tooltip: UM.OutputDeviceManager.activeDeviceDescription; - enabled: base.backendState == 2 && base.activity == true + enabled: base.backendState == 3 && base.activity == true height: UM.Theme.getSize("save_button_save_to_button").height anchors.top: parent.top @@ -127,7 +141,7 @@ Rectangle { anchors.rightMargin: UM.Theme.getSize("default_margin").width width: UM.Theme.getSize("save_button_save_to_button").height height: UM.Theme.getSize("save_button_save_to_button").height - enabled: base.backendState == 2 && base.activity == true + enabled: base.backendState == 3 && base.activity == true visible: devicesModel.deviceCount > 1 From 0b3b718e8719f03a4c33a67636d506dc7dc91b7b Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 12:23:05 +0200 Subject: [PATCH 407/424] Make CuraEngineBackend respond to changes to the global container stack This way we can properly connect to propertyChanged signals and trigger a reslice. Contributes to CURA-1278 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 989e3a0c50..4bc37f1215 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -55,8 +55,9 @@ class CuraEngineBackend(Backend): self._stored_layer_data = [] #Triggers for when to (re)start slicing: - if Application.getInstance().getGlobalContainerStack(): - Application.getInstance().getGlobalContainerStack().propertyChanged.connect(self._onSettingChanged) #Note: Only starts slicing when the value changed. + self._global_container_stack = None + Application.getInstance().globalContainerStackChanged.connect(self._onGlobalStackChanged) + self._onGlobalStackChanged() #When you update a setting and other settings get changed through inheritance, many propertyChanged signals are fired. #This timer will group them up, and only slice for the last setting changed signal. @@ -123,7 +124,7 @@ class CuraEngineBackend(Backend): def slice(self): self._stored_layer_data = [] - if not self._enabled: #We shouldn't be slicing. + if not self._enabled or not self._global_container_stack: #We shouldn't be slicing. return if self._slicing: #We were already slicing. Stop the old job. @@ -375,3 +376,14 @@ class CuraEngineBackend(Backend): Logger.log("d", "Backend quit with return code %s. Resetting process and socket.", self._process.wait()) self._process = None self._createSocket() + + ## Called when the global container stack changes + def _onGlobalStackChanged(self): + if self._global_container_stack: + self._global_container_stack.propertyChanged.disconnect(self._onSettingChanged) + + self._global_container_stack = Application.getInstance().getGlobalContainerStack() + + if self._global_container_stack: + self._global_container_stack.propertyChanged.connect(self._onSettingChanged) #Note: Only starts slicing when the value changed. + self._onChanged() From cd2b853fff64ec026f90d66d8379a4f5df2124a7 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 13:01:25 +0200 Subject: [PATCH 408/424] Remove "slicing" message since it is now displayed in the sidebar Now removed for good Contributes to CURA-1278 --- .../CuraEngineBackend/CuraEngineBackend.py | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 4bc37f1215..f90b27bf5d 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -156,11 +156,6 @@ class CuraEngineBackend(Backend): # return self.processingProgress.emit(0.0) - if self._message: - self._message.setProgress(-1) - else: - self._message = Message(catalog.i18nc("@info:status", "Slicing..."), 0, False, -1) - self._message.show() self.backendStateChange.emit(BackendState.NotStarted) self._scene.gcode_list = [] @@ -193,10 +188,6 @@ class CuraEngineBackend(Backend): except Exception as e: # terminating a process that is already terminating causes an exception, silently ignore this. Logger.log("d", "Exception occurred while trying to kill the engine %s", str(e)) - if self._message: - self._message.hide() - self._message = None - ## Event handler to call when the job to initiate the slicing process is # completed. # @@ -210,9 +201,6 @@ class CuraEngineBackend(Backend): if self._start_slice_job is job: self._start_slice_job = None if job.isCancelled() or job.getError() or job.getResult() != True: - if self._message: - self._message.hide() - self._message = None return else: # Preparation completed, send it to the backend. @@ -270,9 +258,6 @@ class CuraEngineBackend(Backend): # # \param message The protobuf message containing the slicing progress. def _onProgressMessage(self, message): - if self._message: - self._message.setProgress(round(message.amount * 100)) - self.processingProgress.emit(message.amount) self.backendStateChange.emit(BackendState.Processing) @@ -285,11 +270,6 @@ class CuraEngineBackend(Backend): self._slicing = False - if self._message: - self._message.setProgress(100) - self._message.hide() - self._message = None - if self._layer_view_active and (self._process_layers_job is None or not self._process_layers_job.isRunning()): self._process_layers_job = ProcessSlicedLayersJob.ProcessSlicedLayersJob(self._stored_layer_data) self._process_layers_job.start() From 8039184c18580b8909435bf0dee0a5c10302bac7 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 13:03:06 +0200 Subject: [PATCH 409/424] Move setting error checking to StartSliceJob and allow the job to return a proper response Now the job can determine if we can continue with slicing or not and if not, why not. This also means we can now show a message when we cannot find any slicable objects. Contributes to CURA-1278 --- .../CuraEngineBackend/CuraEngineBackend.py | 53 ++++++++++--------- plugins/CuraEngineBackend/StartSliceJob.py | 25 +++++++-- resources/qml/SaveButton.qml | 16 +++--- 3 files changed, 56 insertions(+), 38 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index f90b27bf5d..c5804f920f 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -82,7 +82,7 @@ class CuraEngineBackend(Backend): self._always_restart = True #Always restart the engine when starting a new slice. Don't keep the process running. TODO: Fix engine statelessness. self._process_layers_job = None #The currently active job to process layers, or None if it is not processing layers. - self._message = None #Pop-up message that shows the slicing progress bar (or an error message). + self._error_message = None #Pop-up message that shows errors. self.backendQuit.connect(self._onBackendQuit) self.backendConnected.connect(self._onBackendConnected) @@ -134,26 +134,8 @@ class CuraEngineBackend(Backend): self._process_layers_job.abort() self._process_layers_job = None - # #Don't slice if there is a setting with an error value. - # stack = Application.getInstance().getGlobalContainerStack() - # for key in stack.getAllKeys(): - # validation_state = stack.getProperty(key, "validationState") - # #Only setting instances have a validation state, so settings which - # #are not overwritten by any instance will have none. The property - # #then, and only then, evaluates to None. We make the assumption that - # #the definition defines the setting with a default value that is - # #valid. Therefore we can allow both ValidatorState.Valid and None as - # #allowable validation states. - # #TODO: This assumption is wrong! If the definition defines an inheritance function that through inheritance evaluates to a disallowed value, a setting is still invalid even though it's default! - # #TODO: Therefore we must also validate setting definitions. - # if validation_state != None and validation_state != ValidatorState.Valid: - # Logger.log("w", "Setting %s is not valid, but %s. Aborting slicing.", key, validation_state) - # if self._message: #Hide any old message before creating a new one. - # self._message.hide() - # self._message = None - # self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) - # self._message.show() - # return + if self._error_message: + self._error_message.hide() self.processingProgress.emit(0.0) self.backendStateChange.emit(BackendState.NotStarted) @@ -200,12 +182,31 @@ class CuraEngineBackend(Backend): # Note that cancelled slice jobs can still call this method. if self._start_slice_job is job: self._start_slice_job = None - if job.isCancelled() or job.getError() or job.getResult() != True: + + if job.isCancelled() or job.getError() or job.getResult() == StartSliceJob.StartJobResult.Error: return - else: - # Preparation completed, send it to the backend. - self._socket.sendMessage(job.getSettingsMessage()) - self._socket.sendMessage(job.getSliceMessage()) + + if job.getResult() == StartSliceJob.StartJobResult.SettingError: + if Application.getInstance().getPlatformActivity: + self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors."), lifetime = 10) + self._error_message.show() + self.backendStateChange.emit(BackendState.Error) + else: + self.backendStateChange.emit(BackendState.NotStarted) + return + + if job.getResult() == StartSliceJob.StartJobResult.NothingToSlice: + if Application.getInstance().getPlatformActivity: + self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice. No suitable objects found."), lifetime = 10) + self._error_message.show() + self.backendStateChange.emit(BackendState.Error) + else: + self.backendStateChange.emit(BackendState.NotStarted) + return + + # Preparation completed, send it to the backend. + self._socket.sendMessage(job.getSettingsMessage()) + self._socket.sendMessage(job.getSliceMessage()) ## Listener for when the scene has changed. # diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 6e0da0cb34..cf008e7b6f 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -4,6 +4,7 @@ import numpy from string import Formatter import traceback +from enum import IntEnum from UM.Job import Job from UM.Application import Application @@ -12,8 +13,15 @@ from UM.Logger import Logger from UM.Scene.SceneNode import SceneNode from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator +from UM.Settings.Validator import ValidatorState + from cura.OneAtATimeIterator import OneAtATimeIterator +class StartJobResult(IntEnum): + Finished = 1 + Error = 2 + SettingError = 3 + NothingToSlice = 4 ## Formatter class that handles token expansion in start/end gcod class GcodeStartEndFormatter(Formatter): @@ -48,9 +56,19 @@ class StartSliceJob(Job): def run(self): stack = Application.getInstance().getGlobalContainerStack() if not stack: - self.setResult(False) + self.setResult(StartJobResult.Error) return + #Don't slice if there is a setting with an error value. + for key in stack.getAllKeys(): + validation_state = stack.getProperty(key, "validationState") + if validation_state in (ValidatorState.Exception, ValidatorState.MaximumError, ValidatorState.MinimumError): + Logger.log("w", "Setting %s is not valid, but %s. Aborting slicing.", key, validation_state) + self.setResult(StartJobResult.SettingError) + return + + Job.yieldThread() + with self._scene.getSceneLock(): # Remove old layer data. for node in DepthFirstIterator(self._scene.getRoot()): @@ -91,6 +109,7 @@ class StartSliceJob(Job): object_groups.append(temp_list) if not object_groups: + self.setResult(StartJobResult.NothingToSlice) return self._buildGlobalSettingsMessage(stack) @@ -116,7 +135,7 @@ class StartSliceJob(Job): Job.yieldThread() - self.setResult(True) + self.setResult(StartJobResult.Finished) def cancel(self): super().cancel() @@ -131,7 +150,7 @@ class StartSliceJob(Job): fmt = GcodeStartEndFormatter() return str(fmt.format(value, **settings)).encode("utf-8") except: - Logger.log("w", "Unabled to do token replacement on start/end gcode %s", traceback.format_exc()) + Logger.logException("w", "Unable to do token replacement on start/end gcode") return str(value).encode("utf-8") ## Sends all global settings to the engine. diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index db147b3e69..1307e8f820 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -21,16 +21,14 @@ Rectangle { property string fileBaseName property string statusText: { + if(!activity) + { + return catalog.i18nc("@label:PrintjobStatus", "Please load a 3d model"); + } + if(base.backendState == 1) { - if(!activity) - { - return catalog.i18nc("@label:PrintjobStatus", "Please load a 3d model"); - } - else - { - return catalog.i18nc("@label:PrintjobStatus", "Preparing to slice..."); - } + return catalog.i18nc("@label:PrintjobStatus", "Preparing to slice..."); } else if(base.backendState == 2) { @@ -42,7 +40,7 @@ Rectangle { } else if(base.backendState == 4) { - return catalog.i18nc("@label:PrintjobStatus", "Unable to slice due to errors") + return catalog.i18nc("@label:PrintjobStatus", "Unable to Slice") } } From 93873a2ce83edb24e33db751a7f25d8b8b340459 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 14:02:51 +0200 Subject: [PATCH 410/424] Also trigger a reslice when the containerstack's containers change Contributes to CURA-1278 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index c5804f920f..9607ba407b 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -307,7 +307,7 @@ class CuraEngineBackend(Backend): ## Called when anything has changed to the stuff that needs to be sliced. # # This indicates that we should probably re-slice soon. - def _onChanged(self): + def _onChanged(self, *args, **kwargs): self._change_timer.start() ## Called when the back-end connects to the front-end. @@ -362,9 +362,11 @@ class CuraEngineBackend(Backend): def _onGlobalStackChanged(self): if self._global_container_stack: self._global_container_stack.propertyChanged.disconnect(self._onSettingChanged) + self._global_container_stack.containersChanged.disconnect(self._onChanged) self._global_container_stack = Application.getInstance().getGlobalContainerStack() if self._global_container_stack: self._global_container_stack.propertyChanged.connect(self._onSettingChanged) #Note: Only starts slicing when the value changed. + self._global_container_stack.containersChanged.connect(self._onChanged) self._onChanged() From 19695a93b55caae708b30bd39bb15a5de899aef9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 30 May 2016 14:27:04 +0200 Subject: [PATCH 411/424] Move extruder trains to metadata Uranium doesn't know about extruder trains so it can't load that. Cura doesn't have access to anything outside of metadata or settings. So I'm putting it into metadata. Contributes to issues CURA-1278 and CURA-351. --- resources/definitions/fdmprinter.def.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index f8400d6d62..ab16f49a8d 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -11,11 +11,11 @@ "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", "visible": false, "preferred_material": "pla", - "preferred_quality": "normal" - }, - "machine_extruder_trains": - { - "0": "fdmextruder" + "preferred_quality": "normal", + "machine_extruder_trains": + { + "0": "fdmextruder" + } }, "settings": { From 79892daa5e493c85ae8d8da95e30bdcffbf9ce65 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 15:26:21 +0200 Subject: [PATCH 412/424] Bump API version of plugins that do not need extra porting Contributes to CURA-1615 --- plugins/3MFReader/__init__.py | 2 +- plugins/ChangeLogPlugin/__init__.py | 4 ++-- plugins/ImageReader/__init__.py | 2 +- plugins/RemovableDriveOutputDevice/__init__.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/3MFReader/__init__.py b/plugins/3MFReader/__init__.py index 610165f7a0..42b1794160 100644 --- a/plugins/3MFReader/__init__.py +++ b/plugins/3MFReader/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": catalog.i18nc("@info:whatsthis", "Provides support for reading 3MF files."), - "api": 2 + "api": 3 }, "mesh_reader": [ { diff --git a/plugins/ChangeLogPlugin/__init__.py b/plugins/ChangeLogPlugin/__init__.py index 88ac4e08a6..8466bfaa1b 100644 --- a/plugins/ChangeLogPlugin/__init__.py +++ b/plugins/ChangeLogPlugin/__init__.py @@ -13,9 +13,9 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": catalog.i18nc("@info:whatsthis", "Shows changes since latest checked version."), - "api": 2 + "api": 3 } } def register(app): - return {"extension": ChangeLog.ChangeLog()} \ No newline at end of file + return {"extension": ChangeLog.ChangeLog()} diff --git a/plugins/ImageReader/__init__.py b/plugins/ImageReader/__init__.py index 69fc1ddcc3..7ebdc31e57 100644 --- a/plugins/ImageReader/__init__.py +++ b/plugins/ImageReader/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": i18n_catalog.i18nc("@info:whatsthis", "Enables ability to generate printable geometry from 2D image files."), - "api": 2 + "api": 3 }, "mesh_reader": [ { diff --git a/plugins/RemovableDriveOutputDevice/__init__.py b/plugins/RemovableDriveOutputDevice/__init__.py index 635bdde008..16adcbfd7c 100644 --- a/plugins/RemovableDriveOutputDevice/__init__.py +++ b/plugins/RemovableDriveOutputDevice/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker B.V.", "description": catalog.i18nc("@info:whatsthis", "Provides removable drive hotplugging and writing support."), "version": "1.0", - "api": 2 + "api": 3 } } From bdc8fdf508fdcbe13836de26d350f5f5cba0d909 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 15:27:13 +0200 Subject: [PATCH 413/424] Turn CuraApplication::_onExit into public api as saveSettings Since we need it for the autosave plugin Contributes to CURA-1615 --- cura/CuraApplication.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f0610a3538..eccb3e4525 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -116,6 +116,7 @@ class CuraApplication(QtApplication): self._center_after_select = False self._camera_animation = None self._cura_actions = None + self._started = False self.getController().getScene().sceneChanged.connect(self.updatePlatformActivity) self.getController().toolOperationStopped.connect(self._onToolOperationStopped) @@ -189,7 +190,7 @@ class CuraApplication(QtApplication): JobQueue.getInstance().jobFinished.connect(self._onJobFinished) - self.applicationShuttingDown.connect(self._onExit) + self.applicationShuttingDown.connect(self.saveSettings) self._recent_files = [] files = Preferences.getInstance().getValue("cura/recent_files").split(";") @@ -199,8 +200,13 @@ class CuraApplication(QtApplication): self._recent_files.append(QUrl.fromLocalFile(f)) - ## Cura has multiple locations where instance containers need to be saved, so we need to handle this differently. - def _onExit(self): + ## Cura has multiple locations where instance containers need to be saved, so we need to handle this differently. + # + # Note that the AutoSave plugin also calls this method. + def saveSettings(self): + if not self._started: # Do not do saving during application start + return + for instance in ContainerRegistry.getInstance().findInstanceContainers(): if not instance.isDirty(): continue @@ -332,6 +338,8 @@ class CuraApplication(QtApplication): for file_name in self._open_file_queue: #Open all the files that were queued up while plug-ins were loading. self._openFile(file_name) + self._started = True + self.exec_() ## Handle Qt events From 581b9ce11ff25d787c5dd0babd3b05cca1bde318 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 15:28:14 +0200 Subject: [PATCH 414/424] Update AutoSave plugin to work with the new settings API Contributes to CURA-1615 --- plugins/AutoSave/AutoSave.py | 31 ++++++++++++------------------- plugins/AutoSave/__init__.py | 2 +- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/plugins/AutoSave/AutoSave.py b/plugins/AutoSave/AutoSave.py index e621ccdc4b..2aa49e3da1 100644 --- a/plugins/AutoSave/AutoSave.py +++ b/plugins/AutoSave/AutoSave.py @@ -15,15 +15,9 @@ class AutoSave(Extension): Preferences.getInstance().preferenceChanged.connect(self._triggerTimer) - machine_manager = Application.getInstance().getMachineManager() - - self._profile = None - machine_manager.activeProfileChanged.connect(self._onActiveProfileChanged) - machine_manager.profileNameChanged.connect(self._triggerTimer) - machine_manager.profilesChanged.connect(self._triggerTimer) - machine_manager.machineInstanceNameChanged.connect(self._triggerTimer) - machine_manager.machineInstancesChanged.connect(self._triggerTimer) - self._onActiveProfileChanged() + self._global_stack = None + Application.getInstance().globalContainerStackChanged.connect(self._onGlobalStackChanged) + self._onGlobalStackChanged() Preferences.getInstance().addPreference("cura/autosave_delay", 1000 * 10) @@ -38,24 +32,23 @@ class AutoSave(Extension): if not self._saving: self._change_timer.start() - def _onActiveProfileChanged(self): - if self._profile: - self._profile.settingValueChanged.disconnect(self._triggerTimer) + def _onGlobalStackChanged(self): + if self._global_stack: + self._global_stack.propertyChanged.disconnect(self._triggerTimer) + self._global_stack.containersChanged.disconnect(self._triggerTimer) - self._profile = Application.getInstance().getMachineManager().getWorkingProfile() + self._global_stack = Application.getInstance().getGlobalContainerStack() - if self._profile: - self._profile.settingValueChanged.connect(self._triggerTimer) + if self._global_stack: + self._global_stack.propertyChanged.connect(self._triggerTimer) + self._global_stack.containersChanged.connect(self._triggerTimer) def _onTimeout(self): self._saving = True # To prevent the save process from triggering another autosave. Logger.log("d", "Autosaving preferences, instances and profiles") - machine_manager = Application.getInstance().getMachineManager() + Application.getInstance().saveSettings() - machine_manager.saveVisibility() - machine_manager.saveMachineInstances() - machine_manager.saveProfiles() Preferences.getInstance().writeToFile(Resources.getStoragePath(Resources.Preferences, Application.getInstance().getApplicationName() + ".cfg")) self._saving = False diff --git a/plugins/AutoSave/__init__.py b/plugins/AutoSave/__init__.py index 0caa02a748..7e70ebe0a2 100644 --- a/plugins/AutoSave/__init__.py +++ b/plugins/AutoSave/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): "author": "Ultimaker", "version": "1.0", "description": catalog.i18nc("@info:whatsthis", "Automatically saves Preferences, Machines and Profiles after changes."), - "api": 2 + "api": 3 }, } From d616a72bb12897807176a67e35c2642adb2df8cc Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 30 May 2016 16:25:20 +0200 Subject: [PATCH 415/424] Display affects/affected by in the tooltip again Contributes to CURA-1278 --- resources/qml/Settings/SettingItem.qml | 32 +++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index 013dcd1680..c1666a8157 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -50,7 +50,37 @@ Item { interval: 500; repeat: false; - onTriggered: base.showTooltip(definition.description); + onTriggered: + { + var affects = settingDefinitionsModel.getRequiredBy(definition.key, "value") + var affected_by = settingDefinitionsModel.getRequires(definition.key, "value") + + var affected_by_list = "" + for(var i in affected_by) + { + affected_by_list += "
  • %1
  • \n".arg(affected_by[i].label) + } + + var affects_list = "" + for(var i in affects) + { + affects_list += "
  • %1
  • \n".arg(affects[i].label) + } + + var tooltip = "%1
    \n

    %2

    ".arg(definition.label).arg(definition.description) + + if(affects_list != "") + { + tooltip += "
    %1
    \n
      \n%2
    ".arg(catalog.i18nc("@label", "Affects")).arg(affects_list) + } + + if(affected_by_list != "") + { + tooltip += "
    %1
    \n
      \n%2
    ".arg(catalog.i18nc("@label", "Affected By")).arg(affected_by_list) + } + + base.showTooltip(tooltip); + } } Label From b1419d802861952f8f1d2dab8cb9df751f15d5d4 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 30 May 2016 16:45:36 +0200 Subject: [PATCH 416/424] Fix activating (quality)profiles on the profiles page CURA-1278 --- resources/qml/Preferences/ProfilesPage.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 6e5d39cb49..10acc8beef 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -6,6 +6,7 @@ import QtQuick.Controls 1.1 import QtQuick.Dialogs 1.2 import UM 1.2 as UM +import Cura 1.0 as Cura UM.ManagementPage { @@ -16,6 +17,7 @@ UM.ManagementPage model: UM.InstanceContainersModel { filter: { "type": "quality" } } + onActivateObject: Cura.MachineManager.setActiveQuality(currentItem.id) onAddObject: { var selectedProfile; if (objectList.currentIndex == 0) { @@ -33,6 +35,7 @@ UM.ManagementPage onRemoveObject: confirmDialog.open(); onRenameObject: { renameDialog.removeWhenRejected = false; renameDialog.open(); renameDialog.selectText(); } + activateEnabled: currentItem != null ? currentItem.id != Cura.MachineManager.activeQualityId : false; addEnabled: currentItem != null; removeEnabled: currentItem != null ? !currentItem.readOnly : false; renameEnabled: currentItem != null ? !currentItem.readOnly : false; @@ -69,7 +72,7 @@ UM.ManagementPage Row { - visible: base.currentItem.id == -1 || base.currentItem.active + visible: base.currentItem.id == -1 || currentItem.id == Cura.MachineManager.activeQualityId Button { text: { From 932eefeb0e60cb0486f4927e7923b3e126d77a0e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 30 May 2016 16:31:00 +0200 Subject: [PATCH 417/424] Correct data type for extruder number setting This caused a crash. Stupid mistake. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ab16f49a8d..6dca68a6c9 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -110,7 +110,7 @@ "description": "Number of extruder trains. An extruder train is the combination of a feeder, bowden tube, and nozzle.", "default_value": 1, "global_only": true, - "type": "bool", + "type": "int", "label": "Number extruders" }, "machine_nozzle_tip_outer_diameter": From d7eda39cb0e23351033e284656332bdd91afd563 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 30 May 2016 17:05:06 +0200 Subject: [PATCH 418/424] Basic extruder manager model implementation This implementation is currently not used, and also still leaves its container stacks empty. But still... Contributes to issues CURA-1278 and CURA-351. --- cura/ExtruderManagerModel.py | 102 +++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 cura/ExtruderManagerModel.py diff --git a/cura/ExtruderManagerModel.py b/cura/ExtruderManagerModel.py new file mode 100644 index 0000000000..7f0baa7aa8 --- /dev/null +++ b/cura/ExtruderManagerModel.py @@ -0,0 +1,102 @@ +# Copyright (c) 2016 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal +import re + +from UM.Application import Application #To get the global container stack to find the current machine. +from UM.Logger import Logger +from UM.Settings.ContainerStack import ContainerStack #To create container stacks for each extruder. +from UM.Settings.ContainerRegistry import ContainerRegistry #Finding containers by ID. + + +## Class that handles the current extruder stack. +# +# This finds the extruders that are available for the currently active machine +# and makes sure that whenever the machine is swapped, this list is kept up to +# date. It also contains and updates the setting stacks for the extruders. +class ExtruderManagerModel(QObject): + ## Registers listeners and such to listen to changes to the extruders. + # + # \param parent Parent QObject of this model. + def __init__(self, parent = None): + super().__init__(parent) + + self._extruderDefinitions = [] #Extruder definitions for the current machine. + self._nozzles = {} #Nozzle instances for each extruder. + self._extruderTrains = [] #Container stacks for each of the extruder trains. + + Application.getInstance().getGlobalContainerStack().containersChanged.connect(self._reloadExtruders) #When the current machine changes, we need to reload all extruders belonging to the new machine. + + ## (Re)loads all extruders of the currently active machine. + # + # This looks at the global container stack to see which machine is active. + # Then it loads the extruder definitions for that machine and the variants + # of those definitions. Then it puts the new extruder definitions in the + # appropriate place in the container stacks. + def _reloadExtruders(self): + self._extruderDefinitions = [] + self._nozzles = {} + self._extruderTrains = [] + global_container_stack = Application.getInstance().getGlobalContainerStack() + if not global_container_stack: #No machine has been added yet. + return #Then leave them empty! + + #Fill the list of extruder trains. + machine = global_container_stack.getBottom() + extruder_train_ids = machine.getMetaData("machine_extruder_trains") + for extruder_train_id in extruder_train_ids: + extruders = ContainerRegistry.getInstance().findDefinitionContainers(id = extruder_train_id) #Should be only 1 definition if IDs are unique, but add the whole list anyway. + if not extruders: #Empty list or error. + Logger.log("w", "Machine definition %s refers to an extruder train \"%s\", but no such extruder was found.", machine.getId(), extruder_train_id) + continue + self._extruderDefinitions += extruders + + #Fill the nozzles for each of the extruder trains. + for extruder in self._extruderDefinitions: + self._nozzles[extruder.id] = [] + all_nozzles = ContainerRegistry.getInstance().findInstanceContainers(type="nozzle") + for nozzle in all_nozzles: + extruders = nozzle.getMetaDataEntry("definitions").split(",").strip() + for extruder_id in extruders: + self._nozzles[extruder_id] = nozzle + + #Create the extruder train container stacks. + for extruder in self._extruderDefinitions: + self._extruderTrains.append(self._createContainerStack(extruder)) + + ## Creates a container stack for the specified extruder. + # + # This fills in the specified extruder as base definition, then a nozzle + # that fits in that extruder train, then a material that fits through that + # nozzle, then a quality profile that can be used with that material, and + # finally an empty user profile. + # + # \param extruder The extruder to create the container stack for. + # \return A container stack with the specified extruder as base. + def _createContainerStack(self, extruder): + container_stack = ContainerStack(self._uniqueName(extruder)) + #TODO: Fill the container stack. + return container_stack + + ## Finds a unique name for an extruder stack. + # + # \param extruder Extruder to design a name for. + # \return A name for an extruder stack that is unique and reasonably + # human-readable. + def _uniqueName(self, extruder): + container_registry = ContainerRegistry.getInstance() + + name = extruder.getName().strip() + num_check = re.compile("(.*?)\s*#\d$").match(name) + if(num_check): #There is a number in the name. + name = num_check.group(1) #Filter out the number. + if name == "": #Wait, that deleted everything! + name = "Extruder" + unique_name = name + + i = 1 + while(container_registry.findContainers(id = unique_name) or container_registry.findContainers(name = unique_name)): #A container already has this name. + i += 1 #Try next numbering. + unique_name = "%s #%d" % (name, i) #Fill name like this: "Extruder #2". + return unique_name \ No newline at end of file From 5289d5b4ac29e66e759edb6478b7b731456b2b3e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 31 May 2016 11:02:22 +0200 Subject: [PATCH 419/424] Codestyle CURA-1278 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 8c9b63ac1b..8c39919b13 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -18,12 +18,6 @@ Item { width: childrenRect.width; height: childrenRect.height; - - function updateContainerID() - { - console.log("containerid",UM.ActiveTool.properties.getValue("ContainerID")) - } - Column { id: items @@ -58,7 +52,7 @@ Item { //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, - //causing nasty issues when selecting differnt options. So disable asynchronous loading of enum type completely. + //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. asynchronous: model.type != "enum" source: From 72d7bd57697696540a88287c98c529cec3c6488d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 31 May 2016 11:06:26 +0200 Subject: [PATCH 420/424] Added hide button to per object settings CURA-1278 --- .../PerObjectSettingsPanel.qml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 8c39919b13..c68cd88dea 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -75,7 +75,32 @@ Item { return "../../resources/qml/Settings/SettingUnknown.qml" } } + Button + { + width: UM.Theme.getSize("setting").height; + height: UM.Theme.getSize("setting").height; + onClicked: addedSettingsModel.setVisible(model.key, false); + + style: ButtonStyle + { + background: Rectangle + { + color: control.hovered ? control.parent.style.controlHighlightColor : control.parent.style.controlColor; + UM.RecolorImage + { + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width/2 + height: parent.height/2 + sourceSize.width: width + sourceSize.height: width + color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button") + source: UM.Theme.getIcon("cross1") + } + } + } + } UM.SettingPropertyProvider { id: provider From 152f36256284bcb1e22e8b83024f681e85a43767 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 31 May 2016 11:12:22 +0200 Subject: [PATCH 421/424] Hide button is now in correct location CURA-1278 --- .../PerObjectSettingsPanel.qml | 64 ++++++++++--------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index c68cd88dea..e5149ccb79 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -41,40 +41,44 @@ Item { } } - delegate: Loader + delegate: Row { - width: UM.Theme.getSize("setting").width; - height: UM.Theme.getSize("setting").height; - - property var definition: model - property var settingDefinitionsModel: addedSettingsModel - property var propertyProvider: provider - - //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 - //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, - //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. - asynchronous: model.type != "enum" - - source: + Loader { - switch(model.type) // TODO: This needs to be fixed properly. Got frustrated with it not working, so this is the patch job! + width: UM.Theme.getSize("setting").width; + height: UM.Theme.getSize("setting").height; + + property var definition: model + property var settingDefinitionsModel: addedSettingsModel + property var propertyProvider: provider + + //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 + //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, + //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. + asynchronous: model.type != "enum" + + source: { - case "int": - return "../../resources/qml/Settings/SettingTextField.qml" - case "float": - return "../../resources/qml/Settings/SettingTextField.qml" - case "enum": - return "../../resources/qml/Settings/SettingComboBox.qml" - case "bool": - return "../../resources/qml/Settings/SettingCheckBox.qml" - case "str": - return "../../resources/qml/Settings/SettingTextField.qml" - case "category": - return "../../resources/qml/Settings/SettingCategory.qml" - default: - return "../../resources/qml/Settings/SettingUnknown.qml" + switch(model.type) // TODO: This needs to be fixed properly. Got frustrated with it not working, so this is the patch job! + { + case "int": + return "../../resources/qml/Settings/SettingTextField.qml" + case "float": + return "../../resources/qml/Settings/SettingTextField.qml" + case "enum": + return "../../resources/qml/Settings/SettingComboBox.qml" + case "bool": + return "../../resources/qml/Settings/SettingCheckBox.qml" + case "str": + return "../../resources/qml/Settings/SettingTextField.qml" + case "category": + return "../../resources/qml/Settings/SettingCategory.qml" + default: + return "../../resources/qml/Settings/SettingUnknown.qml" + } } } + Button { width: UM.Theme.getSize("setting").height; @@ -111,8 +115,8 @@ Item { storeIndex: 0 } } - } + Button { id: customise_settings_button; From 29ed8c2f5be2f87c7b44cf441f14f1baa190f396 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 31 May 2016 11:33:02 +0200 Subject: [PATCH 422/424] Increased width of per-object settings panel CURA-1278 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 2 +- resources/themes/cura/theme.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index e5149ccb79..f873ec9a79 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -46,7 +46,7 @@ Item { Loader { width: UM.Theme.getSize("setting").width; - height: UM.Theme.getSize("setting").height; + height: UM.Theme.getSize("section").height; property var definition: model property var settingDefinitionsModel: addedSettingsModel diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 67df41ef7c..acd60e2646 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -176,7 +176,7 @@ "section_icon": [1.6, 1.6], "section_icon_column": [2.8, 0.0], - "setting": [19.0, 1.8], + "setting": [25.0, 1.8], "setting_control": [10.0, 2.0], "setting_control_depth_margin": [1.4, 0.0], "setting_preferences_button_margin": [3.3, 0.0], From 3638890138d1fed247bfd01bb5abbb55fa650003 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 31 May 2016 15:26:38 +0200 Subject: [PATCH 423/424] Renaming a printer in the Manage Printers dialog is now reflected in the sidebar again Contributes to CURA-1632 --- cura/MachineManagerModel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 7b42483fca..deef72529b 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -263,6 +263,7 @@ class MachineManagerModel(QObject): if containers: new_name = self._uniqueMachineName(new_name, containers[0].getBottom().getName()) containers[0].setName(new_name) + self.globalContainerChanged.emit() @pyqtSlot(str) def removeMachine(self, machine_id): From 21e8dd151ef26801ce006f326ff664eb1cb2a616 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 31 May 2016 15:48:08 +0200 Subject: [PATCH 424/424] Prevent removing the last printer, disable Activate button for current active printer Fixes CURA-1631 --- resources/qml/MachinesPage.qml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/resources/qml/MachinesPage.qml b/resources/qml/MachinesPage.qml index 8c7a2c521d..00ebcfc0af 100644 --- a/resources/qml/MachinesPage.qml +++ b/resources/qml/MachinesPage.qml @@ -12,11 +12,9 @@ UM.ManagementPage id: base; title: catalog.i18nc("@title:tab", "Printers"); - property int numInstances: model.rowCount(); model: UM.ContainerStacksModel { filter: {"type": "machine"} - onDataChanged: numInstances = model.rowCount() } onAddObject: Printer.requestAddPrinter() @@ -24,9 +22,9 @@ UM.ManagementPage onRenameObject: renameDialog.open(); onActivateObject: Cura.MachineManager.setActiveMachine(base.currentItem.id) - removeEnabled: base.currentItem != null && numInstances > 1 - renameEnabled: base.currentItem != null && numInstances > 0 - activateEnabled: base.currentItem != null + removeEnabled: base.currentItem != null && model.rowCount() > 1 + renameEnabled: base.currentItem != null + activateEnabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMachineId Flow {