fix redundant path output in depth-first mode

This commit is contained in:
Stewart Allen 2021-01-17 22:23:51 -05:00
commit 26c0a5cf69
7 changed files with 19 additions and 12 deletions

View file

@ -365,9 +365,14 @@
if (depthFirst) {
let tops = depthData.map(level => {
// return POLY.nest(level.filter(poly => poly.depth === 0));
return POLY.nest(level.filter(poly => poly.depth === 0).clone());
});
printPoint = depthRoughPath(printPoint, 0, depthData, tops, polyEmit);
// printPoint = depthRoughPath(printPoint, 0, depthData, tops, (poly, index, count, start) => {
// console.log({z: poly.getZ(), i: poly.id, index, poly});
// return polyEmit(poly, index, count, start);
// });
}
setPrintPoint(printPoint);