@@ -109,6 +109,9 @@ struct SurfaceFill {
109109 Surface surface;
110110 ExPolygons expolygons;
111111 SurfaceFillParams params;
112+ // BBS
113+ std::vector<size_t > region_id_group;
114+ ExPolygons no_overlap_expolygons;
112115};
113116
114117// BBS: used to judge whether the internal solid infill area is narrow
@@ -210,8 +213,18 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
210213 fill.region_id = region_id;
211214 fill.surface = surface;
212215 fill.expolygons .emplace_back (std::move (fill.surface .expolygon ));
213- } else
214- fill.expolygons .emplace_back (surface.expolygon );
216+ // BBS
217+ fill.region_id_group .push_back (region_id);
218+ fill.no_overlap_expolygons = layerm.fill_no_overlap_expolygons ;
219+ } else {
220+ fill.expolygons .emplace_back (surface.expolygon );
221+ // BBS
222+ auto t = find (fill.region_id_group .begin (), fill.region_id_group .end (), region_id);
223+ if (t == fill.region_id_group .end ()) {
224+ fill.region_id_group .push_back (region_id);
225+ fill.no_overlap_expolygons = union_ex (fill.no_overlap_expolygons , layerm.fill_no_overlap_expolygons );
226+ }
227+ }
215228 }
216229 }
217230 }
@@ -337,6 +350,8 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
337350 surface_fills.back ().region_id = surface_fills[i].region_id ;
338351 surface_fills.back ().surface .surface_type = stInternalSolid;
339352 surface_fills.back ().surface .thickness = surface_fills[i].surface .thickness ;
353+ surface_fills.back ().region_id_group = surface_fills[i].region_id_group ;
354+ surface_fills.back ().no_overlap_expolygons = surface_fills[i].no_overlap_expolygons ;
340355 for (size_t j = 0 ; j < narrow_expolygons_index.size (); j++) {
341356 // BBS: move the narrow expolygons to new surface_fills.back();
342357 surface_fills.back ().expolygons .emplace_back (std::move (surface_fills[i].expolygons [narrow_expolygons_index[j]]));
0 commit comments