mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
Updated wipe logic to respect retraction speed during wiping (#3094)
* Wipe retraction adjusted based on available wipe distance and retraction speed * Wipe Improvements: Removed debug code, removed retract before wipe and made the respect retract speed an option. * Wipe improvements: Spelling & grammar * Revert "Wipe improvements: Spelling & grammar" This reverts commitc8f8612b3f
. * Revert "Wipe Improvements: Removed debug code, removed retract before wipe and made the respect retract speed an option." This reverts commitba515ffb62
. * Wipe improvements: Using retraction before wipe parameter to judge when to do excess retraction * Wipe Improvements: Floating point comparison check * Wipe Improvements: Refactoring the code * Wipe Improvements: Updated Wipe Distance tool tip * Wipe Improvements: Removed redundant code * Wipe Improvements: Use unscale_
This commit is contained in:
parent
7b6dbfdbcc
commit
712c28251c
5 changed files with 77 additions and 19 deletions
|
@ -682,23 +682,23 @@ std::string GCodeWriter::extrude_to_xyz(const Vec3d &point, double dE, const std
|
|||
return w.string();
|
||||
}
|
||||
|
||||
std::string GCodeWriter::retract(bool before_wipe)
|
||||
std::string GCodeWriter::retract(bool before_wipe, double retract_length)
|
||||
{
|
||||
double factor = before_wipe ? m_extruder->retract_before_wipe() : 1.;
|
||||
assert(factor >= 0. && factor <= 1. + EPSILON);
|
||||
return this->_retract(
|
||||
factor * m_extruder->retraction_length(),
|
||||
retract_length > EPSILON ? retract_length : factor * m_extruder->retraction_length(),
|
||||
factor * m_extruder->retract_restart_extra(),
|
||||
"retract"
|
||||
);
|
||||
}
|
||||
|
||||
std::string GCodeWriter::retract_for_toolchange(bool before_wipe)
|
||||
std::string GCodeWriter::retract_for_toolchange(bool before_wipe, double retract_length)
|
||||
{
|
||||
double factor = before_wipe ? m_extruder->retract_before_wipe() : 1.;
|
||||
assert(factor >= 0. && factor <= 1. + EPSILON);
|
||||
return this->_retract(
|
||||
factor * m_extruder->retract_length_toolchange(),
|
||||
retract_length > EPSILON ? retract_length : factor * m_extruder->retract_length_toolchange(),
|
||||
factor * m_extruder->retract_restart_extra_toolchange(),
|
||||
"retract for toolchange"
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue