From aa27c7b0391a1712302aba76a8567a43dc200573 Mon Sep 17 00:00:00 2001
From: Neil Gershenfeld <gersh@cba.mit.edu>
Date: Fri, 18 Jan 2019 09:49:27 -0500
Subject: [PATCH] start 2.5D

---
 files.html                                       |  3 +--
 modules/index.js                                 |  3 +--
 modules/processes/mill/raster/{3D/rough => 2.5D} | 14 ++++----------
 3 files changed, 6 insertions(+), 14 deletions(-)
 rename modules/processes/mill/raster/{3D/rough => 2.5D} (98%)

diff --git a/files.html b/files.html
index 3b1336c..5c37b56 100644
--- a/files.html
+++ b/files.html
@@ -168,9 +168,8 @@
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='./modules/processes/cut/raster'>raster</a><br>
 <i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mill</i><br>
 <i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raster</i><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='./modules/processes/mill/raster/2.5D'>2.5D</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='./modules/processes/mill/raster/2D'>2D</a><br>
-<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3D</i><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='./modules/processes/mill/raster/3D/rough'>rough</a><br>
 <i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;read</i><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='./modules/read/png'>png</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='./modules/read/stl'>stl</a><br>
diff --git a/modules/index.js b/modules/index.js
index 7cc0da1..de206bc 100644
--- a/modules/index.js
+++ b/modules/index.js
@@ -138,9 +138,8 @@ module_label('   cut')
 module_menu('      raster','modules/processes/cut/raster')
 module_label('   mill')
 module_label('      raster')
+module_menu('         2.5D','modules/processes/mill/raster/2.5D')
 module_menu('         2D','modules/processes/mill/raster/2D')
-module_label('         3D')
-module_menu('            rough','modules/processes/mill/raster/3D/rough')
 module_label('read')
 module_menu('   png','modules/read/png')
 module_menu('   stl','modules/read/stl')
diff --git a/modules/processes/mill/raster/3D/rough b/modules/processes/mill/raster/2.5D
similarity index 98%
rename from modules/processes/mill/raster/3D/rough
rename to modules/processes/mill/raster/2.5D
index 1d137b4..359bd2b 100644
--- a/modules/processes/mill/raster/3D/rough
+++ b/modules/processes/mill/raster/2.5D
@@ -1,8 +1,8 @@
 //
-// mill raster 3D rough
+// mill raster 2.5D
 //
 // Neil Gershenfeld
-// (c) Massachusetts Institute of Technology 2018
+// (c) Massachusetts Institute of Technology 2019
 //
 // This work may be reproduced, modified, distributed, performed, and
 // displayed for any purpose, but must acknowledge the mods
@@ -20,7 +20,7 @@ var mod = {}
 //
 // name
 //
-var name = 'mill raster 3D rough'
+var name = 'mill raster 2.5D'
 //
 // initialization
 //
@@ -94,11 +94,6 @@ var outputs = {
          mods.output(mod,'offset',pixels)
          }
       },
-   depth:{type:'',
-      event:function(){
-         mods.output(mod,'depth',0)
-         }
-      },
    toolpath:{type:'',
       event:function(){
          cmd = {}
@@ -454,8 +449,7 @@ function add_depth() {
    var newpath = []
    for (var seg = 0; seg < mod.path.length; ++seg) {
       var depth = cut
-      if ((mod.path[seg][0][0] == mod.path[seg][mod.path[seg].length-1][0])
-         && (mod.path[seg][0][0] == mod.path[seg][mod.path[seg].length-1][0])) {
+      if (mod.path[seg][0][0] == mod.path[seg][mod.path[seg].length-1][0]) {
          var newseg = []
          while (depth <= max) {
             var idepth = -Math.round(mod.dpi*depth)
-- 
GitLab