From 597fab96d2b34e2f4ef9444fee98525af8c326ac Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Thu, 7 Jan 2021 12:57:58 -0500 Subject: [PATCH] fix drill to observe z bottom --- src/mode/cam/ops.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mode/cam/ops.js b/src/mode/cam/ops.js index b299bce9..315982d6 100644 --- a/src/mode/cam/ops.js +++ b/src/mode/cam/ops.js @@ -757,7 +757,7 @@ slice(progress) { let { op, state } = this; - let { settings, widget, sliceAll, tslices, updateToolDiams } = state; + let { settings, widget, sliceAll, tslices, updateToolDiams, zBottom } = state; let drills = [], drillTool = new CAM.Tool(settings, op.tool), @@ -772,6 +772,7 @@ // for each slice, look for polygons with 98.5% circularity whose // area is within the tolerance of a circle matching the tool diameter tslices.forEach(function(slice) { + if (slice.z < zBottom) return; let inner = slice.topPolyInners([]); inner.forEach(function(poly) { if (poly.circularity() >= 0.985 && Math.abs(poly.area() - area) <= areaDelta) {