From 1941fbe90be65ea6fab393bdfeed6a8bf30dbab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 14 Dec 2023 12:52:26 +0100 Subject: [PATCH 1/6] Avoid "KeyError: material_name" crash in Fedora Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/UM/Qt/ListModel.py", line 54, in data return self._items[index.row()][self._role_names[role].decode("utf-8")] ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'material_name' Downstream report: https://bugzilla.redhat.com/show_bug.cgi?id=2252195 Community: https://community.ultimaker.com/topic/44538-cura-53-crashs-at-startup/ For reasons unknown, this crash does not happen with the AppImage. Nevertheless, in 2baada8a70b15dd87948a25855e17d15b0ece58c material_name was added as a role, not material_label. Reaming the field in the sentinel extruder makes the crash go away. --- cura/Machines/Models/ExtrudersModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/ExtrudersModel.py b/cura/Machines/Models/ExtrudersModel.py index 2677894bff..f31f7c8717 100644 --- a/cura/Machines/Models/ExtrudersModel.py +++ b/cura/Machines/Models/ExtrudersModel.py @@ -227,7 +227,7 @@ class ExtrudersModel(ListModel): "material_brand": "", "color_name": "", "material_type": "", - "material_label": "" + "material_name": "" } items.append(item) if self._items != items: From 6b4ec29b41535b777f9934e1ce592aea74490aca Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 18 Jan 2024 15:51:26 +0100 Subject: [PATCH 2/6] Add setting to activate monotonic raft top layer CURA-11438 --- resources/definitions/fdmprinter.def.json | 11 +++++++++++ resources/setting_visibility/expert.cfg | 1 + 2 files changed, 12 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 31a67d0122..be44eb7bb2 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -6453,6 +6453,17 @@ "settable_per_extruder": true, "limit_to_extruder": "raft_surface_extruder_nr" }, + "raft_surface_monotonic": + { + "label": "Monotonic Raft Top Surface Order", + "description": "Print raft top surface lines in an ordering that causes them to always overlap with adjacent lines in a single direction. This takes slightly more time to print, but makes the surface look more consistent, which is also visible on the model bottom surface.", + "type": "bool", + "default_value": false, + "enabled": "resolveOrValue('adhesion_type') == 'raft' and raft_surface_layers > 0", + "settable_per_mesh": false, + "settable_per_extruder": true, + "limit_to_extruder": "raft_surface_extruder_nr" + }, "raft_wall_count": { "label": "Raft Wall Count", diff --git a/resources/setting_visibility/expert.cfg b/resources/setting_visibility/expert.cfg index 2a71993998..52c08f70ba 100644 --- a/resources/setting_visibility/expert.cfg +++ b/resources/setting_visibility/expert.cfg @@ -340,6 +340,7 @@ raft_surface_layers raft_surface_thickness raft_surface_line_width raft_surface_line_spacing +raft_surface_monotonic raft_interface_layers raft_interface_thickness raft_interface_line_width From 7afa2fc94a2d97a9d27ddc4d5c6c3dd5958e978f Mon Sep 17 00:00:00 2001 From: Sophist <3001893+Sophist-UK@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:27:30 +0000 Subject: [PATCH 3/6] Stop Esc key from exiting full screen mode --- resources/qml/Actions.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 3717e778d3..a788c443af 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -109,7 +109,8 @@ Item Action { id: exitFullScreenAction - shortcut: StandardKey.Cancel + // Stop Esc key from exiting full screen mode + // shortcut: StandardKey.Cancel text: catalog.i18nc("@action:inmenu", "Exit Full Screen") icon.name: "view-fullscreen" } From dc7e8998b43599208fa86c4432caef2eddd3aef0 Mon Sep 17 00:00:00 2001 From: Sophist <3001893+Sophist-UK@users.noreply.github.com> Date: Sat, 20 Jan 2024 09:53:39 +0000 Subject: [PATCH 4/6] Delete line rather than commenting --- resources/qml/Actions.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index a788c443af..1be715164c 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -109,8 +109,6 @@ Item Action { id: exitFullScreenAction - // Stop Esc key from exiting full screen mode - // shortcut: StandardKey.Cancel text: catalog.i18nc("@action:inmenu", "Exit Full Screen") icon.name: "view-fullscreen" } From 6bafd13eaf8f688b9358eb7f155cdf4c673cb51e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 24 Jan 2024 12:46:25 +0100 Subject: [PATCH 5/6] Set proper value for raft monotonic surface CURA-11438 --- 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 be44eb7bb2..03850a7344 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -6459,6 +6459,7 @@ "description": "Print raft top surface lines in an ordering that causes them to always overlap with adjacent lines in a single direction. This takes slightly more time to print, but makes the surface look more consistent, which is also visible on the model bottom surface.", "type": "bool", "default_value": false, + "value": "skin_monotonic", "enabled": "resolveOrValue('adhesion_type') == 'raft' and raft_surface_layers > 0", "settable_per_mesh": false, "settable_per_extruder": true, From c9449030290073aa80409cb1e9d33f8fe3db9429 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 24 Jan 2024 12:49:17 +0100 Subject: [PATCH 6/6] Fix crash after re-slicing CURA-11438 --- plugins/SimulationView/SimulationView.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index c070c69939..2573c84cb9 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -372,7 +372,10 @@ class SimulationView(CuraView): self._minimum_path_num = min(self._minimum_path_num, self._current_path_num) # update _current time when the path is changed by user if self._current_path_num < self._max_paths and round(self._current_path_num)== self._current_path_num: - self._current_time = self.cumulativeLineDuration()[int(self._current_path_num)] + actual_path_num = int(self._current_path_num) + cumulative_line_duration = self.cumulativeLineDuration() + if actual_path_num < len(cumulative_line_duration): + self._current_time = cumulative_line_duration[actual_path_num] self._startUpdateTopLayers() self.currentPathNumChanged.emit()