Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
igiannakas committed Dec 10, 2023
1 parent 9313a4a commit 520f777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libslic3r/Extruder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,23 @@ double Extruder::retract(double length, double restart_extra)
if (m_config->use_relative_e_distances)
m_share_E = 0.;
double to_retract = std::max(0., length - m_share_retracted);
m_restart_extra = restart_extra;
if (to_retract > 0.) {
m_share_E -= to_retract;
m_absolute_E -= to_retract;
m_share_retracted += to_retract;
m_restart_extra = restart_extra;
}
return to_retract;
} else {
// in case of relative E distances we always reset to 0 before any output
if (m_config->use_relative_e_distances)
m_E = 0.;
double to_retract = std::max(0., length - m_retracted);
m_restart_extra = restart_extra;
if (to_retract > 0.) {
m_E -= to_retract;
m_absolute_E -= to_retract;
m_retracted += to_retract;
m_restart_extra = restart_extra;
}
return to_retract;
}
Expand Down

0 comments on commit 520f777

Please sign in to comment.