From 282db5bd4f623e7d49648b6b4a056e7250df65af Mon Sep 17 00:00:00 2001 From: supermerill Date: Wed, 17 Nov 2021 01:35:44 +0100 Subject: [PATCH] fix external_perimeter_cut_corners was extruding less at the wrong segment. supermerill/SuperSlicer#1903 --- src/libslic3r/GCode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 71af0bf19..e397c198f 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3773,8 +3773,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string &descri //we have to remove coeff percentage on path.width length double coeff = cut_corner_cache[idx_angle-30]; //the length, do half of the work on width/4 and the other half on width/2 - coordf_t length1 = (path.width) / 4; - coordf_t line_length = unscaled(line.length()); + double length1 = (path.width) / 4; + double line_length = unscaled(line.length()); if (line_length > length1) { double mult1 = 1 - coeff * 2; double length2 = (path.width) / 2; @@ -3790,7 +3790,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string &descri sum += e_per_mm * (length1) * mult1; if (line_length - length1 > length2) { - Point inter_point2 = line.point_at(scale_d(length2)); + Point inter_point2 = line.point_at(scale_d(length1 + length2)); //extrude reduced gcode += m_writer.extrude_to_xy( this->point_to_gcode(inter_point2),