Fix of #1812 (GCode Anayzer take in account extruder offsets for multiextruder printers)

This commit is contained in:
Enrico Turri 2019-03-06 10:22:10 +01:00
parent de23725a1e
commit 219ea04c23
4 changed files with 12 additions and 33 deletions

View file

@ -86,6 +86,7 @@ public:
typedef std::vector<GCodeMove> GCodeMovesList;
typedef std::map<GCodeMove::EType, GCodeMovesList> TypeToMovesMap;
typedef std::map<unsigned int, Vec2d> ExtruderOffsetsMap;
private:
struct State
@ -104,9 +105,7 @@ private:
State m_state;
GCodeReader m_parser;
TypeToMovesMap m_moves_map;
#if ENABLE_ANALYZER_EXTRUDER_OFFSET
std::vector<Vec2d> m_extruder_offsets;
#endif // ENABLE_ANALYZER_EXTRUDER_OFFSET
ExtruderOffsetsMap m_extruder_offsets;
// The output of process_layer()
std::string m_process_output;
@ -114,9 +113,7 @@ private:
public:
GCodeAnalyzer();
#if ENABLE_ANALYZER_EXTRUDER_OFFSET
void set_extruder_offsets(const std::vector<Vec2d>& extruder_offsets);
#endif // ENABLE_ANALYZER_EXTRUDER_OFFSET
void set_extruder_offsets(const ExtruderOffsetsMap& extruder_offsets);
// Reinitialize the analyzer
void reset();