diff --git a/src/test/libslic3r/test_printgcode.cpp b/src/test/libslic3r/test_printgcode.cpp index ee669d01a..34c529ed6 100644 --- a/src/test/libslic3r/test_printgcode.cpp +++ b/src/test/libslic3r/test_printgcode.cpp @@ -45,6 +45,9 @@ SCENARIO( "PrintGCode basic functionality") { REQUIRE(exported.find("; support material extrusion width") == std::string::npos); REQUIRE(exported.find("; first layer extrusion width") == std::string::npos); } + THEN("Exported text does not contain cooling markers (they were consumed)") { + REQUIRE(exported.find(";_EXTRUDE_SET_SPEED") == std::string::npos); + } THEN("GCode preamble is emitted.") { REQUIRE(exported.find("G21 ; set units to millimeters") != std::string::npos); diff --git a/xs/src/libslic3r/PrintGCode.cpp b/xs/src/libslic3r/PrintGCode.cpp index 3fc7f0127..72f3ff03c 100644 --- a/xs/src/libslic3r/PrintGCode.cpp +++ b/xs/src/libslic3r/PrintGCode.cpp @@ -659,6 +659,8 @@ PrintGCode::process_layer(size_t idx, const Layer* layer, const Points& copies) copy_idx++; } // write the resulting gcode + gcode = this->_cooling_buffer.append(gcode, std::to_string(reinterpret_cast(layer->object())) + std::string(typeid(layer).name()), + layer->id(), layer->print_z); fh << this->filter(gcode); }