change the way contouring uses tool diameter and offset

This commit is contained in:
Stewart Allen 2022-10-10 19:24:16 -04:00
commit 3252a42079
4 changed files with 19 additions and 11 deletions

View file

@ -155,10 +155,10 @@ class Topo {
return toolAtZ(px, py);
};
this.zAtXY = function(px, py) {
px = Math.round(rx * (px - minX));
py = Math.round(ry * (py - minY));
return topo.data[px * stepsy + py] || zMin;
const zAtXY = this.zAtXY = function(px, py) {
let ix = Math.round(rx * (px - minX));
let iy = Math.round(ry * (py - minY));
return topo.data[ix * stepsy + iy] || zMin;
};
function push_point(x,y,z) {