From 6470be92cab9abae3037b4d2e92a36848ee3f559 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 23 Nov 2020 10:52:20 -0500 Subject: [PATCH] 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);