Feature: Retract amount after wipe (#11015)

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
This commit is contained in:
Valerii Bokhan
2026-07-14 19:42:16 +02:00
committed by GitHub
parent 3c0338f462
commit 50768e0716
10 changed files with 293 additions and 45 deletions

View File

@@ -177,7 +177,14 @@ double Extruder::filament_flow_ratio() const
// Return a "retract_before_wipe" percentage as a factor clamped to <0, 1>
double Extruder::retract_before_wipe() const
{
return std::min(1., std::max(0., m_config->retract_before_wipe.get_at(m_config_index) * 0.01));
return std::clamp(m_config->retract_before_wipe.get_at(m_config_index) * 0.01, 0., 1.);
}
// Orca:
// Return a "retract_after_wipe" percentage as a factor clamped to <0, 1>
double Extruder::retract_after_wipe() const
{
return std::min(std::clamp(m_config->retract_after_wipe.get_at(m_config_index) * 0.01, 0., 1.), 1. - retract_before_wipe());
}
double Extruder::retraction_length() const