Skip to content

Commit

Permalink
Fix a regression issue that retraction is not correct when wipe is off
Browse files Browse the repository at this point in the history
Fix #2697
  • Loading branch information
SoftFever committed Nov 11, 2023
1 parent 4f48afd commit 471ce39
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libslic3r/Extruder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Extruder
double retract(double length, double restart_extra);
double unretract();
double E() const { return m_share_extruder ? m_share_E : m_E; }
void reset_E() { reset(); }
void reset_E() { m_E = 0.; m_share_E = 0.; }
double e_per_mm(double mm3_per_mm) const { return mm3_per_mm * m_e_per_mm3; }
double e_per_mm3() const { return m_e_per_mm3; }
// Used filament volume in mm^3.
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
if (is_ramming)
gcodegen.m_wipe.reset_path(); // We don't want wiping on the ramming lines.
toolchange_gcode_str = gcodegen.set_extruder(new_extruder_id, tcr.print_z); // TODO: toolchange_z vs print_z
if (gcodegen.config().has_prime_tower)
if (gcodegen.config().enable_prime_tower)
deretraction_str = gcodegen.unretract();
}

Expand Down
1 change: 0 additions & 1 deletion src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,6 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
// BBS: project filaments
((ConfigOptionFloats, filament_colour_new))
// BBS: not in any preset, calculated before slicing
((ConfigOptionBool, has_prime_tower))
((ConfigOptionFloat, nozzle_volume))
((ConfigOptionPoints, start_end_points))
((ConfigOptionEnum<TimelapseType>, timelapse_type))
Expand Down

0 comments on commit 471ce39

Please sign in to comment.