#include </home/runner/work/OrcaSlicer/OrcaSlicer/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) |
| const GCodeConfig & | 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 |
| float & | i () |
| float | i () const |
| float & | j () |
| float | j () const |
| GCodeConfig | get_config () 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) |
| static const GCodeConfig & | default_config () |
Private Attributes | |
| std::shared_ptr< const GCodeConfig > | m_config |
| bool | m_use_relative_e_distances { default_config().use_relative_e_distances.value } |
| 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 |
References m_verbose, and reset().
Referenced by parse_buffer().
| void Slic3r::GCodeReader::apply_config | ( | const DynamicPrintConfig & | config | ) |
References config(), default_config(), m_config, and m_use_relative_e_distances.
| void Slic3r::GCodeReader::apply_config | ( | const GCodeConfig & | config | ) |
References config(), Slic3r::GCodeConfig, m_config, and m_use_relative_e_distances.
|
staticprivate |
References is_end_of_gcode_line(), skip_whitespaces(), and skip_word().
Referenced by Slic3r::GCodeReader::GCodeLine::axis_pos().
|
inline |
References default_config(), Slic3r::GCodeConfig, and m_config.
Referenced by apply_config(), apply_config(), and default_config().
|
staticprivate |
References config(), and Slic3r::GCodeConfig.
Referenced by apply_config(), config(), and get_config().
|
inline |
References Slic3r::E, and m_position.
Referenced by Slic3r::FanMover::_process_gcode_line(), Slic3r::GCodeReader::GCodeLine::dist_E(), and Slic3r::GCodeReader::GCodeLine::new_E().
|
inline |
References Slic3r::E, and m_position.
|
inline |
References Slic3r::F, and m_position.
Referenced by Slic3r::GCodeReader::GCodeLine::new_F().
|
inline |
References Slic3r::F, and m_position.
|
inline |
References default_config(), Slic3r::GCodeConfig, and m_config.
|
inline |
References Slic3r::I, and m_position.
Referenced by update_coordinates().
|
inline |
References Slic3r::I, and m_position.
|
inlinestaticprivate |
References is_end_of_line().
Referenced by axis_pos(), Slic3r::GCodeReader::GCodeLine::has(), Slic3r::GCodeReader::GCodeLine::has_value(), is_end_of_word(), and parse_line_internal().
|
inlinestaticprivate |
Referenced by is_end_of_gcode_line(), and parse_line_internal().
|
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().
|
inlinestaticprivate |
Referenced by is_end_of_word(), and skip_whitespaces().
|
inline |
References Slic3r::J, and m_position.
|
inline |
References Slic3r::J, and m_position.
|
inline |
References GCodeReader(), and parse_buffer().
|
inline |
References m_parsing, parse_line(), and Slic3r::GCodeReader::GCodeLine::reset().
Referenced by Slic3r::GCodeProcessor::contains_reserved_tag(), Slic3r::GCodeProcessor::contains_reserved_tags(), Slic3r::custom_gcode_motion_state_changes(), Slic3r::anonymous_namespace{GCode.cpp}::emitted_xy_after_gcode(), parse_buffer(), and Slic3r::SpiralVase::process_layer().
| bool Slic3r::GCodeReader::parse_file | ( | const std::string & | file, |
| callback_t | callback ) |
References parse_file_internal().
| bool Slic3r::GCodeReader::parse_file | ( | const std::string & | file, |
| callback_t | callback, | ||
| std::vector< size_t > & | lines_ends ) |
References parse_file_internal().
|
private |
References parse_file_raw_internal(), parse_line(), Slic3r::GCodeReader::GCodeLine::reset(), skip_whitespaces(), and skip_word().
Referenced by parse_file(), and parse_file().
| bool Slic3r::GCodeReader::parse_file_raw | ( | const std::string & | file, |
| raw_line_callback_t | callback ) |
References parse_file_raw_internal().
|
private |
References Slic3r::FilePtr::f, and m_parsing.
Referenced by parse_file_internal(), and parse_file_raw().
|
inline |
References parse_line_internal(), and update_coordinates().
Referenced by parse_buffer(), parse_file_internal(), parse_line(), Slic3r::GCodeProcessor::process_G28(), Slic3r::GCodeProcessor::process_gcode_line(), and Slic3r::GCodeProcessor::run_post_process().
|
inline |
References parse_line().
|
private |
References Slic3r::E, Slic3r::F, Slic3r::GCodeReader::GCodeLine::has(), Slic3r::I, Slic3r::is_decimal_separator_point(), is_end_of_gcode_line(), is_end_of_line(), is_end_of_word(), Slic3r::J, Slic3r::GCodeReader::GCodeLine::m_axis, Slic3r::GCodeReader::GCodeLine::m_mask, m_position, Slic3r::GCodeReader::GCodeLine::m_raw, m_use_relative_e_distances, m_verbose, Slic3r::NUM_AXES_WITH_UNKNOWN, Slic3r::P, skip_whitespaces(), skip_word(), Slic3r::UNKNOWN_AXIS, Slic3r::X, Slic3r::Y, and Slic3r::Z.
Referenced by parse_line().
|
inline |
References m_parsing.
Referenced by Slic3r::GCodeProcessor::apply_config_simplify3d(), Slic3r::GCodeProcessor::contains_reserved_tag(), Slic3r::GCodeProcessor::contains_reserved_tags(), and Slic3r::custom_gcode_motion_state_changes().
|
inline |
|
inlinestaticprivate |
References is_whitespace().
Referenced by axis_pos(), Slic3r::GCodeReader::GCodeLine::cmd(), Slic3r::GCodeReader::GCodeLine::cmd_is(), Slic3r::GCodeReader::GCodeLine::cmd_starts_with(), Slic3r::GCodeReader::GCodeLine::has(), Slic3r::GCodeReader::GCodeLine::has_value(), parse_file_internal(), and parse_line_internal().
|
inlinestaticprivate |
References is_end_of_word().
Referenced by axis_pos(), Slic3r::GCodeReader::GCodeLine::cmd(), Slic3r::GCodeReader::GCodeLine::has(), Slic3r::GCodeReader::GCodeLine::has_value(), parse_file_internal(), and parse_line_internal().
|
private |
References Slic3r::GCodeReader::GCodeLine::has(), i(), m_position, Slic3r::NUM_AXES, and Slic3r::GCodeReader::GCodeLine::value().
Referenced by parse_line().
|
inline |
References m_position, and Slic3r::X.
Referenced by Slic3r::FanMover::_process_gcode_line(), Slic3r::GCodeReader::GCodeLine::dist_X(), Slic3r::GCodeReader::GCodeLine::dist_XY(), and Slic3r::GCodeReader::GCodeLine::new_X().
|
inline |
References m_position, and Slic3r::X.
|
inline |
References m_position, and Slic3r::Y.
Referenced by Slic3r::FanMover::_process_gcode_line(), Slic3r::GCodeReader::GCodeLine::dist_XY(), Slic3r::GCodeReader::GCodeLine::dist_Y(), and Slic3r::GCodeReader::GCodeLine::new_Y().
|
inline |
References m_position, and Slic3r::Y.
|
inline |
References m_position, and Slic3r::Z.
Referenced by Slic3r::FanMover::_process_gcode_line(), Slic3r::GCodeReader::GCodeLine::dist_Z(), and Slic3r::GCodeReader::GCodeLine::new_Z().
|
inline |
References m_position, and Slic3r::Z.
|
private |
Referenced by apply_config(), apply_config(), config(), and get_config().
|
private |
Referenced by parse_buffer(), parse_file_raw_internal(), and quit_parsing().
|
private |
|
private |
Referenced by apply_config(), apply_config(), and parse_line_internal().
|
private |
Referenced by GCodeReader(), and parse_line_internal().