From e5e189cf907d7443a739e8f0e069f7feae518e1a Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sun, 14 Dec 2025 15:41:45 -0500 Subject: [PATCH] cpu contour not obeying z bottom --- src/kiri/mode/cam/op-contour.js | 2 +- src/kiri/mode/cam/topo3.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kiri/mode/cam/op-contour.js b/src/kiri/mode/cam/op-contour.js index f5528a9c..5c6752a1 100644 --- a/src/kiri/mode/cam/op-contour.js +++ b/src/kiri/mode/cam/op-contour.js @@ -109,7 +109,7 @@ class OpContour extends CamOp { } }, contour: op, - state: state + state }); // computed if set to 0 diff --git a/src/kiri/mode/cam/topo3.js b/src/kiri/mode/cam/topo3.js index a067a34c..a8431983 100644 --- a/src/kiri/mode/cam/topo3.js +++ b/src/kiri/mode/cam/topo3.js @@ -20,6 +20,7 @@ export class Topo { let { controller, process } = settings, { webGPU } = controller, + { workarea } = state, animesh = parseInt(controller.animesh || 100) * 2500, axis = contour.axis.toLowerCase(), contourX = axis === "x", @@ -31,8 +32,8 @@ export class Topo { maxX = bounds.max.x, minY = bounds.min.y, maxY = bounds.max.y, - zBottom = contour.bottom ? state.zBottom : 0, - zMin = Math.max(bounds.min.z, zBottom) + 0.0001, + zBottom = contour.bottom ? workarea.bottom_z : 0, + zMin = workarea.bottom_z + 0.0001, //Math.max(bounds.min.z, zBottom) + 0.0001, boundsX = maxX - minX, boundsY = maxY - minY, inside = contour.inside,