add smarter route planning when there are multiple tops to choose from
This commit is contained in:
parent
e20a9d0501
commit
535273b9e0
2 changed files with 46 additions and 1 deletions
|
|
@ -418,7 +418,12 @@
|
|||
}
|
||||
let ltops = tops[depth];
|
||||
let fitted = fit ? ltops.filter(poly => poly.isInside(fit, 0.01)) : ltops;
|
||||
fitted.filter(top => !top.level_emit).forEach(top => {
|
||||
let ftops = fitted.filter(top => !top.level_emit);
|
||||
if (ftops.length > 1) {
|
||||
console.log({depth, ftops});
|
||||
ftops = POLY.route(ftops, start);
|
||||
}
|
||||
ftops.forEach(top => {
|
||||
top.level_emit = true;
|
||||
let inside = level.filter(poly => poly.isInside(top));
|
||||
if (ease) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue