From 6a1942c254cc241da90712744522571ee71f1c05 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Thu, 23 Jun 2016 19:40:00 +0200 Subject: [PATCH 01/38] GCodeWriter: Exporting the data as done on regualar exports --- plugins/GCodeWriter/GCodeWriter.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index d304f0d046..c80d8e610a 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -23,7 +23,7 @@ class GCodeWriter(MeshWriter): # It can only read settings with the same version as the version it was # written with. If the file format is changed in a way that breaks reverse # compatibility, increment this version number! - version = 1 + version = 2 ## Dictionary that defines how characters are escaped when embedded in # g-code. @@ -68,23 +68,21 @@ class GCodeWriter(MeshWriter): prefix = ";SETTING_" + str(GCodeWriter.version) + " " # The prefix to put before each line. prefix_length = len(prefix) - 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() + global_stack = Application.getInstance().getGlobalContainerStack() + container_with_settings = global_stack.getContainers()[1] + serialized = container_with_settings.serialize() # Escape characters that have a special meaning in g-code comments. pattern = re.compile("|".join(GCodeWriter.escape_characters.keys())) # Perform the replacement with a regular expression. - serialised = pattern.sub(lambda m: GCodeWriter.escape_characters[re.escape(m.group(0))], serialised) + serialized = pattern.sub(lambda m: GCodeWriter.escape_characters[re.escape(m.group(0))], serialized) # Introduce line breaks so that each comment is no longer than 80 characters. Prepend each line with the prefix. result = "" # 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 + for pos in range(0, len(serialized), 80 - prefix_length): + result += prefix + serialized[pos : pos + 80 - prefix_length] + "\n" + serialized = result - return serialised \ No newline at end of file + return serialized \ No newline at end of file From 1fdf835c19bf8687c7ff1998d306a1301b13c768 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Thu, 23 Jun 2016 19:40:52 +0200 Subject: [PATCH 02/38] GCodeProfileReader: Increasing the setting version --- plugins/GCodeProfileReader/GCodeProfileReader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py index 5dcea88aed..5915395005 100644 --- a/plugins/GCodeProfileReader/GCodeProfileReader.py +++ b/plugins/GCodeProfileReader/GCodeProfileReader.py @@ -22,7 +22,7 @@ class GCodeProfileReader(ProfileReader): # It can only read settings with the same version as the version it was # written with. If the file format is changed in a way that breaks reverse # compatibility, increment this version number! - version = 1 + version = 2 ## Dictionary that defines how characters are escaped when embedded in # g-code. From d49ba8011775957eebc63f17aed808216629da1b Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Fri, 24 Jun 2016 16:00:38 +0200 Subject: [PATCH 03/38] GCodeWriter: Getting always the correct container with the currently used profile. --- plugins/GCodeWriter/GCodeWriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index c80d8e610a..4eb1f89134 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -69,8 +69,8 @@ class GCodeWriter(MeshWriter): prefix_length = len(prefix) global_stack = Application.getInstance().getGlobalContainerStack() - container_with_settings = global_stack.getContainers()[1] - serialized = container_with_settings.serialize() + container_with_profile = global_stack.findContainer({"type": "quality"}) + serialized = container_with_profile.serialize() # Escape characters that have a special meaning in g-code comments. pattern = re.compile("|".join(GCodeWriter.escape_characters.keys())) From 93cdce7b3360b2b285ca32f8b7cf7ba7522381a9 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Fri, 24 Jun 2016 16:01:47 +0200 Subject: [PATCH 04/38] GCodeProfileReader: Fixing read of profiles from GCode --- plugins/GCodeProfileReader/GCodeProfileReader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py index 5915395005..1ce1473582 100644 --- a/plugins/GCodeProfileReader/GCodeProfileReader.py +++ b/plugins/GCodeProfileReader/GCodeProfileReader.py @@ -75,15 +75,16 @@ class GCodeProfileReader(ProfileReader): # Create an empty profile - the id will be changed later profile = InstanceContainer("") - profile.addMetaDataEntry("type", "quality") try: profile.deserialize(serialized) except Exception as e: # Not a valid g-code file. Logger.log("e", "Unable to serialise the profile: %s", str(e)) return None + profile.addMetaDataEntry("type", "quality") + #Creating a unique name using the filename of the GCode - new_name = catalog.i18nc("@label", "Custom profile (%s)") %(os.path.splitext(os.path.basename(file_name))[0]) + new_name = catalog.i18nc("@label", "G-Code-imported profile") profile.setName(new_name) profile._id = new_name From 214ffbb0bd1edd2dd0c519abd1a209978737b0d3 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 27 Jun 2016 15:22:45 +0200 Subject: [PATCH 05/38] JSON fix: all retraction settings now only retrievable per extruder (CURA-303) --- resources/definitions/fdmprinter.def.json | 30 +++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 1a3f8f144a..a867f9aad8 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -914,7 +914,8 @@ "description": "Retract the filament when the nozzle is moving over a non-printed area. ", "type": "bool", "default_value": true, - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true }, "retraction_amount": { "label": "Retraction Distance", @@ -925,7 +926,8 @@ "minimum_value_warning": "-0.0001", "maximum_value_warning": "10.0", "enabled": "retraction_enable", - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true }, "retraction_speed": { "label": "Retraction Speed", @@ -937,7 +939,8 @@ "maximum_value": "299792458000", "maximum_value_warning": "100", "enabled": "retraction_enable", - "settable_per_mesh": true, + "settable_per_mesh": false, + "settable_per_extruder": true, "children": { "retraction_retract_speed": { "label": "Retraction Retract Speed", @@ -950,7 +953,8 @@ "maximum_value_warning": "100", "enabled": "retraction_enable", "value": "retraction_speed", - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true }, "retraction_prime_speed": { "label": "Retraction Prime Speed", @@ -963,7 +967,8 @@ "maximum_value_warning": "100", "enabled": "retraction_enable", "value": "retraction_speed", - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true } } }, @@ -976,7 +981,8 @@ "minimum_value_warning": "-0.0001", "maximum_value_warning": "5.0", "enabled": "retraction_enable", - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true }, "retraction_min_travel": { "label": "Retraction Minimum Travel", @@ -988,7 +994,8 @@ "minimum_value": "0", "maximum_value_warning": "10", "enabled": "retraction_enable", - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true }, "retraction_count_max": { "label": "Maximum Retraction Count", @@ -998,7 +1005,8 @@ "maximum_value_warning": "100", "type": "int", "enabled": "retraction_enable", - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true }, "retraction_extrusion_window": { "label": "Minimum Extrusion Distance Window", @@ -1010,7 +1018,8 @@ "maximum_value_warning": "retraction_amount * 2", "value": "retraction_amount", "enabled": "retraction_enable", - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true }, "retraction_hop": { "label": "Z Hop when Retracting", @@ -1021,7 +1030,8 @@ "minimum_value_warning": "-0.0001", "maximum_value_warning": "10", "enabled": "retraction_enable", - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": true }, "material_standby_temperature": { From a1a751831708804d3e94fbb6824be9749f84d3a2 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 11:49:27 +0200 Subject: [PATCH 06/38] Switch materials/nozzle when the printer signals a material/nozzle change CURA-491 --- cura/MachineManagerModel.py | 50 ++++++++++++++++++++++++++++++++++--- cura/PrinterOutputDevice.py | 36 ++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 3 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 76786efe61..aa8b08cf7b 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -4,6 +4,7 @@ from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal from UM.Application import Application from UM.Preferences import Preferences +from UM.Logger import Logger import UM.Settings from UM.Settings.Validator import ValidatorState @@ -51,6 +52,7 @@ class MachineManagerModel(QObject): active_machine_id = Preferences.getInstance().getValue("cura/active_machine") + self._printer_output_devices = [] Application.getInstance().getOutputDeviceManager().outputDevicesChanged.connect(self._onOutputDevicesChanged) if active_machine_id != "": @@ -72,8 +74,53 @@ class MachineManagerModel(QObject): outputDevicesChanged = pyqtSignal() def _onOutputDevicesChanged(self): + for printer_output_device in self._printer_output_devices: + printer_output_device.HotendIdChanged.disconnect(self._onHotendIdChanged) + printer_output_device.MaterialIdChanged.disconnect(self._onMaterialIdChanged) + + self._printer_output_devices.clear() + + for printer_output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices(): + if isinstance(printer_output_device, PrinterOutputDevice): + self._printer_output_devices.append(printer_output_device) + printer_output_device.HotendIdChanged.connect(self._onHotendIdChanged) + printer_output_device.MaterialIdChanged.connect(self._onMaterialIdChanged) + self.outputDevicesChanged.emit() + @pyqtProperty("QVariantList", notify = outputDevicesChanged) + def printerOutputDevices(self): + return self._printer_output_devices + + def _onHotendIdChanged(self, index, hotend_id): + if not self._global_container_stack: + return + + containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "variant", definition = self._global_container_stack.getBottom().getId(), name = hotend_id) + if containers: + ExtruderManager.ExtruderManager.getInstance().setActiveExtruderIndex(index) + Logger.log("d", "Setting hotend variant of hotend %d to %s" % (index, containers[0].getId())) + self._updateVariantContainer(containers[0]) + + def _onMaterialIdChanged(self, index, material_id): + # TODO: fix this + if not self._global_container_stack: + return + + if self._global_container_stack.getMetaDataEntry("has_machine_materials", False): + definition_id = "fdmprinter" + else: + definition_id = self._global_container_stack.getBottom().getId() + + containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "material", defintion = definition_id, GUID = material_id) + if containers: + ExtruderManager.ExtruderManager.getInstance().setActiveExtruderIndex(index) + Logger.log("d", "Setting material of hotend %d to %s" % (index, containers[0].getId())) + self._updateMaterialContainer(containers[0]) + else: + Logger.log("w", "No material definition found for printer definition %s and GUID %s" % (definition_id, material_id)) + + def _onGlobalPropertyChanged(self, key, property_name): if property_name == "value": self.globalValueChanged.emit() @@ -165,9 +212,6 @@ class MachineManagerModel(QObject): Application.getInstance().setGlobalContainerStack(new_global_stack) - @pyqtProperty("QVariantList", notify = outputDevicesChanged) - def printerOutputDevices(self): - return [printer_output_device for printer_output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices() if isinstance(printer_output_device, PrinterOutputDevice)] ## Create a name that is not empty and unique # \param container_type \type{string} Type of the container (machine, quality, ...) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 7f6e51e1fd..6504de9cdd 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -24,6 +24,8 @@ class PrinterOutputDevice(QObject, OutputDevice): self._num_extruders = 1 self._hotend_temperatures = [0] * self._num_extruders self._target_hotend_temperatures = [0] * self._num_extruders + self._material_ids = [""] * self._num_extruders + self._hotend_ids = [""] * self._num_extruders self._progress = 0 self._head_x = 0 self._head_y = 0 @@ -57,6 +59,12 @@ class PrinterOutputDevice(QObject, OutputDevice): # Signal to be emitted when head position is changed (x,y,z) headPositionChanged = pyqtSignal() + # Signal to be emitted when either of the material ids is changed + MaterialIdChanged = pyqtSignal(int, str, arguments = ["index", "id"]) + + # Signal to be emitted when either of the hotend ids is changed + HotendIdChanged = pyqtSignal(int, str, arguments = ["index", "id"]) + # Signal that is emitted every time connection state is changed. # it also sends it's own device_id (for convenience sake) connectionStateChanged = pyqtSignal(str) @@ -212,6 +220,34 @@ class PrinterOutputDevice(QObject, OutputDevice): self._hotend_temperatures[index] = temperature self.hotendTemperaturesChanged.emit() + @pyqtProperty("QVariantList", notify = MaterialIdChanged) + def materialIds(self): + return self._material_ids + + ## Protected setter for the current material id. + # /param index Index of the extruder + # /param material_id id of the material + def _setMaterialId(self, index, material_id): + if material_id and material_id != "" and material_id != self._material_ids[index]: + Logger.log("d", "Setting material id of hotend %d to %s" % (index, material_id)) + self._material_ids[index] = material_id + self.MaterialIdChanged.emit(index, material_id) + + + @pyqtProperty("QVariantList", notify = HotendIdChanged) + def hotendIds(self): + return self._hotend_ids + + ## Protected setter for the current hotend id. + # /param index Index of the extruder + # /param hotend_id id of the hotend + def _setHotendId(self, index, hotend_id): + if hotend_id and hotend_id != "" and hotend_id != self._hotend_ids[index]: + Logger.log("d", "Setting hotend id of hotend %d to %s" % (index, hotend_id)) + self._hotend_ids[index] = hotend_id + self.HotendIdChanged.emit(index, hotend_id) + + ## Attempt to establish connection def connect(self): raise NotImplementedError("connect needs to be implemented") From 8e58e88511057e11fb92556edb47bbeb0cba69cf Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 11:50:15 +0200 Subject: [PATCH 07/38] Update GUIDs to match the GUIDs in the official repository CURA-491 --- resources/materials/generic_abs.xml.fdm_material | 2 +- resources/materials/generic_cpe.xml.fdm_material | 2 +- resources/materials/generic_pla.xml.fdm_material | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/materials/generic_abs.xml.fdm_material b/resources/materials/generic_abs.xml.fdm_material index 654b06d221..82b2f1f963 100644 --- a/resources/materials/generic_abs.xml.fdm_material +++ b/resources/materials/generic_abs.xml.fdm_material @@ -9,7 +9,7 @@ Generic PLA profile. Serves as an example file, data in this file is not correct ABS Generic - 506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 + 60636bb4-518f-42e7-8237-fe77b194ebe0 0 #FF0000 diff --git a/resources/materials/generic_cpe.xml.fdm_material b/resources/materials/generic_cpe.xml.fdm_material index bbe6e328d2..8ac4dd8c71 100644 --- a/resources/materials/generic_cpe.xml.fdm_material +++ b/resources/materials/generic_cpe.xml.fdm_material @@ -9,7 +9,7 @@ Generic PLA profile. Serves as an example file, data in this file is not correct CPE Generic - 506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 + 12f41353-1a33-415e-8b4f-a775a6c70cc6 0 #0000FF diff --git a/resources/materials/generic_pla.xml.fdm_material b/resources/materials/generic_pla.xml.fdm_material index 40432d5849..2f8fa165cf 100644 --- a/resources/materials/generic_pla.xml.fdm_material +++ b/resources/materials/generic_pla.xml.fdm_material @@ -9,7 +9,7 @@ Generic PLA profile. Serves as an example file, data in this file is not correct PLA Generic - 506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 + 86a89ceb-4159-47f6-ab97-e9953803d70f 0 #00FF00 From f679b1ef6835db53d7c9739347e6a420e7803797 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 4 Jul 2016 12:24:26 +0200 Subject: [PATCH 08/38] JSON fix: merge went wrong: forgotten comma --- 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 b843f6c194..b5d3796e74 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1040,7 +1040,7 @@ "default_value": false, "enabled": "retraction_enable", "settable_per_mesh": false, - "settable_per_extruder": true + "settable_per_extruder": true, "children": { "retraction_hop_only_when_collides": { "label": "Z Hop Only Over Printed Parts", From 6933430185ffc93ae3dcbfa7d110c93561c636b3 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 12:47:16 +0200 Subject: [PATCH 09/38] Flow MachineActions on the manage Printes page. CURA-1385 --- resources/qml/Preferences/MachinesPage.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index e214034659..74089ec9e6 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -50,10 +50,11 @@ UM.ManagementPage elide: Text.ElideRight } - Row + Flow { id: machineActions anchors.left: parent.left + anchors.right: parent.right anchors.top: machineName.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height From 90fa0f05645c7e37577ea14d675deb5aba97bf4b Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 13:14:40 +0200 Subject: [PATCH 10/38] Make Select Upgrades page look like the other pages CURA-1385 --- .../UMOUpgradeSelectionMachineAction.qml | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/plugins/UltimakerMachineActions/UMOUpgradeSelectionMachineAction.qml b/plugins/UltimakerMachineActions/UMOUpgradeSelectionMachineAction.qml index 53a7e47a6b..1381daa270 100644 --- a/plugins/UltimakerMachineActions/UMOUpgradeSelectionMachineAction.qml +++ b/plugins/UltimakerMachineActions/UMOUpgradeSelectionMachineAction.qml @@ -15,25 +15,38 @@ Cura.MachineAction anchors.fill: parent; Item { - id: bedLevelMachineAction - anchors.fill: parent; + id: upgradeSelectionMachineAction + anchors.fill: parent + + Label + { + id: pageTitle + width: parent.width + text: catalog.i18nc("@title", "Check Printer") + wrapMode: Text.WordWrap + font.pointSize: 18; + } + + Label + { + id: pageDescription + anchors.top: pageTitle.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + width: parent.width + wrapMode: Text.WordWrap + text: catalog.i18nc("@label","Please select any upgrades made to this Ultimaker Original"); + } + + CheckBox + { + anchors.top: pageDescription.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + + text: catalog.i18nc("@label", "Self-built heated bed") + checked: manager.hasHeatedBed + onClicked: manager.hasHeatedBed ? manager.removeHeatedBed() : manager.addHeatedBed() + } UM.I18nCatalog { id: catalog; name: "cura"; } - Column - { - anchors.fill: parent; - Label - { - width: parent.width - wrapMode: Text.WordWrap - text: catalog.i18nc("@label","Please select any upgrades made to this ultimaker original"); - } - CheckBox - { - text: catalog.i18nc("@label", "Self-built heated bed") - checked: manager.hasHeatedBed - onClicked: manager.hasHeatedBed ? manager.removeHeatedBed() : manager.addHeatedBed() - } - } } } \ No newline at end of file From 24c5a39962d369eca85f37c1ac481d9c0e9c3358 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 13:43:13 +0200 Subject: [PATCH 11/38] Fix logic and typo for material container filtering CURA-491 --- cura/MachineManagerModel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index aa8b08cf7b..9a08aaa348 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -107,12 +107,11 @@ class MachineManagerModel(QObject): if not self._global_container_stack: return + definition_id = "fdmprinter" if self._global_container_stack.getMetaDataEntry("has_machine_materials", False): - definition_id = "fdmprinter" - else: definition_id = self._global_container_stack.getBottom().getId() - containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "material", defintion = definition_id, GUID = material_id) + containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "material", definition = definition_id, GUID = material_id) if containers: ExtruderManager.ExtruderManager.getInstance().setActiveExtruderIndex(index) Logger.log("d", "Setting material of hotend %d to %s" % (index, containers[0].getId())) From 3d86ffd57542afa863778dc408e6b446224f4258 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 15:14:36 +0200 Subject: [PATCH 12/38] Fix switching materials/nozzles in Cura when the materials/nozzles in the printer change CURA-491 --- cura/MachineManagerModel.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 9a08aaa348..d9903744ee 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -98,9 +98,9 @@ class MachineManagerModel(QObject): containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "variant", definition = self._global_container_stack.getBottom().getId(), name = hotend_id) if containers: - ExtruderManager.ExtruderManager.getInstance().setActiveExtruderIndex(index) Logger.log("d", "Setting hotend variant of hotend %d to %s" % (index, containers[0].getId())) - self._updateVariantContainer(containers[0]) + ExtruderManager.ExtruderManager.getInstance().setActiveExtruderIndex(index) + self.setActiveVariant(containers[0].getId()) def _onMaterialIdChanged(self, index, material_id): # TODO: fix this @@ -113,9 +113,9 @@ class MachineManagerModel(QObject): containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "material", definition = definition_id, GUID = material_id) if containers: - ExtruderManager.ExtruderManager.getInstance().setActiveExtruderIndex(index) Logger.log("d", "Setting material of hotend %d to %s" % (index, containers[0].getId())) - self._updateMaterialContainer(containers[0]) + ExtruderManager.ExtruderManager.getInstance().setActiveExtruderIndex(index) + self.setActiveMaterial(containers[0].getId()) else: Logger.log("w", "No material definition found for printer definition %s and GUID %s" % (definition_id, material_id)) From bff23598c699ef21b21325ab800d9ef2d37bb005 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 16:23:07 +0200 Subject: [PATCH 13/38] Fix simple mode infill to work with multiple extruders CURA-1778 --- cura/MachineManagerModel.py | 7 +++++++ resources/qml/SidebarSimple.qml | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 76786efe61..7aa99e1b09 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -236,6 +236,13 @@ class MachineManagerModel(QObject): return "" + @pyqtProperty(str, notify = activeStackChanged) + def activeStackId(self): + if self._active_container_stack: + return self._active_container_stack.getId() + + return "" + @pyqtProperty(str, notify = activeMaterialChanged) def activeMaterialName(self): if self._active_container_stack: diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 56c4385297..a393500fb7 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -371,7 +371,7 @@ Item { id: infillDensity - containerStackId: Cura.MachineManager.activeMachineId + containerStackId: Cura.MachineManager.activeStackId key: "infill_sparse_density" watchedProperties: [ "value" ] storeIndex: 0 @@ -406,6 +406,7 @@ Item watchedProperties: [ "value" ] storeIndex: 0 } + UM.SettingPropertyProvider { id: supportExtruderNr From dd249206ac15db31eda2cd0fc5990c6871619387 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 16:33:32 +0200 Subject: [PATCH 14/38] Fix codestyle CURA-491 --- cura/MachineManagerModel.py | 8 ++++---- cura/PrinterOutputDevice.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index d9903744ee..92ce86804d 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -75,16 +75,16 @@ class MachineManagerModel(QObject): def _onOutputDevicesChanged(self): for printer_output_device in self._printer_output_devices: - printer_output_device.HotendIdChanged.disconnect(self._onHotendIdChanged) - printer_output_device.MaterialIdChanged.disconnect(self._onMaterialIdChanged) + printer_output_device.hotendIdChanged.disconnect(self._onHotendIdChanged) + printer_output_device.materialIdChanged.disconnect(self._onMaterialIdChanged) self._printer_output_devices.clear() for printer_output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices(): if isinstance(printer_output_device, PrinterOutputDevice): self._printer_output_devices.append(printer_output_device) - printer_output_device.HotendIdChanged.connect(self._onHotendIdChanged) - printer_output_device.MaterialIdChanged.connect(self._onMaterialIdChanged) + printer_output_device.hotendIdChanged.connect(self._onHotendIdChanged) + printer_output_device.materialIdChanged.connect(self._onMaterialIdChanged) self.outputDevicesChanged.emit() diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 6504de9cdd..212ed86ab3 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -60,10 +60,10 @@ class PrinterOutputDevice(QObject, OutputDevice): headPositionChanged = pyqtSignal() # Signal to be emitted when either of the material ids is changed - MaterialIdChanged = pyqtSignal(int, str, arguments = ["index", "id"]) + materialIdChanged = pyqtSignal(int, str, arguments = ["index", "id"]) # Signal to be emitted when either of the hotend ids is changed - HotendIdChanged = pyqtSignal(int, str, arguments = ["index", "id"]) + hotendIdChanged = pyqtSignal(int, str, arguments = ["index", "id"]) # Signal that is emitted every time connection state is changed. # it also sends it's own device_id (for convenience sake) @@ -220,7 +220,7 @@ class PrinterOutputDevice(QObject, OutputDevice): self._hotend_temperatures[index] = temperature self.hotendTemperaturesChanged.emit() - @pyqtProperty("QVariantList", notify = MaterialIdChanged) + @pyqtProperty("QVariantList", notify = materialIdChanged) def materialIds(self): return self._material_ids @@ -231,10 +231,10 @@ class PrinterOutputDevice(QObject, OutputDevice): if material_id and material_id != "" and material_id != self._material_ids[index]: Logger.log("d", "Setting material id of hotend %d to %s" % (index, material_id)) self._material_ids[index] = material_id - self.MaterialIdChanged.emit(index, material_id) + self.materialIdChanged.emit(index, material_id) - @pyqtProperty("QVariantList", notify = HotendIdChanged) + @pyqtProperty("QVariantList", notify = hotendIdChanged) def hotendIds(self): return self._hotend_ids @@ -245,7 +245,7 @@ class PrinterOutputDevice(QObject, OutputDevice): if hotend_id and hotend_id != "" and hotend_id != self._hotend_ids[index]: Logger.log("d", "Setting hotend id of hotend %d to %s" % (index, hotend_id)) self._hotend_ids[index] = hotend_id - self.HotendIdChanged.emit(index, hotend_id) + self.hotendIdChanged.emit(index, hotend_id) ## Attempt to establish connection From 84b736df07e8699faa5ca8667191529d76f30486 Mon Sep 17 00:00:00 2001 From: "U-ULTIMAKER\\j.ha" Date: Mon, 4 Jul 2016 17:08:35 +0200 Subject: [PATCH 15/38] first commit in Cura! fix CURA-1085, time estimate is reset before every slice action --- plugins/CuraEngineBackend/CuraEngineBackend.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index c91e414a13..89be5fef08 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -126,6 +126,8 @@ class CuraEngineBackend(Backend): ## Perform a slice of the scene. def slice(self): + self.printDurationMessage.emit(0, 0) + self._stored_layer_data = [] if not self._enabled or not self._global_container_stack: #We shouldn't be slicing. From 318182495ae4874a6fa18b8ffbb992782f1ade80 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 4 Jul 2016 17:11:03 +0200 Subject: [PATCH 16/38] We now recieve material estimation per extruder CURA-1687 --- cura/PrintInformation.py | 21 ++++++++++--------- plugins/CuraEngineBackend/Cura.proto | 11 +++++++--- .../CuraEngineBackend/CuraEngineBackend.py | 12 +++++++---- plugins/SliceInfoPlugin/SliceInfo.py | 2 +- resources/qml/JobSpecs.qml | 2 +- 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index f1eb93de0e..5432da5dcc 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -44,7 +44,7 @@ class PrintInformation(QObject): self._current_print_time = Duration(None, self) - self._material_amount = -1 + self._material_amounts = [] self._backend = Application.getInstance().getBackend() if self._backend: @@ -62,21 +62,22 @@ class PrintInformation(QObject): def currentPrintTime(self): return self._current_print_time - materialAmountChanged = pyqtSignal() + materialAmountsChanged = pyqtSignal() - @pyqtProperty(float, notify = materialAmountChanged) - def materialAmount(self): - return self._material_amount + @pyqtProperty("QVariantList", notify = materialAmountsChanged) + def materialAmounts(self): + return self._material_amounts - def _onPrintDurationMessage(self, time, amount): - #if self._slice_pass == self.SlicePass.CurrentSettings: - self._current_print_time.setDuration(time) + def _onPrintDurationMessage(self, total_time, material_amounts): + self._current_print_time.setDuration(total_time) self.currentPrintTimeChanged.emit() # Material amount is sent as an amount of mm^3, so calculate length from that r = Application.getInstance().getGlobalContainerStack().getProperty("material_diameter", "value") / 2 - self._material_amount = round((amount / (math.pi * r ** 2)) / 1000, 2) - self.materialAmountChanged.emit() + self._material_amounts = [] + for amount in material_amounts: + self._material_amounts.append(round((amount / (math.pi * r ** 2)) / 1000, 2)) + self.materialAmountsChanged.emit() @pyqtSlot(str) def setJobName(self, name): diff --git a/plugins/CuraEngineBackend/Cura.proto b/plugins/CuraEngineBackend/Cura.proto index 38753fd804..5f95a4d4a8 100644 --- a/plugins/CuraEngineBackend/Cura.proto +++ b/plugins/CuraEngineBackend/Cura.proto @@ -65,10 +65,15 @@ message GCodeLayer { bytes data = 2; } -message ObjectPrintTime { // The print time for the whole print and material estimates for the first extruder + +message PrintTimeMaterialEstimates { // The print time for the whole print and material estimates for the extruder + float time = 1; // Total time estimate + repeated MaterialEstimates materialEstimates = 2; // materialEstimates data +} + +message MaterialEstimates { int64 id = 1; - float time = 2; // Total time estimate - float material_amount = 3; // material used in the first extruder + float material_amount = 2; // material used in the extruder } message SettingList { diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index c91e414a13..82815bccb7 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -79,7 +79,8 @@ class CuraEngineBackend(Backend): self._message_handlers["cura.proto.Progress"] = self._onProgressMessage self._message_handlers["cura.proto.GCodeLayer"] = self._onGCodeLayerMessage self._message_handlers["cura.proto.GCodePrefix"] = self._onGCodePrefixMessage - self._message_handlers["cura.proto.ObjectPrintTime"] = self._onObjectPrintTimeMessage + self._message_handlers["cura.proto.PrintTimeMaterialEstimates"] = self._onPrintTimeMaterialEstimates + #self._message_handlers["cura.proto.ObjectPrintTime"] = self._onObjectPrintTimeMessage self._message_handlers["cura.proto.SlicingFinished"] = self._onSlicingFinishedMessage self._start_slice_job = None @@ -294,9 +295,12 @@ class CuraEngineBackend(Backend): ## 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) + # material amount per extruder + def _onPrintTimeMaterialEstimates(self, message): + material_amounts = [] + for index in range(message.repeatedMessageCount("materialEstimates")): + material_amounts.append(message.getRepeatedMessage("materialEstimates", index).material_amount) + self.printDurationMessage.emit(message.time, material_amounts) ## Creates a new socket connection. def _createSocket(self): diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 50b6275bf0..863eaa5166 100644 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -54,7 +54,7 @@ class SliceInfo(Extension): # Get total material used (in mm^3) print_information = Application.getInstance().getPrintInformation() material_radius = 0.5 * global_container_stack.getProperty("material_diameter", "value") - material_used = math.pi * material_radius * material_radius * print_information.materialAmount #Volume of material used + material_used = math.pi * material_radius * material_radius * print_information.materialAmounts #Volume of material used # Get model information (bounding boxes, hashes and transformation matrix) models_info = [] diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index e73bf145de..0dec471a1c 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -24,7 +24,7 @@ Rectangle { UM.I18nCatalog { id: catalog; name:"cura"} property variant printDuration: PrintInformation.currentPrintTime - property real printMaterialAmount: PrintInformation.materialAmount + property real printMaterialAmount: PrintInformation.materialAmounts[0] height: childrenRect.height color: "transparent" From 7b4137ce205b90c45ce3753ae3c5b5ec17a77b35 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 18:35:47 +0200 Subject: [PATCH 17/38] Tweak color and icon logic (add "pre_print" state) CURA-1036 --- resources/qml/MonitorButton.qml | 2 +- resources/qml/Sidebar.qml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 8a232e62f1..bbb39b188e 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -22,7 +22,7 @@ Rectangle { if(!printerConnected) return UM.Theme.getColor("status_offline") - else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing") + else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print") return UM.Theme.getColor("status_busy") else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready") return UM.Theme.getColor("status_ready") diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 25931932d3..78930c8d90 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -101,12 +101,16 @@ Rectangle iconSource: { if(!printerConnected) return UM.Theme.getIcon("tab_monitor") - else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing") + else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print") return UM.Theme.getIcon("tab_monitor_busy") + else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready") + return UM.Theme.getIcon("tab_monitor_connected") else if(Cura.MachineManager.printerOutputDevices[0].jobState == "paused") return UM.Theme.getIcon("tab_monitor_paused") - else if (Cura.MachineManager.printerOutputDevices[0].jobState != "error") - return UM.Theme.getIcon("tab_monitor_connected") + else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error") + return UM.Theme.getIcon("tab_monitor_stopped") + else + return UM.Theme.getIcon("tab_monitor") } checkable: true checked: monitoringPrint From 793f7824c73614f037822905c5b97bf37a42a5ff Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Jul 2016 19:14:48 +0200 Subject: [PATCH 18/38] Quick fix to restore slicing This list of zeros may have to match the number of extruders CURA-1687 --- 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 646400c2c2..6af51c4cc6 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -127,7 +127,7 @@ class CuraEngineBackend(Backend): ## Perform a slice of the scene. def slice(self): - self.printDurationMessage.emit(0, 0) + self.printDurationMessage.emit(0, [0]) self._stored_layer_data = [] From 44e4fc383ef5ce5850af3a509220f334e976f8bb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Jul 2016 09:37:01 +0200 Subject: [PATCH 19/38] Changing active extruder no longer trigger re-slice CURA-1729 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 82815bccb7..c871d35ea7 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -386,5 +386,4 @@ class CuraEngineBackend(Backend): self._active_extruder_stack = ExtruderManager.getInstance().getActiveExtruderStack() if self._active_extruder_stack: self._active_extruder_stack.propertyChanged.connect(self._onSettingChanged) # Note: Only starts slicing when the value changed. - self._active_extruder_stack.containersChanged.connect(self._onChanged) - self._onChanged() \ No newline at end of file + self._active_extruder_stack.containersChanged.connect(self._onChanged) \ No newline at end of file From fc99cac05eeded3a9cf9fad0fa865595cd817541 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Jul 2016 09:39:18 +0200 Subject: [PATCH 20/38] Removed update firmware from extensions; This is now handled by machine actions --- plugins/USBPrinting/USBPrinterOutputDeviceManager.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index 760b1b1564..3f739a8629 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -41,10 +41,6 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension): 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. From aba0392728d38accda9cb60b367401d6682973d6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Jul 2016 10:46:38 +0200 Subject: [PATCH 21/38] Saving g-code no longer crashes --- plugins/SliceInfoPlugin/SliceInfo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 863eaa5166..f19a20c2b0 100644 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -54,7 +54,9 @@ class SliceInfo(Extension): # Get total material used (in mm^3) print_information = Application.getInstance().getPrintInformation() material_radius = 0.5 * global_container_stack.getProperty("material_diameter", "value") - material_used = math.pi * material_radius * material_radius * print_information.materialAmounts #Volume of material used + + # TODO; Send material per extruder instead of mashing it on a pile + material_used = math.pi * material_radius * material_radius * sum(print_information.materialAmounts) #Volume of all materials used # Get model information (bounding boxes, hashes and transformation matrix) models_info = [] From be4cf0083512a1e5cc67a27bfe9c692f4f7a7b7e Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Tue, 5 Jul 2016 18:22:56 +0200 Subject: [PATCH 22/38] BQ Hephestos2: Heat up nozzle while leveling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Saves time and preheats the nozzle to the correct temperature (set by Cura). Btw. the BQ support explained me the reason why they are assuming 210°C needs to set here. The reason is that the printer is just meant to be used with PLA, so they are only expecting to use exactly 210°C. Just explained them why this is incorrect when think about the possibility that Cura can set the temperature on it's own. --- 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 374e41f93c..51777ff83e 100644 --- a/resources/definitions/bq_hephestos_2.def.json +++ b/resources/definitions/bq_hephestos_2.def.json @@ -14,7 +14,7 @@ }, "overrides": { - "machine_start_gcode": { "default_value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\nM109 S{material_print_temperature} ;Makes sure the temperature is correct before printing\n; -- end of START GCODE --" }, + "machine_start_gcode": { "default_value": "; -- START GCODE --\nM104 S{material_print_temperature} ; Heat up extruder while leveling\nM800 ; Custom GCODE to fire start print procedure\nM109 S{material_print_temperature} ; Makes sure the temperature is correct before printing\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": { "default_value": 210 }, "machine_depth": { "default_value": 297 }, From 25c81ce1f86a3be41720b9e5689a490aed7ea7c8 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Tue, 5 Jul 2016 18:55:13 +0200 Subject: [PATCH 23/38] Just a little typo --- plugins/SliceInfoPlugin/SliceInfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index f19a20c2b0..2751173a1c 100644 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -55,7 +55,7 @@ class SliceInfo(Extension): print_information = Application.getInstance().getPrintInformation() material_radius = 0.5 * global_container_stack.getProperty("material_diameter", "value") - # TODO; Send material per extruder instead of mashing it on a pile + # TODO: Send material per extruder instead of mashing it on a pile material_used = math.pi * material_radius * material_radius * sum(print_information.materialAmounts) #Volume of all materials used # Get model information (bounding boxes, hashes and transformation matrix) From c06e5f4d39af1faedf24fd26b25beeb2f4dd1a9b Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 5 Jul 2016 21:58:47 +0200 Subject: [PATCH 24/38] Remove unused name/id when importing a profile from a gcode file A unique name will be set from the filename by ContainerRegistry CURA-1615 --- plugins/GCodeProfileReader/GCodeProfileReader.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py index 1ce1473582..1e649b7dd4 100644 --- a/plugins/GCodeProfileReader/GCodeProfileReader.py +++ b/plugins/GCodeProfileReader/GCodeProfileReader.py @@ -73,7 +73,7 @@ class GCodeProfileReader(ProfileReader): serialized = pattern.sub(lambda m: GCodeProfileReader.escape_characters[re.escape(m.group(0))], serialized) Logger.log("i", "Serialized the following from %s: %s" %(file_name, repr(serialized))) - # Create an empty profile - the id will be changed later + # Create an empty profile - the id and name will be changed by the ContainerRegistry profile = InstanceContainer("") try: profile.deserialize(serialized) @@ -83,9 +83,4 @@ class GCodeProfileReader(ProfileReader): profile.addMetaDataEntry("type", "quality") - #Creating a unique name using the filename of the GCode - new_name = catalog.i18nc("@label", "G-Code-imported profile") - profile.setName(new_name) - profile._id = new_name - return profile From 59020fd98cb3a9f351d4d054270f6a746e0950f9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 6 Jul 2016 11:20:06 +0200 Subject: [PATCH 25/38] CHeckup action now correctly resets every time you start it CURA-1385 --- .../UltimakerMachineActions/UMOCheckupMachineAction.py | 10 +++++++++- .../UMOCheckupMachineAction.qml | 7 +++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py index f13257e8a9..861477d61d 100644 --- a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py +++ b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py @@ -43,7 +43,6 @@ class UMOCheckupMachineAction(MachineAction): if self._output_device is None and self._check_started: self.startCheck() - def _getPrinterOutputDevices(self): return [printer_output_device for printer_output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices() if @@ -63,6 +62,7 @@ class UMOCheckupMachineAction(MachineAction): self._output_device = None self._check_started = False + self.checkStartedChanged.emit() # Ensure everything is reset (and right signals are emitted again) self._bed_test_completed = False @@ -79,6 +79,7 @@ class UMOCheckupMachineAction(MachineAction): @pyqtProperty(bool, notify = onBedTestCompleted) def bedTestCompleted(self): + print("zomg?") return self._bed_test_completed @pyqtProperty(bool, notify = onHotendTestCompleted) @@ -137,9 +138,16 @@ class UMOCheckupMachineAction(MachineAction): self._z_min_endstop_test_completed = True self.onZMinEndstopTestCompleted.emit() + checkStartedChanged = pyqtSignal() + + @pyqtProperty(bool, notify = checkStartedChanged) + def checkStarted(self): + return self._check_started + @pyqtSlot() def startCheck(self): self._check_started = True + self.checkStartedChanged.emit() output_devices = self._getPrinterOutputDevices() if output_devices: self._output_device = output_devices[0] diff --git a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml index 4b25d3130d..d2bc90b601 100644 --- a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml +++ b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml @@ -32,7 +32,7 @@ Cura.MachineAction anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width wrapMode: Text.WordWrap - text: catalog.i18nc("@label","It's a good idea to do a few sanity checks on your Ultimaker. You can skip this step if you know your machine is functional"); + text: catalog.i18nc("@label", "It's a good idea to do a few sanity checks on your Ultimaker. You can skip this step if you know your machine is functional"); } Item @@ -51,7 +51,7 @@ Cura.MachineAction text: catalog.i18nc("@action:button","Start Printer Check"); onClicked: { - checkupContent.visible = true + //checkupContent.visible = true manager.startCheck() } } @@ -73,7 +73,7 @@ Cura.MachineAction id: checkupContent anchors.top: startStopButtons.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - visible: false + visible: manager.checkStarted width: parent.width height: 250 ////////////////////////////////////////////////////////// @@ -188,7 +188,6 @@ Cura.MachineAction onClicked: { manager.heatupHotend() - nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking") } } } From a65bb1432995fbccd40fbc280a608399baa5274f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 6 Jul 2016 12:56:05 +0200 Subject: [PATCH 26/38] Capitalise setting label This is in line with the rest of the setting labels. --- 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 b5d3796e74..c153ca3b07 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -410,7 +410,7 @@ }, "skin_line_width": { - "label": "Top/bottom Line Width", + "label": "Top/Bottom Line Width", "description": "Width of a single top/bottom line.", "unit": "mm", "minimum_value": "0.0001", From d42a97f036d20c1215e534087b153d7615cb5344 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 6 Jul 2016 13:22:09 +0200 Subject: [PATCH 27/38] Fixed firmware upgrade for um2+ CURA-1761 --- 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 3f739a8629..fc10c217a0 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -152,7 +152,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension): "ultimaker_original_plus" : "MarlinUltimaker-UMOP-{baudrate}.hex", "ultimaker2" : "MarlinUltimaker2.hex", "ultimaker2_go" : "MarlinUltimaker2go.hex", - "ultimaker2plus" : "MarlinUltimaker2plus.hex", + "ultimaker2_plus" : "MarlinUltimaker2plus.hex", "ultimaker2_extended" : "MarlinUltimaker2extended.hex", "ultimaker2_extended_plus" : "MarlinUltimaker2extended-plus.hex", } From 0e6754c0e2f6a9adab7ecfd70fd63bc9e65538ce Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 6 Jul 2016 14:06:14 +0200 Subject: [PATCH 28/38] Update UM2 Extended build volume height to value published in marketing materials --- resources/definitions/ultimaker2_extended.def.json | 2 +- resources/definitions/ultimaker2_extended_plus.def.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/ultimaker2_extended.def.json b/resources/definitions/ultimaker2_extended.def.json index cead008643..fb443365f2 100644 --- a/resources/definitions/ultimaker2_extended.def.json +++ b/resources/definitions/ultimaker2_extended.def.json @@ -16,7 +16,7 @@ "overrides": { "machine_height": { - "default_value": 315 + "default_value": 305 } } } diff --git a/resources/definitions/ultimaker2_extended_plus.def.json b/resources/definitions/ultimaker2_extended_plus.def.json index 23b308461d..f4190be83d 100644 --- a/resources/definitions/ultimaker2_extended_plus.def.json +++ b/resources/definitions/ultimaker2_extended_plus.def.json @@ -15,7 +15,7 @@ "overrides": { "machine_height": { - "default_value": 313 + "default_value": 305 }, "machine_show_variants": { "default_value": true From a5ba68bae3502a21ced78a19ad35b1394292c034 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 6 Jul 2016 14:09:08 +0200 Subject: [PATCH 29/38] Ensure that the display matches with the backend active extruder data --- cura/ExtruderManager.py | 4 ++++ resources/qml/SidebarHeader.qml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index 5d0ad612cf..16eaf7f8c4 100644 --- a/cura/ExtruderManager.py +++ b/cura/ExtruderManager.py @@ -66,6 +66,10 @@ class ExtruderManager(QObject): self._active_extruder_index = index self.activeExtruderChanged.emit() + @pyqtProperty(int, notify = activeExtruderChanged) + def activeExtruderIndex(self): + return self._active_extruder_index + def getActiveExtruderStack(self): global_container_stack = UM.Application.getInstance().getGlobalContainerStack() if global_container_stack: diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index ac6c491262..82dba70b92 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -13,7 +13,7 @@ Column id: base; property int totalHeightHeader: childrenRect.height - property int currentExtruderIndex: -1; + property int currentExtruderIndex:ExtruderManager.activeExtruderIndex; spacing: UM.Theme.getSize("default_margin").height @@ -118,7 +118,7 @@ Column { base.currentExtruderIndex = -1; forceActiveFocus() - ExtruderManager.setActiveExtruderIndex(0); + ExtruderManager.setActiveExtruderIndex(base.currentExtruderIndex); } } From b3a6fafd97f5a55993f34941355fd99be0918007 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 6 Jul 2016 14:30:34 +0200 Subject: [PATCH 30/38] Set default extruder index to -1 (so global is default) --- cura/ExtruderManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index 16eaf7f8c4..e937714d85 100644 --- a/cura/ExtruderManager.py +++ b/cura/ExtruderManager.py @@ -22,7 +22,7 @@ class ExtruderManager(QObject): def __init__(self, parent = None): super().__init__(parent) self._extruder_trains = { } #Per machine, a dictionary of extruder container stack IDs. - self._active_extruder_index = 0 + self._active_extruder_index = -1 UM.Application.getInstance().globalContainerStackChanged.connect(self._addCurrentMachineExtruders) ## Gets the unique identifier of the currently active extruder stack. From bdd3ecbc1af8fca469ebecc93da747d19d0ec0ed Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 6 Jul 2016 14:32:37 +0200 Subject: [PATCH 31/38] Update GUID for PLA to match the GUID in the official repository CURA-491 --- resources/materials/generic_pla.xml.fdm_material | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/materials/generic_pla.xml.fdm_material b/resources/materials/generic_pla.xml.fdm_material index 2f8fa165cf..40432d5849 100644 --- a/resources/materials/generic_pla.xml.fdm_material +++ b/resources/materials/generic_pla.xml.fdm_material @@ -9,7 +9,7 @@ Generic PLA profile. Serves as an example file, data in this file is not correct PLA Generic - 86a89ceb-4159-47f6-ab97-e9953803d70f + 506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 0 #00FF00 From 2be8111f1bf28a47c539c8bf8feea340dd7cb15e Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 6 Jul 2016 16:21:03 +0200 Subject: [PATCH 32/38] Restart timer after slicing is performed when not enabled. CURA-1502 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 9e37fa9049..40729eb48b 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -127,13 +127,15 @@ class CuraEngineBackend(Backend): ## Perform a slice of the scene. def slice(self): + if not self._enabled or not self._global_container_stack: #We shouldn't be slicing. + # try again in a short time + self._change_timer.start() + return + self.printDurationMessage.emit(0, [0]) self._stored_layer_data = [] - 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. self._terminate() From 57d0ad1bd0f70a68d3a0ca88f2952c641cd31f55 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 6 Jul 2016 16:32:24 +0200 Subject: [PATCH 33/38] Made exception handling of slice info plugin way more robust CURA-1831 --- plugins/SliceInfoPlugin/SliceInfo.py | 145 ++++++++++++++------------- 1 file changed, 75 insertions(+), 70 deletions(-) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 2751173a1c..487b077d2b 100644 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -45,74 +45,79 @@ class SliceInfo(Extension): Preferences.getInstance().setValue("info/asked_send_slice_info", True) def _onWriteStarted(self, output_device): - if not Preferences.getInstance().getValue("info/send_slice_info"): - Logger.log("d", "'info/send_slice_info' is turned off.") - return # Do nothing, user does not want to send data - - global_container_stack = Application.getInstance().getGlobalContainerStack() - - # Get total material used (in mm^3) - print_information = Application.getInstance().getPrintInformation() - material_radius = 0.5 * global_container_stack.getProperty("material_diameter", "value") - - # TODO: Send material per extruder instead of mashing it on a pile - material_used = math.pi * material_radius * material_radius * sum(print_information.materialAmounts) #Volume of all materials used - - # Get model information (bounding boxes, hashes and transformation matrix) - models_info = [] - for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()): - if type(node) is SceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None: - if not getattr(node, "_outside_buildarea", False): - model_info = {} - model_info["hash"] = node.getMeshData().getHash() - model_info["bounding_box"] = {} - model_info["bounding_box"]["minimum"] = {} - model_info["bounding_box"]["minimum"]["x"] = node.getBoundingBox().minimum.x - model_info["bounding_box"]["minimum"]["y"] = node.getBoundingBox().minimum.y - model_info["bounding_box"]["minimum"]["z"] = node.getBoundingBox().minimum.z - - model_info["bounding_box"]["maximum"] = {} - model_info["bounding_box"]["maximum"]["x"] = node.getBoundingBox().maximum.x - model_info["bounding_box"]["maximum"]["y"] = node.getBoundingBox().maximum.y - model_info["bounding_box"]["maximum"]["z"] = node.getBoundingBox().maximum.z - model_info["transformation"] = str(node.getWorldTransformation().getData()) - - models_info.append(model_info) - - # Bundle the collected data - submitted_data = { - "processor": platform.processor(), - "machine": platform.machine(), - "platform": platform.platform(), - "settings": global_container_stack.serialize(), # global_container with references on used containers - "version": Application.getInstance().getVersion(), - "modelhash": "None", - "printtime": print_information.currentPrintTime.getDisplayString(), - "filament": material_used, - "language": Preferences.getInstance().getValue("general/language"), - "materials_profiles ": {} - } - for container in global_container_stack.getContainers(): - container_id = container.getId() - try: - container_serialized = container.serialize() - except NotImplementedError: - Logger.log("w", "Container %s could not be serialized!", container_id) - continue - - if container_serialized: - submitted_data["settings_%s" %(container_id)] = container_serialized # This can be anything, eg. INI, JSON, etc. - else: - Logger.log("i", "No data found in %s to be serialized!", container_id) - - # Convert data to bytes - submitted_data = urllib.parse.urlencode(submitted_data) - binary_data = submitted_data.encode("utf-8") - - # Submit data try: - f = urllib.request.urlopen(self.info_url, data = binary_data, timeout = 1) - Logger.log("i", "Sent anonymous slice info to %s", self.info_url) - f.close() - except Exception as e: - Logger.logException("e", e) + if not Preferences.getInstance().getValue("info/send_slice_info"): + Logger.log("d", "'info/send_slice_info' is turned off.") + return # Do nothing, user does not want to send data + + global_container_stack = Application.getInstance().getGlobalContainerStack() + + # Get total material used (in mm^3) + print_information = Application.getInstance().getPrintInformation() + material_radius = 0.5 * global_container_stack.getProperty("material_diameter", "value") + + # TODO: Send material per extruder instead of mashing it on a pile + material_used = math.pi * material_radius * material_radius * sum(print_information.materialAmounts) #Volume of all materials used + + # Get model information (bounding boxes, hashes and transformation matrix) + models_info = [] + for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()): + if type(node) is SceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None: + if not getattr(node, "_outside_buildarea", False): + model_info = {} + model_info["hash"] = node.getMeshData().getHash() + model_info["bounding_box"] = {} + model_info["bounding_box"]["minimum"] = {} + model_info["bounding_box"]["minimum"]["x"] = node.getBoundingBox().minimum.x + model_info["bounding_box"]["minimum"]["y"] = node.getBoundingBox().minimum.y + model_info["bounding_box"]["minimum"]["z"] = node.getBoundingBox().minimum.z + + model_info["bounding_box"]["maximum"] = {} + model_info["bounding_box"]["maximum"]["x"] = node.getBoundingBox().maximum.x + model_info["bounding_box"]["maximum"]["y"] = node.getBoundingBox().maximum.y + model_info["bounding_box"]["maximum"]["z"] = node.getBoundingBox().maximum.z + model_info["transformation"] = str(node.getWorldTransformation().getData()) + + models_info.append(model_info) + + # Bundle the collected data + submitted_data = { + "processor": platform.processor(), + "machine": platform.machine(), + "platform": platform.platform(), + "settings": global_container_stack.serialize(), # global_container with references on used containers + "version": Application.getInstance().getVersion(), + "modelhash": "None", + "printtime": print_information.currentPrintTime.getDisplayString(), + "filament": material_used, + "language": Preferences.getInstance().getValue("general/language"), + "materials_profiles ": {} + } + for container in global_container_stack.getContainers(): + container_id = container.getId() + try: + container_serialized = container.serialize() + except NotImplementedError: + Logger.log("w", "Container %s could not be serialized!", container_id) + continue + + if container_serialized: + submitted_data["settings_%s" %(container_id)] = container_serialized # This can be anything, eg. INI, JSON, etc. + else: + Logger.log("i", "No data found in %s to be serialized!", container_id) + + # Convert data to bytes + submitted_data = urllib.parse.urlencode(submitted_data) + binary_data = submitted_data.encode("utf-8") + + # Submit data + try: + f = urllib.request.urlopen(self.info_url, data = binary_data, timeout = 1) + Logger.log("i", "Sent anonymous slice info to %s", self.info_url) + f.close() + except Exception as e: + Logger.logException("e", "An exception occurred while trying to send slice information") + except: + # We really can't afford to have a mistake here, as this would break the sending of g-code to a device + # (Either saving or directly to a printer). The functionality of the slice data is not *that* important. + pass \ No newline at end of file From a3618c243d8b2c3585af0fb10528c675d5d48758 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 6 Jul 2016 16:38:35 +0200 Subject: [PATCH 34/38] Added deepcopy function CURA-1578 --- cura/MultiMaterialDecorator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cura/MultiMaterialDecorator.py b/cura/MultiMaterialDecorator.py index c702ecef13..5fee777309 100644 --- a/cura/MultiMaterialDecorator.py +++ b/cura/MultiMaterialDecorator.py @@ -5,4 +5,7 @@ class MultiMaterialDecorator(SceneNodeDecorator): super().__init__() def isMultiMaterial(self): - return True \ No newline at end of file + return True + + def __deepcopy__(self, memo): + return MultiMaterialDecorator() \ No newline at end of file From 35efea3d11b8f84f142d436f6d26b2f3c02986a8 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 7 Jul 2016 09:52:53 +0200 Subject: [PATCH 35/38] Show "ready" state when a printer is connected but jobstate is not yet set CURA-1036 --- resources/qml/MonitorButton.qml | 2 +- resources/qml/Sidebar.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index bbb39b188e..af163a39e2 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -24,7 +24,7 @@ Rectangle return UM.Theme.getColor("status_offline") else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print") return UM.Theme.getColor("status_busy") - else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready") + else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready" || Cura.MachineManager.printerOutputDevices[0].jobState == "") return UM.Theme.getColor("status_ready") else if(Cura.MachineManager.printerOutputDevices[0].jobState == "paused") return UM.Theme.getColor("status_paused") diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 78930c8d90..d9b3b56109 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -103,7 +103,7 @@ Rectangle return UM.Theme.getIcon("tab_monitor") else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print") return UM.Theme.getIcon("tab_monitor_busy") - else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready") + else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready" || Cura.MachineManager.printerOutputDevices[0].jobState == "") return UM.Theme.getIcon("tab_monitor_connected") else if(Cura.MachineManager.printerOutputDevices[0].jobState == "paused") return UM.Theme.getIcon("tab_monitor_paused") From 2ba2599d6b860c724cd4668c65face16c17884f0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 7 Jul 2016 10:23:01 +0200 Subject: [PATCH 36/38] Remove debug statement and commented-out code CURA-1385 --- plugins/UltimakerMachineActions/UMOCheckupMachineAction.py | 1 - plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml | 1 - 2 files changed, 2 deletions(-) diff --git a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py index 861477d61d..4a44f50bf4 100644 --- a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py +++ b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py @@ -79,7 +79,6 @@ class UMOCheckupMachineAction(MachineAction): @pyqtProperty(bool, notify = onBedTestCompleted) def bedTestCompleted(self): - print("zomg?") return self._bed_test_completed @pyqtProperty(bool, notify = onHotendTestCompleted) diff --git a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml index d2bc90b601..c85a9c74e4 100644 --- a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml +++ b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml @@ -51,7 +51,6 @@ Cura.MachineAction text: catalog.i18nc("@action:button","Start Printer Check"); onClicked: { - //checkupContent.visible = true manager.startCheck() } } From 8c22efc4dd62ed72a81405e58048ba5eaf54b228 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 7 Jul 2016 10:38:08 +0200 Subject: [PATCH 37/38] Fix UMO Checkup button size CURA-1385 --- .../UMOCheckupMachineAction.qml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml index c85a9c74e4..5d5a102e7d 100644 --- a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml +++ b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml @@ -156,6 +156,7 @@ Cura.MachineAction { id: nozzleTempLabel width: checkupMachineAction.leftRow + height: nozzleTempButton.height anchors.left: parent.left anchors.top: endstopZLabel.bottom wrapMode: Text.WordWrap @@ -174,15 +175,12 @@ Cura.MachineAction { id: nozzleTempButton width: checkupMachineAction.rightRow * 0.3 - height: nozzleTemp.height + height: childrenRect.height anchors.top: nozzleTempLabel.top anchors.left: bedTempStatus.right anchors.leftMargin: UM.Theme.getSize("default_margin").width/2 Button { - height: nozzleTemp.height - 2 - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter text: catalog.i18nc("@action:button","Start Heating") onClicked: { @@ -206,10 +204,11 @@ Cura.MachineAction { id: bedTempLabel width: checkupMachineAction.leftRow + height: bedTempButton.height anchors.left: parent.left anchors.top: nozzleTempLabel.bottom wrapMode: Text.WordWrap - text: catalog.i18nc("@label","bed temperature check:") + text: catalog.i18nc("@label","Bed temperature check:") } Label @@ -225,15 +224,12 @@ Cura.MachineAction { id: bedTempButton width: checkupMachineAction.rightRow * 0.3 - height: bedTemp.height + height: childrenRect.height anchors.top: bedTempLabel.top anchors.left: bedTempStatus.right anchors.leftMargin: UM.Theme.getSize("default_margin").width/2 Button { - height: bedTemp.height - 2 - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter text: catalog.i18nc("@action:button","Start Heating") onClicked: { From 464fe111239cb52602ca5ae30fa2b846e4e1da6a Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 7 Jul 2016 11:04:34 +0200 Subject: [PATCH 38/38] Fixed profile file case-sensitivity. CURA-1720 --- cura/CuraContainerRegistry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraContainerRegistry.py b/cura/CuraContainerRegistry.py index 2ecb22d670..af7ca2e87e 100644 --- a/cura/CuraContainerRegistry.py +++ b/cura/CuraContainerRegistry.py @@ -53,7 +53,7 @@ class CuraContainerRegistry(ContainerRegistry): def _containerExists(self, container_type, container_name): container_class = ContainerStack if container_type == "machine" else InstanceContainer - return self.findContainers(container_class, id = container_name, type = container_type) or \ + return self.findContainers(container_class, id = container_name, type = container_type, ignore_case = True) or \ self.findContainers(container_class, name = container_name, type = container_type) ## Exports an profile to a file