From 48af5b5d9725281983dfcf9dc60e0e15dd754212 Mon Sep 17 00:00:00 2001 From: harrierpigeon Date: Wed, 30 Sep 2026 15:44:18 -0500 Subject: [PATCH] Read the pre-slice remap header tags at their real length The header tags lost their belt_ prefix in the Part 3.2 rename (20 characters now), but the parser still skipped 25, so every axis read as pos_x. Found in Hanif Koh's review of #14394. --- src/libslic3r/GCode/GCodeProcessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index efb4a45ed0..88ce95195f 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -4232,13 +4232,13 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers return RemapAxis::PosX; }; if (boost::starts_with(comment, " preslice_remap_x = ")) { - m_result.preslice_remap_x = parse_remap_axis(trim(std::string(comment.substr(25)))); return; + m_result.preslice_remap_x = parse_remap_axis(trim(std::string(comment.substr(20)))); return; } if (boost::starts_with(comment, " preslice_remap_y = ")) { - m_result.preslice_remap_y = parse_remap_axis(trim(std::string(comment.substr(25)))); return; + m_result.preslice_remap_y = parse_remap_axis(trim(std::string(comment.substr(20)))); return; } if (boost::starts_with(comment, " preslice_remap_z = ")) { - m_result.preslice_remap_z = parse_remap_axis(trim(std::string(comment.substr(25)))); return; + m_result.preslice_remap_z = parse_remap_axis(trim(std::string(comment.substr(20)))); return; } } // wipe start tag