diff options
author | Lukáš Hejl <hejl.lukas@gmail.com> | 2020-09-07 10:14:06 +0300 |
---|---|---|
committer | Lukáš Hejl <hejl.lukas@gmail.com> | 2020-09-09 15:40:14 +0300 |
commit | 5e9399247c414dc8b41db9b8ab8622754a0209eb (patch) | |
tree | c178dc6bbaa8dfe4dc75a6445123305caf6ba7f3 /src/libslic3r | |
parent | 5633526ecfa9215180a6009c4c300cbedf24fa83 (diff) |
Check if exist any boundary polyline
Diffstat (limited to 'src/libslic3r')
-rw-r--r-- | src/libslic3r/Fill/FillAdaptive.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libslic3r/Fill/FillAdaptive.cpp b/src/libslic3r/Fill/FillAdaptive.cpp index 577ba7e61..bf9cd7f9d 100644 --- a/src/libslic3r/Fill/FillAdaptive.cpp +++ b/src/libslic3r/Fill/FillAdaptive.cpp @@ -51,13 +51,19 @@ void FillAdaptive::_fill_surface_single( if(polyline.lines().size() == 1 && expolygon.has_boundary_point(polyline.lines().front().a) && expolygon.has_boundary_point(polyline.lines().front().b)) { boundary_polylines.push_back(polyline); - } else { + } + else + { non_boundary_polylines.push_back(polyline); } } - boundary_polylines = chain_polylines(boundary_polylines); - FillAdaptive::connect_infill(std::move(boundary_polylines), expolygon, polylines_out, this->spacing, params); + if(!boundary_polylines.empty()) + { + boundary_polylines = chain_polylines(boundary_polylines); + FillAdaptive::connect_infill(std::move(boundary_polylines), expolygon, polylines_out, this->spacing, params); + } + polylines_out.insert(polylines_out.end(), non_boundary_polylines.begin(), non_boundary_polylines.end()); } |