From 7e68efb3f7a1872b29916b7f5bee871ff1ce4835 Mon Sep 17 00:00:00 2001 From: remi durand Date: Sat, 23 Jan 2021 17:58:48 +0100 Subject: [PATCH] #855 standby temp for reprap moved after header, at their correct place. --- src/libslic3r/GCode.cpp | 6 +++--- src/libslic3r/GCode.hpp | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 985175194..eda2eebab 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1015,7 +1015,7 @@ std::vector sort_object_instances_by_model_order(const Pri // set standby temp for extruders // Parse the custom G-code, try to find T, and add it if not present -static void init_multiextruders(FILE *file, Print &print, GCodeWriter & writer, ToolOrdering &tool_ordering, const std::string &custom_gcode ) +void GCode::_init_multiextruders(FILE *file, Print &print, GCodeWriter & writer, ToolOrdering &tool_ordering, const std::string &custom_gcode ) { //set standby temp for reprap @@ -1025,7 +1025,7 @@ static void init_multiextruders(FILE *file, Print &print, GCodeWriter & writer, if (standby_temp > 0) { if (print.config().ooze_prevention.value) standby_temp += print.config().standby_temperature_delta.value; - fprintf(file, "G10 P%d R%d ; sets the standby temperature\n", + _write_format(file, "G10 P%d R%d ; sets the standby temperature\n", tool_id, standby_temp); } @@ -1321,7 +1321,7 @@ void GCode::_do_export(Print& print, FILE* file, ThumbnailsGeneratorCallback thu this->_print_first_layer_bed_temperature(file, print, start_gcode, initial_extruder_id, false); //init extruders - init_multiextruders(file, print, m_writer, tool_ordering, start_gcode); + this->_init_multiextruders(file, print, m_writer, tool_ordering, start_gcode); // Set extruder(s) temperature before and after start G-code. if (this->config().gcode_flavor != gcfKlipper || print.config().start_gcode.value.empty()) diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index 9a9370263..f906d56d5 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -200,6 +200,8 @@ public: private: void _do_export(Print &print, FILE *file, ThumbnailsGeneratorCallback thumbnail_cb); + void _init_multiextruders(FILE* file, Print& print, GCodeWriter& writer, ToolOrdering& tool_ordering, const std::string& custom_gcode); + static std::vector collect_layers_to_print(const PrintObject &object); static std::vector>> collect_layers_to_print(const Print &print); void process_layer(