From 4e13c262cf50b9de1885a6306f54b45d18fa354f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 11 Aug 2016 10:42:37 +0200 Subject: [PATCH 01/15] Re-add max warning value for speed_slowdown_layers It warns if the slowdown layers span more than 1mm. Contributes to issue CURA-1049. --- resources/definitions/fdmprinter.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index f781edc47e..0eecbafec7 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1586,6 +1586,7 @@ "type": "int", "default_value": 2, "minimum_value": "0", + "maximum_value_warning": "1.0 / layer_height", "settable_per_mesh": false, "settable_per_extruder": false }, From 8c231e29429dd1a2a3dbda29bbab06e607408f18 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 11 Aug 2016 10:46:58 +0200 Subject: [PATCH 02/15] Allow higher speeds for diagonal wireframe moves Since these moves are slightly diagonal in all directions, a higher speed can be achieved. Exactly how high depends on both angles, but for simplification this limit is a bit too broad, allowing speeds that the printer can't handle. The firmware should catch that case if it happens. Contributes to issue CURA-1049. --- 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 0eecbafec7..50834d5568 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3737,7 +3737,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + math.max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "settable_per_mesh": false, @@ -3769,7 +3769,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.max(max_feedrate_z_override, machine_max_feedrate_z)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + math.max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "value": "wireframe_printspeed", @@ -3785,7 +3785,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + math.max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "value": "wireframe_printspeed", From 71a9f2dd7a64c94259fea3df7943bc716430d442 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 11 Aug 2016 11:53:55 +0200 Subject: [PATCH 03/15] Clean up conversion to string CURA-2071 --- resources/qml/SidebarSimple.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 1cc9dac6f9..ac9642cc06 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -328,7 +328,7 @@ Item } else { supportEnabled.setPropertyValue("value", true); // Send the extruder nr as a string. - supportExtruderNr.setPropertyValue("value", parseInt(index - 1) + ""); + supportExtruderNr.setPropertyValue("value", String(index - 1)); } } MouseArea { From 6075536497ab5792cb608458c017f73d4b20cfcc Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 11 Aug 2016 14:37:58 +0200 Subject: [PATCH 04/15] Fix settingtextfield validator in PerObjectSettings CURA-2115 --- 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 4d05bef2b9..686a47ca47 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -100,7 +100,7 @@ SettingItem maximumLength: 10; - validator: RegExpValidator { regExp: (type == "int") ? /^-?[0-9]{0,10}/ : /^-?[0-9.,]{0,10}/ } //"type" property from parent loader used to disallow fractional number entry + validator: RegExpValidator { regExp: (definition.type == "int") ? /^-?[0-9]{0,10}/ : /^-?[0-9.,]{0,10}/ } // definition.type property from parent loader used to disallow fractional number entry Binding { From 91dfd971cadef8e675e73de4aa043b2faa2158dd Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 11 Aug 2016 14:57:21 +0200 Subject: [PATCH 05/15] PerObject settings don't automatically get a user changed state CURA-2113 --- .../PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py index e7295c3f97..af3e84cfd8 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py @@ -70,6 +70,7 @@ class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHand else: stack = UM.Application.getInstance().getGlobalContainerStack() new_instance.setProperty("value", stack.getProperty(item, "value")) + new_instance.resetState() # Ensute that the state is not seen as a user state. settings.addInstance(new_instance) visibility_changed = True else: From db028b7e5f3f78ed493d53c08f128e7a235576e5 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 11 Aug 2016 15:10:30 +0200 Subject: [PATCH 06/15] Update "Select Settings dialog" when the user removes a setting CURA-2102 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 4f2d8e4272..0930ae568e 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -311,6 +311,15 @@ Item { property string labelFilter: "" + onVisibilityChanged: + { + // force updating the model to sync it with addedSettingsModel + if(visible) + { + listview.model.forceUpdate() + } + } + TextField { id: filter From 1848bb5cc40961ba1b7f2d178f019bfb176affc5 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 11 Aug 2016 16:36:24 +0200 Subject: [PATCH 07/15] Fix typo in Changes on the Printer dialog --- cura/Settings/MachineManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 6a180593c5..42784e4e38 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -165,7 +165,7 @@ class MachineManager(QObject): # Save the material that needs to be changed. Multiple changes will be handled by the callback. self._auto_materials_changed[str(index)] = containers[0].getId() Application.getInstance().messageBox(catalog.i18nc("@window:title", "Changes on the Printer"), catalog.i18nc("@label", "Do you want to change the materials and hotends to match the material in your printer?"), - catalog.i18nc("@label", "The materials and / or hotends on your printer were changed. For best results always slice for the materials . hotends that are inserted in your printer."), + catalog.i18nc("@label", "The materials and / or hotends on your printer were changed. For best results always slice for the materials and hotends that are inserted in your printer."), buttons = QMessageBox.Yes + QMessageBox.No, icon = QMessageBox.Question, callback = self._materialHotendChangedCallback) else: From c95cc7a21b409f2ab3e7fad726139c751be1f04c Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 11 Aug 2016 16:44:19 +0200 Subject: [PATCH 08/15] Fix error in SolidView when there is a model but no printer --- plugins/SolidView/SolidView.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 7896892808..3e3501a83f 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -62,8 +62,11 @@ class SolidView(View): uniforms = {} if not multi_extrusion: - material = global_container_stack.findContainer({ "type": "material" }) - material_color = material.getMetaDataEntry("color_code", default = self._extruders_model.defaultColors[0]) if material else self._extruders_model.defaultColors[0] + if global_container_stack: + material = global_container_stack.findContainer({ "type": "material" }) + material_color = material.getMetaDataEntry("color_code", default = self._extruders_model.defaultColors[0]) if material else self._extruders_model.defaultColors[0] + else: + material_color = self._extruders_model.defaultColors[0] else: # Get color to render this mesh in from ExtrudersModel extruder_index = 0 From b619b68675600c90ecaa2bf67891fa4f5b8e47f3 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 11 Aug 2016 16:51:48 +0200 Subject: [PATCH 09/15] Remove repeated header between versions in changelog CURA-2056 --- plugins/ChangeLogPlugin/ChangeLog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/ChangeLogPlugin/ChangeLog.py b/plugins/ChangeLogPlugin/ChangeLog.py index d004104f91..b30cba4a8e 100644 --- a/plugins/ChangeLogPlugin/ChangeLog.py +++ b/plugins/ChangeLogPlugin/ChangeLog.py @@ -68,6 +68,7 @@ class ChangeLog(Extension, QObject,): line = line.replace("[","") line = line.replace("]","") open_version = Version(line) + open_header = "" self._change_logs[open_version] = collections.OrderedDict() elif line.startswith("*"): open_header = line.replace("*","") From 2a55bba8400874d6fdf2b8067fc8da8c44bc6907 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 11 Aug 2016 16:58:02 +0200 Subject: [PATCH 10/15] Code-style fixes CURA-2079 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 12 +++++----- plugins/USBPrinting/avr_isp/stk500v2.py | 24 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 421168b87f..af90961ff9 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -182,10 +182,10 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if len(hex_file) == 0: Logger.log("e", "Unable to read provided hex file. Could not update firmware") - return + return programmer = stk500v2.Stk500v2() - programmer.progressCallback = self.setProgress + programmer.progress_callback = self.setProgress try: programmer.connect(self._serial_port) @@ -197,7 +197,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if not programmer.isConnected(): Logger.log("e", "Unable to connect with serial. Could not update firmware") - return + return self._updating_firmware = True @@ -299,7 +299,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self.setConnectionState(ConnectionState.connected) self._listen_thread.start() # Start listening Logger.log("i", "Established printer connection on port %s" % self._serial_port) - return + return self._sendCommand("M105") # Send M105 as long as we are listening, otherwise we end up in an undefined state @@ -327,7 +327,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._connect_thread = threading.Thread(target = self._connect) self._connect_thread.daemon = True - + self.setConnectionState(ConnectionState.closed) if self._serial is not None: try: @@ -556,7 +556,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): ret = self._serial.readline() except Exception as e: Logger.log("e", "Unexpected error while reading serial port. %s" % e) - self._setErrorState("Printer has been disconnected") + self._setErrorState("Printer has been disconnected") self.close() return None return ret diff --git a/plugins/USBPrinting/avr_isp/stk500v2.py b/plugins/USBPrinting/avr_isp/stk500v2.py index 3960912e1d..afdb50553e 100644 --- a/plugins/USBPrinting/avr_isp/stk500v2.py +++ b/plugins/USBPrinting/avr_isp/stk500v2.py @@ -20,8 +20,8 @@ class Stk500v2(ispBase.IspBase): self.serial = None self.seq = 1 self.last_addr = -1 - self.progressCallback = None - + self.progress_callback = None + def connect(self, port = "COM22", speed = 115200): if self.serial is not None: self.close() @@ -69,7 +69,7 @@ class Stk500v2(ispBase.IspBase): self.serial = None return ret return None - + def isConnected(self): return self.serial is not None @@ -79,7 +79,7 @@ class Stk500v2(ispBase.IspBase): def sendISP(self, data): recv = self.sendMessage([0x1D, 4, 4, 0, data[0], data[1], data[2], data[3]]) return recv[2:6] - + def writeFlash(self, flash_data): #Set load addr to 0, in case we have more then 64k flash we need to enable the address extension page_size = self.chip["pageSize"] * 2 @@ -89,15 +89,15 @@ class Stk500v2(ispBase.IspBase): self.sendMessage([0x06, 0x80, 0x00, 0x00, 0x00]) else: self.sendMessage([0x06, 0x00, 0x00, 0x00, 0x00]) - load_count = (len(flash_data) + page_size - 1) / page_size + load_count = (len(flash_data) + page_size - 1) / page_size for i in range(0, int(load_count)): recv = self.sendMessage([0x13, page_size >> 8, page_size & 0xFF, 0xc1, 0x0a, 0x40, 0x4c, 0x20, 0x00, 0x00] + flash_data[(i * page_size):(i * page_size + page_size)]) - if self.progressCallback is not None: + if self.progress_callback is not None: if self._has_checksum: - self.progressCallback(i + 1, load_count) + self.progress_callback(i + 1, load_count) else: - self.progressCallback(i + 1, load_count * 2) - + self.progress_callback(i + 1, load_count * 2) + def verifyFlash(self, flash_data): if self._has_checksum: self.sendMessage([0x06, 0x00, (len(flash_data) >> 17) & 0xFF, (len(flash_data) >> 9) & 0xFF, (len(flash_data) >> 1) & 0xFF]) @@ -120,8 +120,8 @@ class Stk500v2(ispBase.IspBase): load_count = (len(flash_data) + 0xFF) / 0x100 for i in range(0, int(load_count)): recv = self.sendMessage([0x14, 0x01, 0x00, 0x20])[2:0x102] - if self.progressCallback is not None: - self.progressCallback(load_count + i + 1, load_count * 2) + if self.progress_callback is not None: + self.progress_callback(load_count + i + 1, load_count * 2) for j in range(0, 0x100): if i * 0x100 + j < len(flash_data) and flash_data[i * 0x100 + j] != recv[j]: raise ispBase.IspError("Verify error at: 0x%x" % (i * 0x100 + j)) @@ -141,7 +141,7 @@ class Stk500v2(ispBase.IspBase): raise ispBase.IspError("Serial send timeout") self.seq = (self.seq + 1) & 0xFF return self.recvMessage() - + def recvMessage(self): state = "Start" checksum = 0 From 5c63e5e13f7659b6fcec8d0304446fc79e426db2 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 11 Aug 2016 17:18:43 +0200 Subject: [PATCH 11/15] Fix a typo in a comment CURA-2113 --- .../PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py index af3e84cfd8..b4086291ca 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py @@ -70,7 +70,7 @@ class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHand else: stack = UM.Application.getInstance().getGlobalContainerStack() new_instance.setProperty("value", stack.getProperty(item, "value")) - new_instance.resetState() # Ensute that the state is not seen as a user state. + new_instance.resetState() # Ensure that the state is not seen as a user state. settings.addInstance(new_instance) visibility_changed = True else: From 1ab0637d117e6dff9c3719a493f04339d93bff35 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Thu, 11 Aug 2016 20:34:01 +0200 Subject: [PATCH 12/15] Adding "approximately equal" to the amount of material needed I think it makes sense to add this character here, because the amount needed is only a approximated value, and without the end-user might expect a more accurate value. --- resources/qml/JobSpecs.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 9064c4835f..2221604ddc 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -209,7 +209,7 @@ Rectangle { lengths = ["0.00"]; weights = ["0"]; } - return catalog.i18nc("@label", "%1 m / %2 g").arg(lengths.join(" + ")).arg(weights.join(" + ")); + return catalog.i18nc("@label", "≈ %1 m / %2 g").arg(lengths.join(" + ")).arg(weights.join(" + ")); } } } From bfe97a1eca3905daef728e91a4ee89dae84a90af Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Thu, 11 Aug 2016 21:10:16 +0200 Subject: [PATCH 13/15] Using ~ only for the amount of material in grams --- resources/qml/JobSpecs.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 2221604ddc..78f184f13c 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -209,7 +209,7 @@ Rectangle { lengths = ["0.00"]; weights = ["0"]; } - return catalog.i18nc("@label", "≈ %1 m / %2 g").arg(lengths.join(" + ")).arg(weights.join(" + ")); + return catalog.i18nc("@label", "%1 m / ~ %2 g").arg(lengths.join(" + ")).arg(weights.join(" + ")); } } } From 85d97453f18173cf589a93e0989edf6c450fabe1 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Sun, 31 Jul 2016 21:44:57 +0200 Subject: [PATCH 14/15] JSON feat: brim only on outer boundary polys (CURA-1413) --- resources/definitions/fdmprinter.def.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 50834d5568..52891a3747 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -2748,6 +2748,16 @@ } } }, + "brim_outside_only": + { + "label": "Brim Only on Outside", + "description": "Only print the brim on the outside of the model. This reduces the amount of brim you need to remove afterwards, while it doesn't reduce the bed adhesion that much.", + "type": "bool", + "default_value": true, + "enabled": "adhesion_type == \"brim\"", + "settable_per_mesh": false, + "settable_per_extruder": true + }, "raft_margin": { "label": "Raft Extra Margin", From 4472e0206e8d5380e3f4a85dc2c257e469c2a8bd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 12 Aug 2016 16:56:07 +0200 Subject: [PATCH 15/15] Fix calls to max function I think this was my mistake. --- 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 52891a3747..380faa397e 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3747,7 +3747,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + math.max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "settable_per_mesh": false, @@ -3779,7 +3779,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + math.max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "value": "wireframe_printspeed", @@ -3795,7 +3795,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + math.max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "value": "wireframe_printspeed",