rename and comment top and noodle fields
This commit is contained in:
parent
91ad27f540
commit
5a71b25cdb
3 changed files with 8 additions and 8 deletions
|
|
@ -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 };
|
||||
|
|
|
|||
|
|
@ -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 = [];
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in a new issue