add drag knife option in laser mode

This commit is contained in:
Stewart Allen 2020-12-03 14:46:20 -05:00
commit f7ac50d2a6
11 changed files with 206 additions and 95 deletions

View file

@ -550,10 +550,11 @@
spindle = Math.min(spindleMax, process.camOutlineSpindle);
let flatLevels = depthData.outline.map(level => {
return POLY.flatten(level.clone(true), [], true).filter(p => !(p.depth = 0));
});
// flatLevels.xout('flat');
}).filter(l => l.length > 0);
flatLevels.xout('flat');
// start with the smallest polygon on the top
printPoint = flatLevels[0]
// .filter(l => l.length > 0)[0]
.sort((a,b) => { return a.area() - b.area() })[0]
.average();
printPoint = depthOutlinePath(printPoint, 0, flatLevels, toolDiam, polyEmit, false);