FIX: last layer height error on gcodeviewer
Jira: STUDIO-8627 On scarf seam mode or spiral vase mode if the last layer is empty,layer height would be wrong need to move extra data, and update layer range Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I802ec266f4cebc8079fac2444061f362fd620381 (cherry picked from commit 7311dda480cb0deb1feba8ed2b29c36113a93a16)
This commit is contained in:
parent
4655ec449b
commit
dee9538ee4
|
@ -1190,6 +1190,16 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu
|
|||
|
||||
BOOST_LOG_TRIVIAL(debug) << "Start processing gcode, " << log_memory_info();
|
||||
// Post-process the G-code to update time stamps.
|
||||
// BBS: FIX: layers count error, while the last layer extrude is empty
|
||||
// spiral_vase_layer can't get right height
|
||||
while (!m_processor.result().spiral_vase_layers.empty()) {
|
||||
if (m_processor.result().spiral_vase_layers.back().first != FLT_MAX)
|
||||
break;
|
||||
//record last move, update prev layer move range
|
||||
int last_move = m_processor.result().spiral_vase_layers.back().second.second;
|
||||
m_processor.result().spiral_vase_layers.pop_back();
|
||||
m_processor.result().spiral_vase_layers.back().second.second = last_move;
|
||||
}
|
||||
|
||||
m_timelapse_warning_code = 0;
|
||||
if (m_config.printer_structure.value == PrinterStructure::psI3 && m_spiral_vase) {
|
||||
|
|
Loading…
Reference in New Issue