From ff50f110ddf74aa0d4030d6210432bcf9e6997e9 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 13 Feb 2023 15:47:39 -0500 Subject: [PATCH] add tool diameter to slice range to full carve part --- src/kiri-mode/cam/topo4.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/kiri-mode/cam/topo4.js b/src/kiri-mode/cam/topo4.js index 13926610..05fd61bd 100644 --- a/src/kiri-mode/cam/topo4.js +++ b/src/kiri-mode/cam/topo4.js @@ -58,6 +58,7 @@ class Topo4 { this.resolution = resolution; this.vertices = widget.getGeoVertices().toShared(); this.tool = tool.generateProfile(resolution).profile; + this.diam = tool.fluteDiameter(); onupdate(0, "lathe"); @@ -94,6 +95,10 @@ class Topo4 { range.max = Math.max(range.max, x); } + // add tool radius to slice min/max range ot fully carve part + range.min -= this.diam / 2; + range.max += this.diam / 2; + const shards = Math.ceil(Math.min(25, vertices.length / 27000)); const step = (range.max - range.min) / shards;