mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
ENH: use gcode processer to get precise layer number
Using layer z to calculate total layer number is not precision, because for some models with sharp top layer, the top layer may be empty. Check the final layer change in final gcode file. This must be same with total layer number. Jira: Studio-2123 Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: I5d001a8bb9548c3fb5f67fda966051ac3bb16502
This commit is contained in:
@@ -1482,7 +1482,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
//BBS: total estimated printing time
|
||||
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder).c_str());
|
||||
//BBS: total layer number
|
||||
file.write_format("; total layer number: %d\n", m_layer_count);
|
||||
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Total_Layer_Number_Placeholder).c_str());
|
||||
file.write_format("; HEADER_BLOCK_END\n\n");
|
||||
|
||||
//BBS: write global config at the beginning of gcode file because printer need these config information
|
||||
|
||||
Reference in New Issue
Block a user