Commit fb31a399 by Neil Gershenfeld

### 3D finish offset working?

parent 4fc6fe74
 ... ... @@ -318,11 +318,11 @@ function calculate_path_worker() { // var xstart = 0 var ystart = h-1 var zstart = (map[ystart*w+xstart]-zmax)*w/(xmax-xmin) var zstart = Math.floor((map[ystart*w+xstart]-zmax)*w/(xmax-xmin)) path[0].push([xstart,h-1-ystart,zstart]) var xcur = 1 var ycur = h-1 var zcur = (map[ycur*w+xcur]-zmax)*w/(xmax-xmin) var zcur = Math.floor((map[ycur*w+xcur]-zmax)*w/(xmax-xmin)) var dx = 1 var dy = 0 while (1) { ... ... @@ -339,12 +339,15 @@ function calculate_path_worker() { // // find offset at next point // var znext = -Number.MAX_VALUE for (var xoffset = 0; xoffset < toolsize; ++xoffset) for (var yoffset = 0; yoffset < toolsize; ++yoffset) { var x = xcur+(xoffset-toolmiddle) var y = ycur+(yoffset-toolmiddle) var x = xnext+(xoffset-toolmiddle) var y = ynext+(yoffset-toolmiddle) var offset = tooloffset[yoffset*toolsize+xoffset] znext = (map[ynext*w+xnext]-zmax)*w/(xmax-xmin) var z = Math.floor((map[y*w+x]-zmax)*w/(xmax-xmin))-offset if (z > znext) znext = z } // // vectorize ... ...
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!