fix route planning for trace ops

This commit is contained in:
Stewart Allen 2021-01-21 16:28:56 -05:00
commit faeb423a02
2 changed files with 8 additions and 1 deletions

View file

@ -858,6 +858,8 @@
return startPoint;
}
BASE.util.poly2polyEmit = poly2polyEmit;
/**
* like tip2tipEmit but accepts an array of polygons and the next closest
* point can be anywhere in the adjacent polygon. should be re-written

View file

@ -692,6 +692,7 @@
let { settings, widget, sliceAll, zMax, tabs } = state;
let { updateToolDiams, cutTabs, cutPolys, healPolys } = state;
let { process, stock } = settings;
let poly2polyEmit = BASE.util.poly2polyEmit;
// generate tracing offsets from chosen features
let sliceOut = this.sliceOut = [];
let areas = op.areas[widget.id] || [];
@ -759,7 +760,11 @@
polys = healPolys(polys);
switch (op.mode) {
case "follow":
for (let poly of polys) {
let routed = [];
poly2polyEmit(polys, newPoint(0,0,0), (poly, index, count, spoint) => {
routed.push(poly);
});
for (let poly of routed) {
let offdist = 0;
switch (offset) {
case "outside": offdist = toolDiam / 2; break;