ENH: fix empty infill layers

This is fix for github issue #216 that
sometimes the infill layer is empty.

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: Ie3be08b75506e48f5ae9dd6aae2ae729ba666e01
This commit is contained in:
salt.wei 2022-09-14 21:54:33 +08:00 committed by Lane.Wei
parent 1b07874ea3
commit d4854c0df7
5 changed files with 19 additions and 12 deletions

View file

@ -63,7 +63,7 @@ void LayerRegion::slices_to_fill_surfaces_clipped()
}
}
void LayerRegion::make_perimeters(const SurfaceCollection &slices, SurfaceCollection* fill_surfaces)
void LayerRegion::make_perimeters(const SurfaceCollection &slices, SurfaceCollection* fill_surfaces, ExPolygons* fill_no_overlap)
{
this->perimeters.clear();
this->thin_fills.clear();
@ -90,7 +90,9 @@ void LayerRegion::make_perimeters(const SurfaceCollection &slices, SurfaceCollec
// output:
&this->perimeters,
&this->thin_fills,
fill_surfaces
fill_surfaces,
//BBS
fill_no_overlap
);
if (this->layer()->lower_layer != nullptr)
@ -105,9 +107,6 @@ void LayerRegion::make_perimeters(const SurfaceCollection &slices, SurfaceCollec
g.solid_infill_flow = this->flow(frSolidInfill);
g.process();
// BBS
this->fill_no_overlap_expolygons = g.fill_no_overlap;
}
//#define EXTERNAL_SURFACES_OFFSET_PARAMETERS ClipperLib::jtMiter, 3.