From 5a71b25cdbbbb31ccdd2913e0e2ac2cfef60fd7f Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 24 Feb 2025 00:45:04 -0500 Subject: [PATCH] rename and comment top and noodle fields --- src/geo/polygon.js | 8 ++++---- src/kiri-mode/fdm/post.js | 6 +++--- src/kiri-mode/fdm/slice.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/geo/polygon.js b/src/geo/polygon.js index 2a3449e0..d00fbbbe 100644 --- a/src/geo/polygon.js +++ b/src/geo/polygon.js @@ -265,23 +265,23 @@ class Polygon { // inset outer polygon let inner = this.inner; let inset = this.clone().offset(width); - let noodle = [ this.clone().setInner(inset) ]; + let noodot = [ this.clone().setInner(inset) ]; let noodin = []; // subtract inners from the inset if (inner) { - noodle = POLY.subtract(noodle, inner, []); + noodot = POLY.subtract(noodot, inner, []); // for each inner, offset and subtract noodle + itself let nood = []; for (let innie of inner) { let inexp = innie.clone().offset(-width); let intrm = POLY.trimTo(inexp, [ this ]); - let inood = POLY.subtract(intrm, [ ...noodle, innie ], []); + let inood = POLY.subtract(intrm, [ ...noodot, innie ], []); nood.push(...inood); } noodin = POLY.union(nood, 0, true); } // unify inner noodles and outer noodle - noodle = POLY.union([ ...noodle, ...noodin ], 0, true); + let noodle = POLY.union([ ...noodot, ...noodin ], 0, true); // subtract noodle from poly for next noodle calc let remain = POLY.subtract([ this ], noodle, []); return { noodle, remain }; diff --git a/src/kiri-mode/fdm/post.js b/src/kiri-mode/fdm/post.js index d601cb1d..5385f041 100644 --- a/src/kiri-mode/fdm/post.js +++ b/src/kiri-mode/fdm/post.js @@ -210,9 +210,9 @@ FDM.doTopShells = function(z, top, count, offset1, offsetN, fillOffset, opt = {} top.poly = top.poly.clone(false); } - top.shells = []; - top.fill_off = []; - top.fill_lines = []; + top.shells = []; // strategies output shells here + top.fill_off = []; // offset from innermost shell for infill + top.fill_lines = []; // fill lines inside fill_off let last = [], gaps = []; diff --git a/src/kiri-mode/fdm/slice.js b/src/kiri-mode/fdm/slice.js index 22e2ba50..8077c4ed 100644 --- a/src/kiri-mode/fdm/slice.js +++ b/src/kiri-mode/fdm/slice.js @@ -41,7 +41,7 @@ const POLY = polygons, fill: { check: 0x008855, face: 0x008855, line: 0x008855, opacity, lopacity, fat }, infill: { check: 0x3322bb, face: 0x3322bb, line: 0x3322bb, opacity, lopacity, fat }, inset: { line: 0x555555, check: 0x555555 }, - part: { line: 0x999999, check: 0x999999, face: 0 }, + part: { line: 0x777777, check: 0x777777, face: 0 }, thin: { check: 0xbb8800, face: 0xbb8800, line: 0xbb8800, opacity, lopacity, fat }, }), PROTO = Object.clone(COLOR),