From 7c568bfcbf412e89ad5cbdedb4e9d946759340d8 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Fri, 28 Jun 2019 12:47:45 -0400 Subject: [PATCH] setup for segmenting first layer tops --- js/kiri-slice.js | 13 ++++++++++--- notes.md | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/js/kiri-slice.js b/js/kiri-slice.js index de7b48f1..220dbcf0 100644 --- a/js/kiri-slice.js +++ b/js/kiri-slice.js @@ -390,6 +390,13 @@ var gs_kiri_slice = exports; opt = options || {}; slice.tops.forEach(function(top) { + var top_poly = [ top.poly ]; + + if (slice.index === 0) { + // console.log({slice_top_0: top_poly, count}); + // segment polygon + } + if (opt.vase) { top.poly = top.poly.clone(false); } @@ -406,14 +413,14 @@ var gs_kiri_slice = exports; if (count) { // permit offset of 0 for laser if (offset1 === 0) { - last = [top.poly].clone(true); + last = top_poly.clone(true); top.traces = last; } else { if (opt.thin) { var on1s2 = offset1 * 2, on2s2 = offsetN * 2; POLY.expand2( - [top.poly], + top_poly, -offset1, -offsetN, top.traces, @@ -452,7 +459,7 @@ var gs_kiri_slice = exports; z); } else { POLY.expand( - [top.poly], + top_poly, -offset1, z, top.traces, diff --git a/notes.md b/notes.md index 27eba993..b59702c5 100644 --- a/notes.md +++ b/notes.md @@ -14,6 +14,7 @@ # FDM todo +* first layer segment large flat areas for better fill reliability * adaptive column to compensate for fine or layers that finish too quickly and melt * apply finish speed to exposed top and underside flat areas * store/recover grid:print target against printer selected in device