Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
mods
Commits
fb31a399
Commit
fb31a399
authored
Jan 26, 2020
by
Neil Gershenfeld
Browse files
3D finish offset working?
parent
4fc6fe74
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
modules/processes/mill/raster/3D
View file @
fb31a399
...
...
@@ -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 = x
cur
+(xoffset-toolmiddle)
var y = y
cur
+(yoffset-toolmiddle)
var x = x
next
+(xoffset-toolmiddle)
var y = y
next
+(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
...
...
programs/machines/ShopBot/mill 3D stl
View file @
fb31a399
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment