From fa8280f0652ae30cffec29cfb2ec0e78e426fa6e Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Thu, 22 May 2025 17:25:25 +0800 Subject: [PATCH] FIX: The print_z of some layers is incorrect after slicing jira: STUDIO-11989 Change-Id: Ia0488d8270a7880d3f019d757cde7ce2f591713d (cherry picked from commit 9bd47ef3e59b5518cd049182890c1d557c69b710) --- src/libslic3r/GCode/GCodeProcessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 6de15d8477..a0eec8817c 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -2754,7 +2754,7 @@ bool GCodeProcessor::get_last_z_from_gcode(const std::string& gcode_str, double& line_str.erase(line_str.find_last_not_of(" ") + 1); //command which may have z movement - if (line_str.size() > 5 && (line_str.find("G0 ") == 0 + if (line_str.size() > 4 && (line_str.find("G0 ") == 0 || line_str.find("G1 ") == 0 || line_str.find("G2 ") == 0 || line_str.find("G3 ") == 0))