fix ball mill profile

This commit is contained in:
Stewart Allen 2020-11-24 20:18:02 -05:00
commit dd315aac40
3 changed files with 12 additions and 5 deletions

View file

@ -367,11 +367,12 @@ self.kiri.loader.push(function() {
}
tool = new CAM.Tool({ tools }, undefined, toolnum);
tool.generateProfile(rez);
const flen = tool.fluteLength() || 30;
const flen = tool.fluteLength() || 15;
const slen = tool.shaftLength() || 15;
// const frad = tool.fluteDiameter() / 2;
const prof = tool.profile;
const { size, pix } = tool.profileDim;
const { pos, ind } = createGrid(pix, pix, {x:size, y:size, z:flen}, rez);
const { pos, ind } = createGrid(pix, pix, {x:size, y:size, z:flen+slen}, rez);
const mid = Math.floor(pix/2);
// deform mesh to fit tool profile
for (let i=0, il=prof.length; i < il; ) {