Merge pull request #462 from Edgar-Allan-Ohms-5276/feature-improve-routing

Improve routing between areas for CAM Area operations
This commit is contained in:
Stewart Allen 2026-03-10 23:33:42 -04:00 committed by GitHub
commit 86085b9df2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -471,7 +471,8 @@ class OpArea extends CamOp {
while (areas?.length) {
let min = {
dist: Infinity,
area: undefined
area: undefined,
point: undefined
};
for (let area of areas.filter(p => !p.used)) {
@ -486,12 +487,14 @@ class OpArea extends CamOp {
if (find.distance < min.dist) {
min.area = area;
min.dist = find.distance;
min.point = find.point
}
}
// if we have a next-closest top poly, pocket that
if (min.area) {
min.area.used = true;
printPoint = min.point;
pocket({
cutdir: op.ov_conv,
depthFirst: process.camDepthFirst,