From 3e54c0b775f94e6f8da79798a6545f38db871ec2 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 25 Nov 2020 14:55:39 +0100 Subject: [PATCH] Gyroid infill: Lowered the threshold to drop infill line segments. --- src/libslic3r/Fill/FillGyroid.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/Fill/FillGyroid.cpp b/src/libslic3r/Fill/FillGyroid.cpp index 5cbfed57c..5797c47a5 100644 --- a/src/libslic3r/Fill/FillGyroid.cpp +++ b/src/libslic3r/Fill/FillGyroid.cpp @@ -182,12 +182,14 @@ void FillGyroid::_fill_surface_single( polylines = intersection_pl(polylines, to_polygons(expolygon)); - if (! polylines.empty()) - // remove too small bits (larger than longer) + if (! polylines.empty()) { + // Remove very small bits, but be careful to not remove infill lines connecting thin walls! + // The infill perimeter lines should be separated by around a single infill line width. + const double minlength = scale_(0.8 * this->spacing); polylines.erase( - //FIXME what is the small size? Removing tiny extrusions disconnects walls! - std::remove_if(polylines.begin(), polylines.end(), [this](const Polyline &pl) { return pl.length() < scale_(this->spacing * 3); }), + std::remove_if(polylines.begin(), polylines.end(), [minlength](const Polyline &pl) { return pl.length() < minlength; }), polylines.end()); + } if (! polylines.empty()) { // connect lines