allow infill cloning to work with threading

This commit is contained in:
Stewart Allen 2021-07-10 22:09:44 -04:00
commit 87642e8cf3
3 changed files with 16 additions and 28 deletions

View file

@ -871,9 +871,6 @@
flatten(polys).sort((a,b) => {
return a.area() > b.area();
}).forEach(p => {
// finger.push(p.area());
// finger.push(p.perimeter());
// finger.push(p.bounds);
finger.push({
c: p.circularityDeep(),
p: p.perimeterDeep(),
@ -913,20 +910,6 @@
return false;
}
}
// for (let i=0; i<a.length; i += 3) {
// if (Math.abs(a[i] - b[i]) > 0.001) {
// return false;
// }
// if (Math.abs(a[i+1] - b[i+1]) > 0.0001) {
// return false;
// }
// if (Math.abs(a[i+2].centerx() - b[i+2].centerx()) > 0.0001) {
// return false;
// }
// if (Math.abs(a[i+2].centery() - b[i+2].centery()) > 0.0001) {
// return false;
// }
// }
return true;
}

View file

@ -190,7 +190,7 @@ if (!self.window) (function() {
free: exports.mem_clr,
set_debug: exports.set_debug
};
wasm.shared = wasm.malloc(1024 * 1024 * 32),
wasm.shared = wasm.malloc(1024 * 1024 * 30),
wasm.fn = {
diff: exports.poly_diff,
union: exports.poly_union,