From 51cfff89c607fbd38a230c5329064df74a035596 Mon Sep 17 00:00:00 2001 From: Ian Bassi Date: Thu, 19 Nov 2026 08:43:08 -0300 Subject: [PATCH] Stop writing the fan speed marker at layer changes Bambu Studio's cooling buffer read ;_SET_FAN_SPEED_CHANGING_LAYER to set the layer's fan speed after the layer change. Orca's cooling buffer no longer reads it, since the merge of Bambu Studio 1.7.4, so the marker was left in every file as a comment. It sent no command, so nothing else in the G-code changes. --- src/libslic3r/GCode.cpp | 3 --- tests/fff_print/test_gcode.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 4714edcc83..cce80cc42a 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -6776,9 +6776,6 @@ LayerResult GCode::process_layer( if (!m_config.layer_change_gcode.value.empty()) gcode += this->process_layer_change_gcode(print, print_z, most_used_extruder, has_wipe_tower); - //BBS: set layer time fan speed after layer change gcode - gcode += ";_SET_FAN_SPEED_CHANGING_LAYER\n"; - // Belt printers: ordinary-layer apron bands (a band whose print_z coincides with an // object/support layer, so it takes this path rather than the brim-only branch) are // NOT emitted here anymore. They used to be laid down with whatever tool happened to diff --git a/tests/fff_print/test_gcode.cpp b/tests/fff_print/test_gcode.cpp index 9f838329b3..11c685e63b 100644 --- a/tests/fff_print/test_gcode.cpp +++ b/tests/fff_print/test_gcode.cpp @@ -1083,3 +1083,11 @@ TEST_CASE("The layer count leaves out layers that print nothing", "[GCode][Regre CHECK(placeholder == layer_changes); CHECK(trailer == layer_changes); } + +TEST_CASE("Layer changes leave no fan speed marker in the G-code", "[GCode][Regression]") +{ + // Nothing reads the marker that Bambu Studio's cooling buffer took out again. + const std::string gcode = Test::slice({ Test::cube(5) }, DynamicPrintConfig::full_print_config()); + CHECK(gcode.find("_SET_FAN_SPEED_CHANGING_LAYER") == std::string::npos); +} +