GCodeAnalyzer now recognizes tool-changing commands with MakerWare and Sailfish flavor

These firmwares use M135 Tn and M108 Tn commands for changing active tool, which the analyzer did not recognize. The toolpaths were then rendered in wrong color, extruder offset etc. This surfaced in issue https://github.com/prusa3d/PrusaSlicer/issues/2566
This commit is contained in:
Lukas Matena
2019-07-12 12:38:00 +02:00
parent 2f43e228f3
commit 4f922fc49c
3 changed files with 48 additions and 2 deletions

View File

@@ -586,6 +586,9 @@ void GCode::_do_export(Print &print, FILE *file)
}
m_analyzer.set_extruder_offsets(extruder_offsets);
// tell analyzer about the gcode flavor
m_analyzer.set_gcode_flavor(print.config().gcode_flavor);
// resets analyzer's tracking data
m_last_mm3_per_mm = GCodeAnalyzer::Default_mm3_per_mm;
m_last_width = GCodeAnalyzer::Default_Width;