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;