From aadbb3e7ee73a25e8bcbd299b2c1b44c714bd0b6 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 24 Nov 2025 01:13:55 -0500 Subject: [PATCH] fixes #453 where wide cutout areas intersect --- src/kiri/mode/cam/op-outline.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/kiri/mode/cam/op-outline.js b/src/kiri/mode/cam/op-outline.js index 7978eb3f..81d89491 100644 --- a/src/kiri/mode/cam/op-outline.js +++ b/src/kiri/mode/cam/op-outline.js @@ -172,16 +172,12 @@ class OpOutline extends CamOp { let stepover = toolDiam * op.step; let wideCuts = [] //accumulator for wide cuts for (let c = (op.steps || 1); c > 0; c--){ - offset.slice().forEach(op => { - // clone removes inners but the real solution is - // to limit expanded shells to through holes - let wideCut = POLY.expand([op.clone(true)], stepover*c, slice.z, [], 1); - wideCut.forEach(cut =>{ //set order of cuts when wide - cut.order = c - if(cut.inner) cut.inner.forEach(inn =>{ inn.order = c }) - }); - wideCuts.push(...wideCut) + let wideCut = POLY.expand(offset.clone(true), stepover * c, slice.z, [], 1); + wideCut.forEach(cut =>{ //set order of cuts when wide + cut.order = c + if(cut.inner) cut.inner.forEach(inn =>{ inn.order = c }) }); + wideCuts.push(...wideCut) } offset.appendAll(wideCuts); }