fix missing var reference

This commit is contained in:
Stewart Allen 2020-12-30 22:23:15 -05:00
commit e215b9aaef
3 changed files with 7 additions and 3 deletions

View file

@ -695,7 +695,11 @@
* @param {Polygon[]} polys
*/
function addSolidFills(slice, polys) {
slice.solids.appendAll(polys);
if (slice.solids) {
slice.solids.appendAll(polys);
} else if (polys && polys.length) {
console.log({no_solids_in: slice, for: polys})
}
};
/**

View file

@ -266,7 +266,7 @@
layerBytes = width * height,
coded;
if (legacy) {
if (SLA.legacy) {
let converted = conf.lines.map((line, index) => {
let count = line.length / 4;
let bits = new Uint8Array(line.length / 4);

View file

@ -584,7 +584,7 @@
}
fill = POLY.trimTo(fill, slice.tops.map(t => t.poly));
fill = POLY.union(slice.unioned.appendAll(fill));
fill = POLY.union(slice.unioned.appendAll(fill),0,true);
slice.unioned = fill;
}