From cc853d9061bf3204a537ecd350e52fc34ce8f863 Mon Sep 17 00:00:00 2001 From: "salt.wei" Date: Thu, 20 Oct 2022 13:27:53 +0800 Subject: [PATCH] ENH: revert "ENH: fix for modifier region issue" The original patch can't fix empty layer issue Revert. This reverts commit 152a650fb80a84523e977b15f5f30d28837d80e9. Change-Id: Ib6d47ac981fca24ca953b45068703bbcd231cf95 --- src/libslic3r/Fill/Fill.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/libslic3r/Fill/Fill.cpp b/src/libslic3r/Fill/Fill.cpp index 55418b42f..14574548f 100644 --- a/src/libslic3r/Fill/Fill.cpp +++ b/src/libslic3r/Fill/Fill.cpp @@ -109,10 +109,6 @@ struct SurfaceFill { Surface surface; ExPolygons expolygons; SurfaceFillParams params; - //BBS - std::vector region_id_group; - ExPolygons no_overlap_expolygons; - }; // BBS: used to judge whether the internal solid infill area is narrow @@ -214,18 +210,8 @@ std::vector group_fills(const Layer &layer) fill.region_id = region_id; fill.surface = surface; fill.expolygons.emplace_back(std::move(fill.surface.expolygon)); - //BBS - fill.region_id_group.push_back(region_id); - fill.no_overlap_expolygons = layerm.fill_no_overlap_expolygons; - } else { - fill.expolygons.emplace_back(surface.expolygon); - //BBS - auto t = find(fill.region_id_group.begin(), fill.region_id_group.end(), region_id); - if (t == fill.region_id_group.end()) { - fill.region_id_group.push_back(region_id); - fill.no_overlap_expolygons = union_ex(fill.no_overlap_expolygons, layerm.fill_no_overlap_expolygons); - } - } + } else + fill.expolygons.emplace_back(surface.expolygon); } } } @@ -467,8 +453,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive: LayerRegion* layerm = this->m_regions[surface_fill.region_id]; for (ExPolygon& expoly : surface_fill.expolygons) { - //f->no_overlap_expolygons = intersection_ex(layerm->fill_no_overlap_expolygons, ExPolygons() = { expoly }); - f->no_overlap_expolygons = intersection_ex(surface_fill.no_overlap_expolygons, ExPolygons() = { expoly }); + f->no_overlap_expolygons = intersection_ex(layerm->fill_no_overlap_expolygons, ExPolygons() = { expoly }); // Spacing is modified by the filler to indicate adjustments. Reset it for each expolygon. f->spacing = surface_fill.params.spacing; surface_fill.surface.expolygon = std::move(expoly);