move shell generation into slice (new) post-processor which means it can be distributed and co-located with slicing in minion

This commit is contained in:
Stewart Allen 2021-06-23 22:31:27 -04:00
commit e2ef4ff7e2
10 changed files with 246 additions and 156 deletions

View file

@ -176,9 +176,21 @@
}
PRO.addTop = function(poly) {
let top = new Top(poly);
this.tops.push(top);
return top;
if (poly.length) {
let top = new Top(poly);
this.tops.push(top);
return top;
} else {
let top = new Top(poly.poly);
top.fill_lines = poly.fill_lines;
top.fill_off = poly.fill_off;
top.last = poly.last;
top.shells = poly.shells;
this.tops.push(top);
return top;
}
console.log('top', poly);
throw "invalid top";
};
PRO.findClosestPointTo = function(target) {