![]() |
Prusa Slicer 2.6.0
|
#include <src/libslic3r/GCodeReader.hpp>
Classes | |
| class | GCodeLine |
Public Types | |
| typedef std::function< void(GCodeReader &, const GCodeLine &)> | callback_t |
| typedef std::function< void(GCodeReader &, const char *, const char *)> | raw_line_callback_t |
Public Member Functions | |
| GCodeReader () | |
| void | reset () |
| void | apply_config (const GCodeConfig &config) |
| void | apply_config (const DynamicPrintConfig &config) |
| template<typename Callback > | |
| void | parse_buffer (const std::string &buffer, Callback callback) |
| void | parse_buffer (const std::string &buffer) |
| template<typename Callback > | |
| const char * | parse_line (const char *ptr, const char *end, GCodeLine &gline, Callback &callback) |
| template<typename Callback > | |
| void | parse_line (const std::string &line, Callback callback) |
| bool | parse_file (const std::string &file, callback_t callback) |
| bool | parse_file (const std::string &file, callback_t callback, std::vector< size_t > &lines_ends) |
| bool | parse_file_raw (const std::string &file, raw_line_callback_t callback) |
| void | quit_parsing () |
| float & | x () |
| float | x () const |
| float & | y () |
| float | y () const |
| float & | z () |
| float | z () const |
| float & | e () |
| float | e () const |
| float & | f () |
| float | f () const |
| Point | xy_scaled () const |
| char | extrusion_axis () const |
Private Member Functions | |
| template<typename ParseLineCallback , typename LineEndCallback > | |
| bool | parse_file_raw_internal (const std::string &filename, ParseLineCallback parse_line_callback, LineEndCallback line_end_callback) |
| template<typename ParseLineCallback , typename LineEndCallback > | |
| bool | parse_file_internal (const std::string &filename, ParseLineCallback parse_line_callback, LineEndCallback line_end_callback) |
| const char * | parse_line_internal (const char *ptr, const char *end, GCodeLine &gline, std::pair< const char *, const char * > &command) |
| void | update_coordinates (GCodeLine &gline, std::pair< const char *, const char * > &command) |
Static Private Member Functions | |
| static bool | is_whitespace (char c) |
| static bool | is_end_of_line (char c) |
| static bool | is_end_of_gcode_line (char c) |
| static bool | is_end_of_word (char c) |
| static const char * | skip_whitespaces (const char *c) |
| static const char * | skip_word (const char *c) |
| static const char * | axis_pos (const char *raw_str, char axis) |
Private Attributes | |
| GCodeConfig | m_config |
| char | m_extrusion_axis |
| float | m_position [NUM_AXES] |
| bool | m_verbose |
| bool | m_parsing { false } |
| typedef std::function<void(GCodeReader&, const GCodeLine&)> Slic3r::GCodeReader::callback_t |
| typedef std::function<void(GCodeReader&, const char*, const char*)> Slic3r::GCodeReader::raw_line_callback_t |
|
inline |
| void Slic3r::GCodeReader::apply_config | ( | const DynamicPrintConfig & | config | ) |
References Slic3r::get_extrusion_axis_char(), m_config, and m_extrusion_axis.
Here is the call graph for this function:References Slic3r::get_extrusion_axis_char(), m_config, and m_extrusion_axis.
Referenced by Slic3r::SpiralVase::SpiralVase(), Slic3r::GCodeProcessor::apply_config(), and Slic3r::GCodeProcessor::apply_config().
Here is the call graph for this function:
Here is the caller graph for this function:References is_end_of_gcode_line(), skip_whitespaces(), and skip_word().
Referenced by Slic3r::GCodeReader::GCodeLine::has(), Slic3r::GCodeReader::GCodeLine::has_value(), and Slic3r::GCodeReader::GCodeLine::has_value().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References Slic3r::E, and m_position.
Referenced by Slic3r::GCodeReader::GCodeLine::dist_E(), and Slic3r::GCodeReader::GCodeLine::new_E().
Here is the caller graph for this function:
|
inline |
References Slic3r::E, and m_position.
|
inline |
References m_extrusion_axis.
Referenced by Slic3r::GCodeReader::GCodeLine::set().
Here is the caller graph for this function:
|
inline |
References Slic3r::F, and m_position.
Referenced by Slic3r::GCodeReader::GCodeLine::new_F().
Here is the caller graph for this function:
|
inline |
References Slic3r::F, and m_position.
|
inlinestaticprivate |
References is_end_of_line().
Referenced by axis_pos(), is_end_of_word(), and parse_line_internal().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
Referenced by is_end_of_gcode_line(), and parse_line_internal().
Here is the caller graph for this function:
|
inlinestaticprivate |
References is_end_of_gcode_line(), and is_whitespace().
Referenced by Slic3r::GCodeReader::GCodeLine::cmd_is(), Slic3r::GCodeReader::GCodeLine::has_value(), Slic3r::GCodeReader::GCodeLine::has_value(), parse_line_internal(), and skip_word().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
References parse_buffer().
Here is the call graph for this function:
|
inline |
References m_parsing, parse_line(), and Slic3r::GCodeReader::GCodeLine::reset().
Referenced by Slic3r::GCodeProcessor::contains_reserved_tag(), Slic3r::GCodeProcessor::contains_reserved_tags(), parse_buffer(), Slic3r::GCodeProcessor::process_buffer(), and Slic3r::SpiralVase::process_layer().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::GCodeReader::parse_file | ( | const std::string & | file, |
| callback_t | callback | ||
| ) |
References parse_file_internal().
Referenced by Slic3r::GCodeProcessor::process_file().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::GCodeReader::parse_file | ( | const std::string & | file, |
| callback_t | callback, | ||
| std::vector< size_t > & | lines_ends | ||
| ) |
References parse_file_internal().
Here is the call graph for this function:
|
private |
References parse_file_raw_internal(), parse_line(), and Slic3r::GCodeReader::GCodeLine::reset().
Referenced by parse_file(), and parse_file().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::GCodeReader::parse_file_raw | ( | const std::string & | file, |
| raw_line_callback_t | callback | ||
| ) |
References parse_file_raw_internal().
Referenced by Slic3r::GCodeProcessor::apply_config_kissslicer(), Slic3r::GCodeProcessor::apply_config_simplify3d(), and Slic3r::GCodeProcessor::process_file().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References m_parsing.
Referenced by parse_file_internal(), and parse_file_raw().
Here is the caller graph for this function:
|
inline |
References cmd, parse_line_internal(), and update_coordinates().
Referenced by parse_buffer(), parse_file_internal(), parse_line(), Slic3r::GCodeProcessor::post_process(), and Slic3r::GCodeProcessor::process_G28().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References parse_line().
Here is the call graph for this function:
|
private |
References Slic3r::E, Slic3r::F, fast_float::from_chars(), Slic3r::GCodeReader::GCodeLine::has(), Slic3r::is_decimal_separator_point(), is_end_of_gcode_line(), is_end_of_line(), is_end_of_word(), Slic3r::GCodeReader::GCodeLine::m_axis, m_config, m_extrusion_axis, Slic3r::GCodeReader::GCodeLine::m_mask, m_position, Slic3r::GCodeReader::GCodeLine::m_raw, m_verbose, Slic3r::NUM_AXES_WITH_UNKNOWN, skip_whitespaces(), skip_word(), Slic3r::UNKNOWN_AXIS, Slic3r::X, Slic3r::Y, and Slic3r::Z.
Referenced by parse_line().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_parsing.
Referenced by Slic3r::GCodeProcessor::apply_config_kissslicer(), Slic3r::GCodeProcessor::apply_config_simplify3d(), and Slic3r::GCodeProcessor::process_file().
Here is the caller graph for this function:
|
inline |
References m_position.
Referenced by GCodeReader(), Slic3r::GCodeProcessor::apply_config_kissslicer(), and Slic3r::GCodeProcessor::process_file().
Here is the caller graph for this function:References is_whitespace().
Referenced by axis_pos(), Slic3r::GCodeReader::GCodeLine::cmd(), Slic3r::GCodeReader::GCodeLine::cmd_is(), Slic3r::GCodeReader::GCodeLine::cmd_starts_with(), and parse_line_internal().
Here is the call graph for this function:
Here is the caller graph for this function:References is_end_of_word().
Referenced by axis_pos(), Slic3r::GCodeReader::GCodeLine::cmd(), and parse_line_internal().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References Slic3r::GCodeReader::GCodeLine::has(), m_position, Slic3r::NUM_AXES, and Slic3r::GCodeReader::GCodeLine::value().
Referenced by parse_line().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_position, and Slic3r::X.
Referenced by Slic3r::GCodeReader::GCodeLine::dist_X(), Slic3r::GCodeReader::GCodeLine::dist_XY(), Slic3r::GCodeReader::GCodeLine::new_X(), and xy_scaled().
Here is the caller graph for this function:
|
inline |
References m_position, and Slic3r::X.
|
inline |
Here is the call graph for this function:
|
inline |
References m_position, and Slic3r::Y.
Referenced by Slic3r::GCodeReader::GCodeLine::dist_XY(), Slic3r::GCodeReader::GCodeLine::dist_Y(), Slic3r::GCodeReader::GCodeLine::new_Y(), and xy_scaled().
Here is the caller graph for this function:
|
inline |
References m_position, and Slic3r::Y.
|
inline |
References m_position, and Slic3r::Z.
Referenced by Slic3r::SpiralVase::SpiralVase(), Slic3r::GCodeReader::GCodeLine::dist_Z(), and Slic3r::GCodeReader::GCodeLine::new_Z().
Here is the caller graph for this function:
|
inline |
References m_position, and Slic3r::Z.
|
private |
Referenced by apply_config(), apply_config(), and parse_line_internal().
|
private |
Referenced by apply_config(), apply_config(), extrusion_axis(), and parse_line_internal().
|
private |
Referenced by parse_buffer(), parse_file_raw_internal(), and quit_parsing().
|
private |
|
private |
Referenced by parse_line_internal().