From fb9746175c5c089ba86fe971137960dd1cd4fde4 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Fri, 10 Nov 2017 14:46:12 -0500 Subject: [PATCH] default to better connected hex infill --- js/kiri-slice.js | 7 ++++--- js/license.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/js/kiri-slice.js b/js/kiri-slice.js index c56c02e5..61911a4d 100644 --- a/js/kiri-slice.js +++ b/js/kiri-slice.js @@ -545,7 +545,7 @@ var gs_kiri_slice = exports; scope.isSparseFill = true; // this is pluggable - sparseFillHex(target); + sparseFillHex(target, true); // force emit of last line target.newline(); @@ -1115,8 +1115,9 @@ var gs_kiri_slice = exports; * emitter creates a hex infill pattern and sends to target * * @param {Object} target + * @param {boolean} full continuous walls */ - function sparseFillHex(target) { + function sparseFillHex(target, full) { // compute segment lengths (vert/horiz and 45) var spacing = target.offset() / 2, vhlen = (1 - target.density()) * 4 + spacing, @@ -1127,7 +1128,7 @@ var gs_kiri_slice = exports; evenZ = target.zIndex() % 2 === 0, x, y; - if (evenZ) { + if (full || evenZ) { x = bounds.min.x; for (;;) { if (even && x > bounds.max.x) break; diff --git a/js/license.js b/js/license.js index 47922ea1..3f13f4dc 100644 --- a/js/license.js +++ b/js/license.js @@ -1,7 +1,7 @@ var exports = { COPYRIGHT:"Copyright (C) 2014-2017 Stewart Allen - All Rights Reserved", LICENSE:"Unauthorized copying, modification and re-distribution are strictly prohibited without prior written consent.", - VERSION:"1.0.67" + VERSION:"1.0.68" }; if (!module) var module = {}; module.exports = exports;