diff options
author | supermerill <merill@free.fr> | 2021-11-17 03:35:44 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2021-11-17 03:37:50 +0300 |
commit | 282db5bd4f623e7d49648b6b4a056e7250df65af (patch) | |
tree | 74501203a57ba31925b19b46d40c5565bb397413 /src | |
parent | 08971c7351ba61adf04374a6404b534dd0047224 (diff) |
fix external_perimeter_cut_corners
was extruding less at the wrong segment.
supermerill/SuperSlicer#1903
Diffstat (limited to 'src')
-rw-r--r-- | src/libslic3r/GCode.cpp | 6 |
1 files 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), |