![]() |
Prusa Slicer 2.6.0
|
#include <src/libslic3r/GCodeWriter.hpp>
Collaboration diagram for Slic3r::GCodeWriter:Public Member Functions | |
| GCodeWriter () | |
| Extruder * | extruder () |
| const Extruder * | extruder () const |
| std::string | extrusion_axis () const |
| void | apply_print_config (const PrintConfig &print_config) |
| void | set_extruders (std::vector< unsigned int > extruder_ids) |
| const std::vector< Extruder > & | extruders () const |
| std::vector< unsigned int > | extruder_ids () const |
| std::string | preamble () |
| std::string | postamble () const |
| std::string | set_temperature (unsigned int temperature, bool wait=false, int tool=-1) const |
| std::string | set_bed_temperature (unsigned int temperature, bool wait=false) |
| std::string | set_print_acceleration (unsigned int acceleration) |
| std::string | set_travel_acceleration (unsigned int acceleration) |
| std::string | reset_e (bool force=false) |
| std::string | update_progress (unsigned int num, unsigned int tot, bool allow_100=false) const |
| bool | need_toolchange (unsigned int extruder_id) const |
| std::string | set_extruder (unsigned int extruder_id) |
| std::string | toolchange_prefix () const |
| std::string | toolchange (unsigned int extruder_id) |
| std::string | set_speed (double F, const std::string &comment=std::string(), const std::string &cooling_marker=std::string()) const |
| std::string | travel_to_xy (const Vec2d &point, const std::string &comment=std::string()) |
| std::string | travel_to_xyz (const Vec3d &point, const std::string &comment=std::string()) |
| std::string | travel_to_z (double z, const std::string &comment=std::string()) |
| bool | will_move_z (double z) const |
| std::string | extrude_to_xy (const Vec2d &point, double dE, const std::string &comment=std::string()) |
| std::string | retract (bool before_wipe=false) |
| std::string | retract_for_toolchange (bool before_wipe=false) |
| std::string | unretract () |
| std::string | lift () |
| std::string | unlift () |
| Vec3d | get_position () const |
| double | get_zhop () const |
| void | update_position (const Vec3d &new_pos) |
| std::string | set_fan (unsigned int speed) const |
Static Public Member Functions | |
| static bool | supports_separate_travel_acceleration (GCodeFlavor flavor) |
| static std::string | set_fan (const GCodeFlavor gcode_flavor, bool gcode_comments, unsigned int speed) |
Public Attributes | |
| GCodeConfig | config |
| bool | multiple_extruders |
Private Types | |
| enum class | Acceleration { Travel , Print } |
Private Member Functions | |
| std::string | _travel_to_z (double z, const std::string &comment) |
| std::string | _retract (double length, double restart_extra, const std::string &comment) |
| std::string | set_acceleration_internal (Acceleration type, unsigned int acceleration) |
Private Attributes | |
| std::vector< Extruder > | m_extruders |
| std::string | m_extrusion_axis |
| bool | m_single_extruder_multi_material |
| Extruder * | m_extruder |
| unsigned int | m_last_acceleration = (unsigned int)(-1) |
| unsigned int | m_last_travel_acceleration = (unsigned int)(-1) |
| unsigned int | m_max_acceleration |
| unsigned int | m_max_travel_acceleration |
| unsigned int | m_last_bed_temperature |
| bool | m_last_bed_temperature_reached |
| double | m_lifted |
| Vec3d | m_pos = Vec3d::Zero() |
|
strongprivate |
|
inline |
|
private |
References Slic3r::area(), config, Slic3r::GCodeFormatter::emit_comment(), Slic3r::GCodeFormatter::emit_e(), Slic3r::GCodeFormatter::emit_f(), Slic3r::Extruder::filament_diameter(), FLAVOR_IS, Slic3r::gcfMachinekit, Slic3r::gcfMakerWare, Slic3r::length(), m_extruder, m_extrusion_axis, PI, Slic3r::Extruder::retract(), Slic3r::Extruder::retract_speed(), and Slic3r::GCodeFormatter::string().
Referenced by retract(), and retract_for_toolchange().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References config, Slic3r::GCodeFormatter::emit_comment(), Slic3r::GCodeFormatter::emit_f(), Slic3r::GCodeFormatter::emit_z(), m_pos, and Slic3r::GCodeFormatter::string().
Referenced by lift(), travel_to_z(), and unlift().
Here is the call graph for this function:
Here is the caller graph for this function:References config, Slic3r::EmitToGCode, Slic3r::gcfMarlinFirmware, Slic3r::gcfMarlinLegacy, Slic3r::gcfRepRapFirmware, Slic3r::get_extrusion_axis(), m_extrusion_axis, m_max_acceleration, m_max_travel_acceleration, m_single_extruder_multi_material, and supports_separate_travel_acceleration().
Referenced by Slic3r::GCode::apply_print_config().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::extrude_to_xy | ( | const Vec2d & | point, |
| double | dE, | ||
| const std::string & | comment = std::string() |
||
| ) |
References config, Slic3r::GCodeFormatter::emit_comment(), Slic3r::GCodeFormatter::emit_e(), Slic3r::GCodeFormatter::emit_xy(), Slic3r::Extruder::extrude(), m_extruder, m_extrusion_axis, m_pos, and Slic3r::GCodeFormatter::string().
Referenced by Slic3r::GCode::_extrude(), and Slic3r::Wipe::wipe().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_extruder.
Referenced by Slic3r::GCode::_do_export(), Slic3r::GCode::_extrude(), Slic3r::OozePrevention::_get_temp(), Slic3r::GCode::gcode_to_point(), Slic3r::need_wipe(), Slic3r::OozePrevention::post_toolchange(), Slic3r::OozePrevention::pre_toolchange(), Slic3r::GCode::process_layer(), Slic3r::GCode::retract(), Slic3r::GCode::set_extruder(), and Slic3r::Wipe::wipe().
Here is the caller graph for this function:References m_extruder.
|
inline |
References m_extruders.
Referenced by set_extruders().
Here is the caller graph for this function:References m_extruders.
Referenced by Slic3r::CoolingBuffer::CoolingBuffer(), Slic3r::GCode::_do_export(), Slic3r::GCode::do_export(), Slic3r::GCode::PlaceholderParserIntegration::init(), Slic3r::GCode::placeholder_parser_process(), Slic3r::GCode::process_layer(), and Slic3r::GCode::PlaceholderParserIntegration::update_from_gcodewriter().
Here is the caller graph for this function:
|
inline |
References m_extrusion_axis.
Referenced by Slic3r::GCode::_extrude().
Here is the caller graph for this function:
|
inline |
References m_pos.
Referenced by Slic3r::CoolingBuffer::CoolingBuffer(), Slic3r::GCode::_do_export(), Slic3r::WipeTowerIntegration::append_tcr(), Slic3r::WipeTowerIntegration::finalize(), and Slic3r::GCode::PlaceholderParserIntegration::update_from_gcodewriter().
Here is the caller graph for this function:
|
inline |
References m_lifted.
Referenced by Slic3r::GCode::PlaceholderParserIntegration::init(), and Slic3r::GCode::PlaceholderParserIntegration::update_from_gcodewriter().
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::lift | ( | ) |
References _travel_to_z(), config, Slic3r::Extruder::id(), m_extruder, m_lifted, and m_pos.
Referenced by Slic3r::GCode::retract().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References Slic3r::Extruder::id(), and m_extruder.
Referenced by Slic3r::WipeTowerIntegration::append_tcr(), set_extruder(), Slic3r::GCode::set_extruder(), and Slic3r::WipeTowerIntegration::tool_change().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::postamble | ( | ) | const |
References FLAVOR_IS, and Slic3r::gcfMachinekit.
Referenced by Slic3r::GCode::_do_export().
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::preamble | ( | ) |
References config, FLAVOR_IS, FLAVOR_IS_NOT, Slic3r::gcfKlipper, Slic3r::gcfMakerWare, Slic3r::gcfMarlinFirmware, Slic3r::gcfMarlinLegacy, Slic3r::gcfRepetier, Slic3r::gcfRepRapFirmware, Slic3r::gcfRepRapSprinter, Slic3r::gcfSmoothie, Slic3r::gcfTeacup, and reset_e().
Referenced by Slic3r::GCode::preamble().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::reset_e | ( | bool | force = false | ) |
References config, FLAVOR_IS, Slic3r::gcfMach3, Slic3r::gcfMakerWare, Slic3r::gcfSailfish, m_extruder, m_extrusion_axis, and Slic3r::Extruder::reset_E().
Referenced by preamble(), Slic3r::GCode::retract(), toolchange(), and unretract().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::retract | ( | bool | before_wipe = false | ) |
References _retract(), EPSILON, m_extruder, Slic3r::Extruder::retract_before_wipe(), Slic3r::Extruder::retract_length(), and Slic3r::Extruder::retract_restart_extra().
Referenced by Slic3r::WipeTowerIntegration::append_tcr(), and Slic3r::GCode::retract().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::retract_for_toolchange | ( | bool | before_wipe = false | ) |
References _retract(), EPSILON, m_extruder, Slic3r::Extruder::retract_before_wipe(), Slic3r::Extruder::retract_length_toolchange(), and Slic3r::Extruder::retract_restart_extra_toolchange().
Referenced by Slic3r::GCode::retract().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References config, FLAVOR_IS, Slic3r::gcfMarlinFirmware, Slic3r::gcfRepetier, Slic3r::gcfRepRapFirmware, m_last_acceleration, m_last_travel_acceleration, m_max_acceleration, m_max_travel_acceleration, Print, supports_separate_travel_acceleration(), and Travel.
Referenced by set_print_acceleration(), and set_travel_acceleration().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::set_bed_temperature | ( | unsigned int | temperature, |
| bool | wait = false |
||
| ) |
References comment, FLAVOR_IS, FLAVOR_IS_NOT, Slic3r::gcfMach3, Slic3r::gcfMachinekit, Slic3r::gcfMakerWare, Slic3r::gcfSailfish, Slic3r::gcfTeacup, m_last_bed_temperature, and m_last_bed_temperature_reached.
Referenced by Slic3r::GCode::_print_first_layer_bed_temperature(), and Slic3r::GCode::process_layer().
Here is the caller graph for this function:
|
inline |
References need_toolchange(), and toolchange().
Here is the call graph for this function:| void Slic3r::GCodeWriter::set_extruders | ( | std::vector< unsigned int > | extruder_ids | ) |
References config, extruder_ids(), m_extruders, and multiple_extruders.
Referenced by Slic3r::GCode::set_extruders().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
References Slic3r::gcfMach3, Slic3r::gcfMachinekit, Slic3r::gcfMakerWare, Slic3r::gcfSailfish, Slic3r::gcfTeacup, and Slic3r::gcode_flavor().
Referenced by Slic3r::GCode::_do_export(), Slic3r::CoolingBuffer::apply_layer_cooldown(), and set_fan().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::set_fan | ( | unsigned int | speed | ) | const |
|
inline |
References Print, and set_acceleration_internal().
Referenced by Slic3r::GCode::_extrude(), Slic3r::GCode::extrude_loop(), Slic3r::GCode::extrude_multi_path(), and Slic3r::GCode::extrude_path().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::set_speed | ( | double | F, |
| const std::string & | comment = std::string(), |
||
| const std::string & | cooling_marker = std::string() |
||
| ) | const |
References config, Slic3r::GCodeFormatter::emit_comment(), Slic3r::GCodeFormatter::emit_f(), Slic3r::GCodeFormatter::emit_string(), Slic3r::F, and Slic3r::GCodeFormatter::string().
Referenced by Slic3r::GCode::_extrude(), and Slic3r::Wipe::wipe().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::set_temperature | ( | unsigned int | temperature, |
| bool | wait = false, |
||
| int | tool = -1 |
||
| ) | const |
References comment, FLAVOR_IS, FLAVOR_IS_NOT, Slic3r::gcfMach3, Slic3r::gcfMachinekit, Slic3r::gcfMakerWare, Slic3r::gcfRepRapFirmware, Slic3r::gcfSailfish, Slic3r::gcfTeacup, m_single_extruder_multi_material, and multiple_extruders.
Referenced by Slic3r::GCode::_print_first_layer_extruder_temperatures(), Slic3r::OozePrevention::post_toolchange(), Slic3r::OozePrevention::pre_toolchange(), Slic3r::GCode::process_layer(), and Slic3r::GCode::set_extruder().
Here is the caller graph for this function:
|
inline |
References set_acceleration_internal(), and Travel.
Referenced by Slic3r::GCode::travel_to().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
References Slic3r::gcfMarlinFirmware, Slic3r::gcfRepetier, and Slic3r::gcfRepRapFirmware.
Referenced by Slic3r::GCodeProcessor::apply_config(), apply_print_config(), set_acceleration_internal(), and Slic3r::GCode::travel_to().
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::toolchange | ( | unsigned int | extruder_id | ) |
References config, Slic3r::lower_bound_by_predicate(), m_extruder, m_extruders, multiple_extruders, reset_e(), and toolchange_prefix().
Referenced by set_extruder(), and Slic3r::GCode::set_extruder().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::toolchange_prefix | ( | ) | const |
References FLAVOR_IS, Slic3r::gcfMakerWare, and Slic3r::gcfSailfish.
Referenced by Slic3r::GCode::set_extruder(), and toolchange().
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::travel_to_xy | ( | const Vec2d & | point, |
| const std::string & | comment = std::string() |
||
| ) |
References config, Slic3r::GCodeFormatter::emit_comment(), Slic3r::GCodeFormatter::emit_f(), Slic3r::GCodeFormatter::emit_xy(), m_pos, and Slic3r::GCodeFormatter::string().
Referenced by Slic3r::WipeTowerIntegration::append_tcr(), Slic3r::GCode::extrude_loop(), Slic3r::GCode::travel_to(), and travel_to_xyz().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::travel_to_xyz | ( | const Vec3d & | point, |
| const std::string & | comment = std::string() |
||
| ) |
References config, Slic3r::GCodeFormatter::emit_comment(), Slic3r::GCodeFormatter::emit_f(), Slic3r::GCodeFormatter::emit_xyz(), EPSILON, m_lifted, m_pos, Slic3r::GCodeFormatter::string(), Slic3r::to_2d(), travel_to_xy(), and will_move_z().
Here is the call graph for this function:| std::string Slic3r::GCodeWriter::travel_to_z | ( | double | z, |
| const std::string & | comment = std::string() |
||
| ) |
References _travel_to_z(), comment, EPSILON, m_lifted, m_pos, and will_move_z().
Referenced by Slic3r::GCode::_do_export(), Slic3r::WipeTowerIntegration::append_tcr(), Slic3r::GCode::change_layer(), and Slic3r::GCode::preamble().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::unlift | ( | ) |
References _travel_to_z(), m_lifted, and m_pos.
Referenced by Slic3r::WipeTowerIntegration::append_tcr(), and Slic3r::GCode::unretract().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::unretract | ( | ) |
References config, Slic3r::Extruder::deretract_speed(), Slic3r::GCodeFormatter::emit_comment(), Slic3r::GCodeFormatter::emit_e(), Slic3r::GCodeFormatter::emit_f(), FLAVOR_IS, Slic3r::gcfMachinekit, Slic3r::gcfMakerWare, m_extruder, m_extrusion_axis, reset_e(), Slic3r::GCodeFormatter::string(), and Slic3r::Extruder::unretract().
Referenced by Slic3r::WipeTowerIntegration::append_tcr(), Slic3r::ProcessLayer::emit_custom_gcode_per_print_z(), and Slic3r::GCode::unretract().
Here is the call graph for this function:
Here is the caller graph for this function:References EPSILON, m_lifted, and m_pos.
Referenced by Slic3r::GCode::placeholder_parser_process().
Here is the caller graph for this function:| std::string Slic3r::GCodeWriter::update_progress | ( | unsigned int | num, |
| unsigned int | tot, | ||
| bool | allow_100 = false |
||
| ) | const |
References config, FLAVOR_IS_NOT, floor(), Slic3r::gcfMakerWare, and Slic3r::gcfSailfish.
Referenced by Slic3r::GCode::_do_export(), and Slic3r::GCode::change_layer().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::GCodeWriter::will_move_z | ( | double | z | ) | const |
References m_lifted, and m_pos.
Referenced by Slic3r::GCode::change_layer(), travel_to_xyz(), and travel_to_z().
Here is the caller graph for this function:| GCodeConfig Slic3r::GCodeWriter::config |
Referenced by _retract(), _travel_to_z(), apply_print_config(), extrude_to_xy(), Slic3r::GCode::PlaceholderParserIntegration::init(), lift(), Slic3r::GCode::placeholder_parser_process(), preamble(), reset_e(), set_acceleration_internal(), set_extruders(), set_fan(), set_speed(), toolchange(), travel_to_xy(), travel_to_xyz(), unretract(), Slic3r::GCode::PlaceholderParserIntegration::update_from_gcodewriter(), update_progress(), and Slic3r::Wipe::wipe().
|
private |
Referenced by _retract(), extrude_to_xy(), extruder(), extruder(), lift(), need_toolchange(), reset_e(), retract(), retract_for_toolchange(), toolchange(), and unretract().
|
private |
Referenced by extruder_ids(), extruders(), set_extruders(), and toolchange().
|
private |
Referenced by _retract(), apply_print_config(), extrude_to_xy(), extrusion_axis(), reset_e(), and unretract().
|
private |
Referenced by set_acceleration_internal().
|
private |
Referenced by set_bed_temperature().
|
private |
Referenced by set_bed_temperature().
|
private |
Referenced by set_acceleration_internal().
|
private |
Referenced by get_zhop(), lift(), travel_to_xyz(), travel_to_z(), unlift(), update_position(), and will_move_z().
|
private |
Referenced by apply_print_config(), and set_acceleration_internal().
|
private |
Referenced by apply_print_config(), and set_acceleration_internal().
|
private |
Referenced by _travel_to_z(), extrude_to_xy(), get_position(), lift(), travel_to_xy(), travel_to_xyz(), travel_to_z(), unlift(), update_position(), and will_move_z().
|
private |
Referenced by apply_print_config(), and set_temperature().
| bool Slic3r::GCodeWriter::multiple_extruders |
Referenced by Slic3r::GCode::set_extruder(), set_extruders(), set_temperature(), and toolchange().