ENH: topmost layer can be controlled by only_one_wall_top

For github issue #124

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: Ieb4a2c0cdb185d1cc565a20754327eeb1c599237
This commit is contained in:
salt.wei 2022-08-16 11:49:52 +08:00 committed by Lane.Wei
parent 63809c63da
commit d6a6fad04e

View file

@ -394,8 +394,8 @@ void PerimeterGenerator::process()
for (const Surface &surface : this->slices->surfaces) {
// detect how many perimeters must be generated for this island
int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops
//BBS: force the topmost layer to be one wall
if (loop_number > 0 && this->upper_slices == nullptr)
//BBS: set the topmost layer to be one wall
if (loop_number > 0 && config->only_one_wall_top && this->upper_slices == nullptr)
loop_number = 0;
ExPolygons last = union_ex(surface.expolygon.simplify_p(surface_simplify_resolution));