Update Wipe.cpp

This commit is contained in:
Wang YB
2024-01-17 10:34:51 +08:00
parent 0b6f75c9dc
commit abbe9d06df

View File

@@ -79,7 +79,8 @@ std::string Wipe::wipe(GCodeGenerator &gcodegen, bool toolchange)
static constexpr const std::string_view wipe_retract_comment = "wipe and retract"sv; static constexpr const std::string_view wipe_retract_comment = "wipe and retract"sv;
// Remaining quantized retraction length. // Remaining quantized retraction length.
if (double retract_length = extruder.retract_to_go(toolchange ? extruder.retract_length_toolchange() : extruder.retract_length()); //w15
if (double retract_length = extruder.retract_to_go(toolchange ? extruder.retract_length_toolchange() * 0.95 : extruder.retract_length()) * 0.95;
retract_length > 0 && this->has_path()) { retract_length > 0 && this->has_path()) {
// Delayed emitting of a wipe start tag. // Delayed emitting of a wipe start tag.
bool wiped = false; bool wiped = false;
@@ -197,11 +198,11 @@ std::string Wipe::wipe(GCodeGenerator &gcodegen, bool toolchange)
prev = p; prev = p;
auto end = this->path().end(); auto end = this->path().end();
for (; it != end && ! done; ++ it) { for (; it != end && ! done; ++ it) {
//w15
if (wipe_dist >= wipe_dist_max)
break;
p = gcodegen.point_to_gcode(it->point + m_offset); p = gcodegen.point_to_gcode(it->point + m_offset);
if (p != prev) { if (p != prev) {
//w15
if (wipe_dist >= wipe_dist_max)
break;
start_wipe(); start_wipe();
if (it->linear() ? if (it->linear() ?
wipe_linear(prev, p) : wipe_linear(prev, p) :