From 6b4ec29b41535b777f9934e1ce592aea74490aca Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 18 Jan 2024 15:51:26 +0100 Subject: [PATCH 1/3] 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 31a67d01221..be44eb7bb29 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 2a71993998f..52c08f70ba2 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 6bafd13eaf8f688b9358eb7f155cdf4c673cb51e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 24 Jan 2024 12:46:25 +0100 Subject: [PATCH 2/3] 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 be44eb7bb29..03850a7344e 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 3/3] 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 c070c699394..2573c84cb9e 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -372,7 +372,10 @@ def setPath(self, value: float) -> None: 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()