ENH: eliminate too narrow area of stBottomBridge

For very narrow bottom bridge, it's useless and even
harmful to be printed as bridge. Eliminate it.

This is handling for github issue #298

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I1dc614781a028716a6de59454577f0b7f3b5b1f5
This commit is contained in:
salt.wei 2022-11-28 17:22:26 +08:00 committed by Lane.Wei
parent d3e6455cf7
commit 416e100b1d

View file

@ -225,7 +225,9 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly
break;
}
// Grown by 3mm.
Polygons polys = offset(bridges[i].expolygon, bridge_margin, EXTERNAL_SURFACES_OFFSET_PARAMETERS);
//BBS: eliminate too narrow area to avoid generating bridge on top layer when wall loop is 1
//Polygons polys = offset(bridges[i].expolygon, bridge_margin, EXTERNAL_SURFACES_OFFSET_PARAMETERS);
Polygons polys = offset2({ bridges[i].expolygon }, -scale_(nozzle_diameter * 0.1), bridge_margin, EXTERNAL_SURFACES_OFFSET_PARAMETERS);
if (idx_island == -1) {
BOOST_LOG_TRIVIAL(trace) << "Bridge did not fall into the source region!";
} else {