From 2b381533951d361e2f51bf2354917e2ae6c2a295 Mon Sep 17 00:00:00 2001 From: SoftFever <103989404+SoftFever@users.noreply.github.com> Date: Sun, 12 Mar 2023 23:38:46 +0800 Subject: [PATCH] fix invalid characters in gcode --- src/libslic3r/GCode.cpp | 1 - src/libslic3r/GCode/GCodeProcessor.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index bc35aafc90..eb72e8a3f2 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1504,7 +1504,6 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder).c_str()); //BBS: total layer number file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Total_Layer_Number_Placeholder).c_str()); - file.write_format("; total layer number: %d\n", m_layer_count); file.write_format("; HEADER_BLOCK_END\n\n"); diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 601807fa90..60da0200cd 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -71,7 +71,8 @@ const std::vector GCodeProcessor::Reserved_Tags_compatible = { "CUSTOM_GCODE", "_GP_FIRST_LINE_M73_PLACEHOLDER", "_GP_LAST_LINE_M73_PLACEHOLDER", - "_GP_ESTIMATED_PRINTING_TIME_PLACEHOLDER" + "_GP_ESTIMATED_PRINTING_TIME_PLACEHOLDER", + "_GP_TOTAL_LAYER_NUMBER_PLACEHOLDER" };