add CAM 3D engraving and marking with the pocket contouring operation

This commit is contained in:
Stewart Allen 2022-10-10 18:01:43 -04:00
commit b7f8ce5b52
7 changed files with 30 additions and 8 deletions

View file

@ -155,6 +155,12 @@ 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;
};
function push_point(x,y,z) {
const newP = newPoint(x,y,z);
// todo: merge co-linear, not just co-planar