add strict closing rule for fdm, laser slicing
This commit is contained in:
parent
1505d94fc0
commit
97a3edf039
3 changed files with 7 additions and 0 deletions
|
|
@ -565,6 +565,11 @@ export function sliceConnect(input, z, opt = {}) {
|
|||
|
||||
// emit a polygon if it can be cleaned and still have 2 or more points
|
||||
function emit(poly) {
|
||||
let gap = poly.first().distTo2D(poly.last());
|
||||
if (opt.strict && gap > bridgeMax) {
|
||||
if (debug) console.log('drop', gap, poly);
|
||||
return;
|
||||
}
|
||||
emitted += poly.length;
|
||||
if (!opt.dirty) poly = poly.clean();
|
||||
if (poly.length > 2 || true) output.push(poly);
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ export function fdm_slice(settings, widget, onupdate, ondone) {
|
|||
}
|
||||
|
||||
slice(points, {
|
||||
strict: true,
|
||||
debug: process.xray,
|
||||
xray: process.xray,
|
||||
zMin: bounds.min.z,
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ function laser_slice(settings, widget, onupdate, ondone) {
|
|||
let indices = [];
|
||||
|
||||
slicer.slice(points, {
|
||||
strict: true,
|
||||
zMin: bounds.min.z,
|
||||
zMax: bounds.max.z,
|
||||
zGen(zopt) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue