diff --git a/src/kiri/print.js b/src/kiri/print.js index b020fa25..75a3c072 100644 --- a/src/kiri/print.js +++ b/src/kiri/print.js @@ -682,7 +682,7 @@ near = opt.near || false, fast = opt.fast || false, fill = opt.fill >= 0 ? opt.fill : fillMult, - thinDist = near ? thinWall * 3 : thinWall; + thinDist = near ? thinWall : thinWall; while (lines && marked < lines.length) { group = null; diff --git a/src/kiri/slice.js b/src/kiri/slice.js index 8d86fb8d..185ce2bf 100644 --- a/src/kiri/slice.js +++ b/src/kiri/slice.js @@ -376,7 +376,9 @@ // top.thinner = []; top.traces = []; top.inner = []; - let last = [], z = top.poly.getZ(); + let last = [], + gaps = [], + z = top.poly.getZ(); if (count) { // permit offset of 0 for laser and drag knife @@ -411,6 +413,7 @@ // fillArea(polys, 90, off, [], 0.05, off*4), // fillArea(polys, 180, off, [], 0.05, off*4), )); + gaps = polys; }); } else { // standard wall offsetting strategy @@ -442,7 +445,14 @@ // generate fill offset poly set from last offset to top.inner if (fillOffset && last.length > 0) { + // if gaps present, remove that area from fill inset + if (gaps.length) { + let nulast = []; + POLY.subtract(last, gaps, nulast); + last = nulast; + } last.forEach(function(inner) { + // TODO replace with new offset() function POLY.trace2count(inner, top.inner, fillOffset, 1, 0); }); }