From ea9920e5d679e2deb19e553ee504cafea7b89714 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 2 Feb 2018 19:48:16 +0100 Subject: [PATCH] Fix of Negative Feedrates: G1 F-3.84007e+006 stops smoothie The problem was caused by the gap fill algorithm, which worked with square extrusion width values as with rounded extrusion widths, which sometimes lead to negative extrusion cross sections for high height to width ratios. The extrusion width logic has been changed to consider the input width to be the extrusion spacing, not the extrusion width. The change certainly removed the negative feed rates, but it also certainly increased the gap fill width to some exent. It needs to be verified now, whether the gap fill does not extrude too much. https://github.com/prusa3d/Slic3r/issues/677 --- xs/src/libslic3r/PerimeterGenerator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/PerimeterGenerator.cpp b/xs/src/libslic3r/PerimeterGenerator.cpp index bffd46d0fe..ea9c73fa4f 100644 --- a/xs/src/libslic3r/PerimeterGenerator.cpp +++ b/xs/src/libslic3r/PerimeterGenerator.cpp @@ -483,8 +483,9 @@ PerimeterGenerator::_variable_width(const ThickPolylines &polylines, ExtrusionRo if (path.polyline.points.empty()) { path.polyline.append(line.a); path.polyline.append(line.b); - - flow.width = unscale(w); + // Convert from spacing to extrusion width based on the extrusion model + // of a square extrusion ended with semi circles. + flow.width = unscale(w) + flow.height * (1. - 0.25 * PI); #ifdef SLIC3R_DEBUG printf(" filling %f gap\n", flow.width); #endif