From 43deebfdad7dbf72489102baf2f12d512a7bc787 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 9 Oct 2024 13:39:26 +0200 Subject: [PATCH 1/2] Start switch cooling before switching extruders CURA-12200 --- src/LayerPlan.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 8f6c12317c..c49b0c5317 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -2294,6 +2294,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) extruder_nr = extruder_plan.extruder_nr_; gcode.ResetLastEValueAfterWipe(prev_extruder); + gcode.writePrepareFansForNozzleSwitch(); const RetractionAndWipeConfig& prev_retraction_config = storage_.retraction_wipe_config_per_extruder[prev_extruder]; if (prev_retraction_config.retraction_hop_after_extruder_switch) @@ -2306,8 +2307,6 @@ void LayerPlan::writeGCode(GCodeExport& gcode) gcode.switchExtruder(extruder_nr, prev_retraction_config.extruder_switch_retraction_config); } - gcode.writePrepareFansForNozzleSwitch(); - { // require printing temperature to be met constexpr bool wait = true; gcode.writeTemperatureCommand(extruder_nr, extruder_plan.required_start_temperature_, wait); @@ -2382,7 +2381,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) for (const auto& reversed_chunk : paths | ranges::views::enumerate | ranges::views::reverse | ranges::views::chunk_by( - [](const auto&path_a, const auto&path_b) + [](const auto& path_a, const auto& path_b) { return (! std::get<1>(path_a).isTravelPath()) || std::get<1>(path_b).isTravelPath(); })) From a1f65ab8a2a1053b07304004cd0dee9bf26a628f Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Wed, 9 Oct 2024 11:40:18 +0000 Subject: [PATCH 2/2] Applied clang-format. --- src/LayerPlan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index c49b0c5317..705c557c2b 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -2381,7 +2381,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) for (const auto& reversed_chunk : paths | ranges::views::enumerate | ranges::views::reverse | ranges::views::chunk_by( - [](const auto& path_a, const auto& path_b) + [](const auto&path_a, const auto&path_b) { return (! std::get<1>(path_a).isTravelPath()) || std::get<1>(path_b).isTravelPath(); }))