Skip to content
Snippets Groups Projects
Commit c8ea4dcf authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

ready for stepover

parent 10aa5d73
Branches
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ var outputs = { ...@@ -53,6 +53,7 @@ var outputs = {
obj.zmax = mod.zmax obj.zmax = mod.zmax
obj.width = mod.img.width obj.width = mod.img.width
obj.height = mod.img.height obj.height = mod.img.height
obj.mmunits = mod.mmunits.value
mods.output(mod,'map',obj) mods.output(mod,'map',obj)
}}} }}}
// //
......
...@@ -36,16 +36,17 @@ var inputs = { ...@@ -36,16 +36,17 @@ var inputs = {
map:{type:'',label:'height map', map:{type:'',label:'height map',
event:function(evt){ event:function(evt){
mod.map = evt.detail.map mod.map = evt.detail.map
mod.width = evt.detail.width
mod.height = evt.detail.height
mod.depth = Math.floor((mod.zmax-mod.zmin)*mod.width/(mod.xmax-mod.xmin))
mod.xmin = evt.detail.xmin mod.xmin = evt.detail.xmin
mod.xmax = evt.detail.xmax mod.xmax = evt.detail.xmax
mod.ymin = evt.detail.ymin mod.ymin = evt.detail.ymin
mod.ymax = evt.detail.ymax mod.ymax = evt.detail.ymax
mod.zmin = evt.detail.zmin mod.zmin = evt.detail.zmin
mod.zmax = evt.detail.zmax mod.zmax = evt.detail.zmax
mod.dpi = mod.width/(mod.xmax-mod.xmin) mod.width = evt.detail.width
mod.height = evt.detail.height
mod.depth = Math.floor((mod.zmax-mod.zmin)*mod.width/(mod.xmax-mod.xmin))
mod.mmunits = evt.detail.mmunits
mod.dpi = mod.width/(mod.mmunits*(mod.xmax-mod.xmin)/25.4)
var ctx = mod.img.getContext("2d") var ctx = mod.img.getContext("2d")
ctx.canvas.width = mod.width ctx.canvas.width = mod.width
ctx.canvas.height = mod.height ctx.canvas.height = mod.height
...@@ -64,7 +65,6 @@ var outputs = { ...@@ -64,7 +65,6 @@ var outputs = {
obj.height = mod.height obj.height = mod.height
obj.depth = mod.depth obj.depth = mod.depth
mods.output(mod,'toolpath',obj) mods.output(mod,'toolpath',obj)
console.log(mod.path[0].length)
}}} }}}
// //
// interface // interface
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment