mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-30 18:02:02 +08:00
parent
17af6c95d5
commit
e67181d2d4
@ -3876,6 +3876,9 @@ std::string GCode::_after_extrude(const ExtrusionPath &path) {
|
||||
else
|
||||
gcode += ";_EXTRUDE_END\n";
|
||||
|
||||
if (path.role() != ExtrusionRole::erGapFill ) {
|
||||
m_last_notgapfill_extrusion_role = path.role();
|
||||
}
|
||||
|
||||
this->set_last_pos(path.last_point());
|
||||
return gcode;
|
||||
@ -4003,11 +4006,14 @@ std::string GCode::retract(bool toolchange)
|
||||
length is honored in case wipe path was too short. */
|
||||
gcode += toolchange ? m_writer.retract_for_toolchange() : m_writer.retract();
|
||||
bool need_lift = !m_writer.tool_is_extruder() || toolchange || (BOOL_EXTRUDER_CONFIG(retract_lift_first_layer) && m_config.print_retract_lift.value != 0 && this->m_layer_index == 0);
|
||||
bool last_fill_extusion_role_top_infill = (this->m_last_extrusion_role == ExtrusionRole::erTopSolidInfill);
|
||||
if(this->m_last_extrusion_role == ExtrusionRole::erGapFill)
|
||||
last_fill_extusion_role_top_infill = (this->m_last_notgapfill_extrusion_role == ExtrusionRole::erTopSolidInfill);
|
||||
if (!need_lift && m_config.print_retract_lift.value != 0) {
|
||||
if (EXTRUDER_CONFIG_WITH_DEFAULT(retract_lift_top, "") == "Not on top")
|
||||
need_lift = (this->m_last_extrusion_role != ExtrusionRole::erTopSolidInfill);
|
||||
need_lift = !last_fill_extusion_role_top_infill;
|
||||
else if (EXTRUDER_CONFIG_WITH_DEFAULT(retract_lift_top, "") == "Only on top")
|
||||
need_lift = (this->m_last_extrusion_role == ExtrusionRole::erTopSolidInfill);
|
||||
need_lift = last_fill_extusion_role_top_infill;
|
||||
else
|
||||
need_lift = true;
|
||||
}
|
||||
|
@ -359,6 +359,8 @@ private:
|
||||
double m_volumetric_speed;
|
||||
// Support for the extrusion role markers. Which marker is active?
|
||||
ExtrusionRole m_last_extrusion_role;
|
||||
// Not know the gapfill role for retract_lift_top
|
||||
ExtrusionRole m_last_notgapfill_extrusion_role;
|
||||
// Support for G-Code Processor
|
||||
float m_last_height{ 0.0f };
|
||||
float m_last_layer_z{ 0.0f };
|
||||
|
Loading…
x
Reference in New Issue
Block a user