diff --git a/src/kiri/mode/cam/topo3.js b/src/kiri/mode/cam/topo3.js index 3910268d..1253cdf1 100644 --- a/src/kiri/mode/cam/topo3.js +++ b/src/kiri/mode/cam/topo3.js @@ -126,9 +126,8 @@ export class Topo { wbounds.expandByVector({ x: toolDiameter/2 + resolution, y: toolDiameter/2 + resolution, z: 0 }); } + // swap XY vertices (unswap later after polylines generated) if (contourY) { - // console.time('swap XY vertices'); - // swap XY vertices for (let i=0; i 1) { lines.push(poly); @@ -200,6 +206,7 @@ export class Topo { skip = 0; continue; } + // off part but we want to return zBottom (outside) if (p.z < zBottom - epsilon) { lp = p; if (poly.length === 0) { @@ -215,6 +222,7 @@ export class Topo { continue; } } else if (lp && skip && poly.length === 0) { + // latent/last point output lp.z = zBottom; poly.push(lp); } @@ -225,6 +233,7 @@ export class Topo { if (poly.length > 1) { lines.push(poly); } + // fixup/swap when contouring along Y if (contourY) { for (let poly of lines) for (let p of poly.points) {