mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 09:11:23 -06:00
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:
parent
cc70c8dff9
commit
2ee572bd31
3 changed files with 48 additions and 2 deletions
|
|
@ -106,6 +106,7 @@ private:
|
|||
GCodeReader m_parser;
|
||||
TypeToMovesMap m_moves_map;
|
||||
ExtruderOffsetsMap m_extruder_offsets;
|
||||
GCodeFlavor m_gcode_flavor;
|
||||
|
||||
// The output of process_layer()
|
||||
std::string m_process_output;
|
||||
|
|
@ -115,6 +116,8 @@ public:
|
|||
|
||||
void set_extruder_offsets(const ExtruderOffsetsMap& extruder_offsets);
|
||||
|
||||
void set_gcode_flavor(const GCodeFlavor& flavor);
|
||||
|
||||
// Reinitialize the analyzer
|
||||
void reset();
|
||||
|
||||
|
|
@ -164,10 +167,14 @@ private:
|
|||
// Set extruder to relative mode
|
||||
void _processM83(const GCodeReader::GCodeLine& line);
|
||||
|
||||
// Set tool (MakerWare and Sailfish flavor)
|
||||
void _processM108orM135(const GCodeReader::GCodeLine& line);
|
||||
|
||||
// Set color change
|
||||
void _processM600(const GCodeReader::GCodeLine& line);
|
||||
|
||||
// Processes T line (Select Tool)
|
||||
void _processT(const std::string& command);
|
||||
void _processT(const GCodeReader::GCodeLine& line);
|
||||
|
||||
// Processes the tags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue