diff --git a/notes.md b/notes.md index 2ab53666..473bf6f7 100644 --- a/notes.md +++ b/notes.md @@ -60,6 +60,7 @@ * `B` outside cutting direction in roughing mode inverted * `B` clear voids has double interior pass because wrong offset shadow used * `B` top clearing operations should use linear, not offset, passes +* `F` use 3 registration holes to prevent rotation accidents (midline offset one axis) * `F` parameterize dropping close points in prep.js. ensure long segments remain straight * `F` flat and volumetric rendering of paths * `F` z bounded slices (extension of z bottom offset feature) diff --git a/src/kiri/slicer.js b/src/kiri/slicer.js index 12ff1d71..6164b5bf 100644 --- a/src/kiri/slicer.js +++ b/src/kiri/slicer.js @@ -688,8 +688,8 @@ } } + // undo temp del/used marks for (let i=0; i { if (p.open) { + let dist = p.first().distTo2D(p.last()); + if (dist < 1) p.open = false; + } }); if (opt.thin) { top.thin_fill = []; let oso = {z, count, gaps: [], outs: [], minArea: 0.05}; @@ -913,7 +918,7 @@ // return top.supports = supports; // then union supports - supports = POLY.union(supports); + supports = POLY.union(supports, null, true); // constrain support poly to top polys supports = POLY.trimTo(supports, trimTo); @@ -963,7 +968,7 @@ if (!supports) return; // union supports - supports = POLY.union(supports); + supports = POLY.union(supports, undefined, true); // trim to clip offsets if (slice.offsets) POLY.subtract(supports, slice.offsets, nsB, null, slice.z, min);