From 6470be92cab9abae3037b4d2e92a36848ee3f559 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 23 Nov 2020 10:52:20 -0500 Subject: [PATCH 1/2] add healing to open top polys if ends are close. update support union call --- src/kiri/slicer.js | 2 +- src/mode/fdm/slice.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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}; @@ -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); From 159a658e6476a3ff677d202985b0819bbf9470c8 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 23 Nov 2020 11:46:08 -0500 Subject: [PATCH 2/2] notes update. add another poly.union update in fmd slice --- notes.md | 1 + src/mode/fdm/slice.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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/mode/fdm/slice.js b/src/mode/fdm/slice.js index ee309476..ea6b5474 100644 --- a/src/mode/fdm/slice.js +++ b/src/mode/fdm/slice.js @@ -918,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);