diff --git a/app.js b/app.js index fc62dbd9..1a4ca698 100644 --- a/app.js +++ b/app.js @@ -236,10 +236,10 @@ const script = { "kiri", "ext/three", "license", - // "ext/clip2", + "ext/clip2", // work.test "ext/tween", "ext/fsave", - // "ext/earcut", + "ext/earcut", // work.test "add/array", "add/three", "geo/base", diff --git a/notes.md b/notes.md index 42558298..b14725d9 100644 --- a/notes.md +++ b/notes.md @@ -36,10 +36,12 @@ * `B` fix adaptive slicing. also with multi-extruder * `B` fix supports with grouped parts +* `B` infill follows inside shells * `F` speculative background preview generation * `F` control for size of purge block (with 0=disabled) * `F` add separate fill speed control * `F` manual support addition / control +* `F` control layer start position * `F` polishing and other non-planar work * `F` gradient infill https://www.youtube.com/watch?v=hq53gsYREHU&feature=emb_logo * `F` feather sharp tips by reducing extrusion in area of overlap diff --git a/src/kiri/print.js b/src/kiri/print.js index 3e889c59..2fae558e 100644 --- a/src/kiri/print.js +++ b/src/kiri/print.js @@ -200,7 +200,7 @@ (Math.pow(pos.Y - lastPos.Y ,2)) ); let dR = (dE / dV); // filament per mm - if (dR < 0.025) { + if (dR < 0.025 || dR > 0.35) { console.log(height.round(2), pos.Z.round(2), dV.round(2), dR.round(3)); } } diff --git a/src/kiri/render.js b/src/kiri/render.js index e2be43d2..05a6ace1 100644 --- a/src/kiri/render.js +++ b/src/kiri/render.js @@ -127,7 +127,13 @@ polys.forEach(poly => { let exp = off_opt.outs = []; if (poly.isOpen()) { + // shorten line by offset + const pp = poly.points, pl = pp.length; + pp[0] = pp[0].offsetPointTo(pp[1], offset); + pp[pl-1] = pp[pl-1].offsetPointTo(pp[pl-2], offset); exp.appendAll(POLY.expand_lines(poly, offset * 0.9, z)); + // force re-nest if offsets cause ends to join + exp = POLY.flatten(exp,[],true); this.stats.flat_line = 0; } else if (offset) { POLY.offset([poly], offset * 0.9, off_opt);