add tool diameter to slice range to full carve part
This commit is contained in:
parent
f5b90087d3
commit
ff50f110dd
1 changed files with 5 additions and 0 deletions
|
|
@ -58,6 +58,7 @@ class Topo4 {
|
||||||
this.resolution = resolution;
|
this.resolution = resolution;
|
||||||
this.vertices = widget.getGeoVertices().toShared();
|
this.vertices = widget.getGeoVertices().toShared();
|
||||||
this.tool = tool.generateProfile(resolution).profile;
|
this.tool = tool.generateProfile(resolution).profile;
|
||||||
|
this.diam = tool.fluteDiameter();
|
||||||
|
|
||||||
onupdate(0, "lathe");
|
onupdate(0, "lathe");
|
||||||
|
|
||||||
|
|
@ -94,6 +95,10 @@ class Topo4 {
|
||||||
range.max = Math.max(range.max, x);
|
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 shards = Math.ceil(Math.min(25, vertices.length / 27000));
|
||||||
const step = (range.max - range.min) / shards;
|
const step = (range.max - range.min) / shards;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue