From fb3420566d08bfa5044d741c984b338b7d65b4a0 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 13 Oct 2025 16:43:34 -0400 Subject: [PATCH] fix lathe thru stock depth --- src/kiri/mode/cam/topo4.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kiri/mode/cam/topo4.js b/src/kiri/mode/cam/topo4.js index 5bd4f528..95053024 100644 --- a/src/kiri/mode/cam/topo4.js +++ b/src/kiri/mode/cam/topo4.js @@ -52,7 +52,7 @@ export class Topo { console.log(widget.id, 'topo4 auto tolerance', resolution.round(4)); } - this.zBottom = state.zBottom; + this.zBottom = state.zBottom ?? 0; this.resolution = resolution; this.vertices = widget.getGeoVertices({ unroll: true, translate: true }); this.tabverts = widget.getTabVertices(); @@ -285,8 +285,8 @@ export class Topo { } } if (mz === -Infinity) { - mz = zBottom; // Math.min(0, lz) - } else if (zBottom && mz < zBottom) { + mz = zBottom; + } else if (mz < zBottom) { mz = zBottom; } heights.push(rx, 0, lz = mz);