From 2749de9a6748a93ff1cda37c731660a630ec37a5 Mon Sep 17 00:00:00 2001 From: David Fries Date: Fri, 30 Aug 2024 09:12:03 -0500 Subject: [PATCH 1/5] Fix RecentFilesMenu.qml onObjectRemoved incompatible arguments "share/cura/resources/qml/Menus/RecentFilesMenu.qml:39: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed." This was passing the Instantiator index, which is a Number to menu.removeItem which is expecting an object. Add the missing index argument. I found Qt 5.7 had two arguments so it has been there for some time. --- resources/qml/ActionPanel/OutputProcessWidget.qml | 2 +- resources/qml/Menus/RecentFilesMenu.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml index 1303dc20a2..c609cd6ca5 100644 --- a/resources/qml/ActionPanel/OutputProcessWidget.qml +++ b/resources/qml/ActionPanel/OutputProcessWidget.qml @@ -10,7 +10,7 @@ import Cura 1.0 as Cura // This element contains all the elements the user needs to visualize the data -// that is gather after the slicing process, such as printint time, material usage, ... +// that is gather after the slicing process, such as printing time, material usage, ... // There are also two buttons: one to previsualize the output layers, and the other to // select what to do with it (such as print over network, save to file, ...) Column diff --git a/resources/qml/Menus/RecentFilesMenu.qml b/resources/qml/Menus/RecentFilesMenu.qml index 19ff681219..93fddd0bf6 100644 --- a/resources/qml/Menus/RecentFilesMenu.qml +++ b/resources/qml/Menus/RecentFilesMenu.qml @@ -2,7 +2,7 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 2.1 +import QtQuick.Controls 2.15 import UM 1.3 as UM import Cura 1.0 as Cura @@ -30,6 +30,6 @@ Cura.Menu onTriggered: CuraApplication.readLocalFile(modelData) } onObjectAdded: (index, object) => menu.insertItem(index, object) - onObjectRemoved: (object) => menu.removeItem(object) + onObjectRemoved: (index, object) => menu.removeItem(object) } } From 38695d9572bb84eaa20acbb2ca10ecb2f2408907 Mon Sep 17 00:00:00 2001 From: David Fries Date: Fri, 30 Aug 2024 10:34:12 -0500 Subject: [PATCH 2/5] Fix RecommendedSupportSelector.qml assign undefined to int share/cura/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml:60:17: Unable to assign [undefined] to int If undefined use Widgets/SingleSettingComboBox.qml default of Cura.ExtruderManager.activeExtruderIndex --- .../Recommended/RecommendedSupportSelector.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 254ba477bf..c1b36676c7 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -57,7 +57,9 @@ RecommendedSettingSection settingName: "support_structure" propertyRemoveUnusedValue: false updateAllExtruders: false - defaultExtruderIndex: supportExtruderProvider.properties.value + defaultExtruderIndex: supportExtruderProvider.properties.value != undefined ? + supportExtruderProvider.properties.value : + Cura.ExtruderManager.activeExtruderIndex } }, RecommendedSettingItem @@ -92,7 +94,9 @@ RecommendedSettingSection width: parent.width settingName: "support_type" updateAllExtruders: true - defaultExtruderIndex: supportExtruderProvider.properties.value + defaultExtruderIndex: supportExtruderProvider.properties.value != undefined ? + supportExtruderProvider.properties.value : + Cura.ExtruderManager.activeExtruderIndex } } ] From 6e3e3e67425a100e13eb7f7f85e390f5e7cc9dfa Mon Sep 17 00:00:00 2001 From: David Fries Date: Fri, 30 Aug 2024 18:20:52 -0500 Subject: [PATCH 3/5] Use raw strings for regular expressions with invalid escape sequences If "T(\d*)" was "T(\n*)" it would search for newlines. There isn't any such \d escape character. It should be "T(\\d*)" or r"T(\d*)" going with the latter, to be easier to read and be consistent with other Cura usage. Start python with -Wd or for python 3.12 will raise a SyntaxWarning. --- plugins/PostProcessingPlugin/Script.py | 2 +- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 2 +- plugins/UM3NetworkPrinting/src/ExportFileJob.py | 2 +- scripts/extract_changelog.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/PostProcessingPlugin/Script.py b/plugins/PostProcessingPlugin/Script.py index be661e0889..bdd57a06e0 100644 --- a/plugins/PostProcessingPlugin/Script.py +++ b/plugins/PostProcessingPlugin/Script.py @@ -122,7 +122,7 @@ class Script: if not key in line or (';' in line and line.find(key) > line.find(';')): return default sub_part = line[line.find(key) + 1:] - m = re.search('^-?[0-9]+\.?[0-9]*', sub_part) + m = re.search(r'^-?[0-9]+\.?[0-9]*', sub_part) if m is None: return default try: diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index f502678317..43df766962 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -338,7 +338,7 @@ class PauseAtHeight(Script): nbr_negative_layers += 1 #Track the latest printing temperature in order to resume at the correct temperature. - if re.match("T(\d*)", line): + if re.match(r"T(\d*)", line): current_t = self.getValue(line, "T") m = self.getValue(line, "M") if m is not None and (m == 104 or m == 109) and self.getValue(line, "S") is not None: diff --git a/plugins/UM3NetworkPrinting/src/ExportFileJob.py b/plugins/UM3NetworkPrinting/src/ExportFileJob.py index ac3da65719..1ab493c747 100644 --- a/plugins/UM3NetworkPrinting/src/ExportFileJob.py +++ b/plugins/UM3NetworkPrinting/src/ExportFileJob.py @@ -28,7 +28,7 @@ class ExportFileJob(WriteFileJob): # Determine the filename. job_name = CuraApplication.getInstance().getPrintInformation().jobName - job_name = re.sub("[^\w\-. ()]", "-", job_name) + job_name = re.sub(r"[^\w\-. ()]", "-", job_name) extension = self._mesh_format_handler.preferred_format.get("extension", "") self.setFileName("{}.{}".format(job_name, extension)) diff --git a/scripts/extract_changelog.py b/scripts/extract_changelog.py index a1a0b251f0..934b963e0a 100644 --- a/scripts/extract_changelog.py +++ b/scripts/extract_changelog.py @@ -13,7 +13,7 @@ if __name__ == "__main__": args.version = args.version[:-2] start_token = f"[{args.version}]" - pattern_stop_log = "\[\d+(\.\d+){1,2}\]" + pattern_stop_log = r"\[\d+(\.\d+){1,2}\]" log_line = False first_chapter = True From b2e86ca185a7e98d08e24d975f79fc924eb6036a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 11 Feb 2025 14:43:35 +0100 Subject: [PATCH 4/5] Bump patch version to reflect Conan upgrade CURA-12390 --- conandata.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conandata.yml b/conandata.yml index de95766ed2..59c3163679 100644 --- a/conandata.yml +++ b/conandata.yml @@ -5,9 +5,9 @@ requirements: - "curaengine/5.10.0-alpha.0@ultimaker/testing" - "cura_binary_data/5.10.0-alpha.0@ultimaker/testing" - "fdm_materials/5.10.0-alpha.0@ultimaker/testing" - - "dulcificum/0.3.0@ultimaker/stable" - - "pysavitar/5.4.0-alpha.0@ultimaker/stable" - - "pynest2d/5.4.0-alpha.0@ultimaker/stable" + - "dulcificum/5.10.0@ultimaker/stable" + - "pysavitar/5.10.0@ultimaker/stable" + - "pynest2d/5.10.0@ultimaker/stable" requirements_internal: - "fdm_materials/5.10.0-alpha.0@internal/testing" - "cura_private_data/5.10.0-alpha.0@internal/testing" From dd3e447366c91920b483a0b1fa842b7c6e725068 Mon Sep 17 00:00:00 2001 From: Frederic Meeuwissen <13856291+Frederic98@users.noreply.github.com> Date: Tue, 11 Feb 2025 15:53:22 +0100 Subject: [PATCH 5/5] [CURA-11966] Rename wall_overhang_speed_factor Missed a couple of files with the other commit. See 2db4d16a80bb0b449871399b8d236205e58c09b9 --- .../um_sketch_sprint_0.4mm_um-pla-175_0.27mm_draft.inst.cfg | 2 +- ...m_sketch_sprint_0.4mm_um-tough-pla-175_0.27mm_draft.inst.cfg | 2 +- .../um_sketch_sprint_0.4mm_um-metallic-pla-175_0.2mm.inst.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/intent/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-pla-175_0.27mm_draft.inst.cfg b/resources/intent/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-pla-175_0.27mm_draft.inst.cfg index 5204072807..de49fa0e2c 100644 --- a/resources/intent/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-pla-175_0.27mm_draft.inst.cfg +++ b/resources/intent/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-pla-175_0.27mm_draft.inst.cfg @@ -50,5 +50,5 @@ speed_wall_x_roofing = 270 support_line_width = 0.35 wall_line_width_x = 0.4 wall_overhang_angle = 25 -wall_overhang_speed_factor = 15 +wall_overhang_speed_factors = [15] diff --git a/resources/intent/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-tough-pla-175_0.27mm_draft.inst.cfg b/resources/intent/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-tough-pla-175_0.27mm_draft.inst.cfg index 546d69404d..5c7c5de0ef 100644 --- a/resources/intent/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-tough-pla-175_0.27mm_draft.inst.cfg +++ b/resources/intent/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-tough-pla-175_0.27mm_draft.inst.cfg @@ -50,5 +50,5 @@ speed_wall_x_roofing = 270 support_line_width = 0.35 wall_line_width_x = 0.4 wall_overhang_angle = 25 -wall_overhang_speed_factor = 15 +wall_overhang_speed_factors = [15] diff --git a/resources/quality/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-metallic-pla-175_0.2mm.inst.cfg b/resources/quality/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-metallic-pla-175_0.2mm.inst.cfg index dd752baffa..6cad373043 100644 --- a/resources/quality/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-metallic-pla-175_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_sketch_sprint/um_sketch_sprint_0.4mm_um-metallic-pla-175_0.2mm.inst.cfg @@ -24,5 +24,5 @@ speed_topbottom = 100 speed_wall = 75 speed_wall_x = 100 support_material_flow = 92 -wall_overhang_speed_factor = 23 +wall_overhang_speed_factors = [23]