complete first iteration of pocket + contour

This commit is contained in:
Stewart Allen 2022-10-10 11:35:54 -04:00
commit 943b4e0d7c
3 changed files with 60 additions and 35 deletions

View file

@ -146,6 +146,15 @@ class Topo {
return Math.max(mz, 0);
}
// export z probe function
const rx = stepsx / boundsX;
const ry = stepsx / boundsX;
this.toolAtXY = function(px, py) {
px = Math.round(rx * (px - minX));
py = Math.round(ry * (py - minY));
return toolAtZ(px, py);
};
function push_point(x,y,z) {
const newP = newPoint(x,y,z);
// todo: merge co-linear, not just co-planar