prevent re-emitting tops during recursion. only wide expand outer polys

This commit is contained in:
Stewart Allen 2020-11-06 07:26:58 -05:00
commit 0027a919a3
2 changed files with 5 additions and 2 deletions

View file

@ -439,7 +439,8 @@
}
let ltops = tops[depth];
let fitted = fit ? ltops.filter(poly => poly.isInside(fit)) : ltops;
fitted.forEach(top => {
fitted.filter(top => !top.level_emit).forEach(top => {
top.level_emit = true;
let inside = level.filter(poly => poly.isInside(top));
start = poly2polyEmit(inside, start, emitter);
start = polyLevelEmitter(start, depth + 1, levels, tops, emitter, top);