FIX: The print_z of some layers is incorrect after slicing

jira: STUDIO-11989
Change-Id: Ia0488d8270a7880d3f019d757cde7ce2f591713d
This commit is contained in:
zhimin.zeng 2025-05-22 17:25:25 +08:00 committed by lane.wei
parent 4a15a6da6c
commit 9bd47ef3e5

View File

@ -2771,7 +2771,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))