This approach keeps things in the interpreter.  The old
_setup.cutter_comp_orientation field is removed and replaced by a
total of 4 getters and setters, so that any site can get/set the
orientation using the traditional linuxcnc numbering or gcode
numbering based on the inifile flag.

In the interpreter module, there are two new attributes
(cutter_comp_orientation_linuxcnc and
cutter_comp_orientation_gcode).  The original
cutter_comp_orientation variable will now show a warning when used,
but it behaves as it always has, returning a linuxcnc orientation
number.

The new test is a duplicate of the original lathe cutter comp test,
but using the new orientation setting.

Since the GUIs have to get orientation information from the tool
table, and those values are in gcode numbering, new logic is needed
in gremlin and axis to correctly show lathe tools.

The documentation needs to be written.

Signed-off-by: Jeff Epler <jep...@unpythonic.net>
---
I'm not sure which approach is better, changing values when they get
put in the in-memory tool table, or changing them close to where
they are used.  My patch tries the second approach.

The new test should be useful as a test for either approach.

 lib/python/rs274/glcanon.py           | 11 ++++++
 src/emc/rs274ngc/interp_convert.cc    |  4 +-
 src/emc/rs274ngc/interp_internal.hh   | 28 +++++++++++++-
 src/emc/rs274ngc/interp_queue.cc      |  4 +-
 src/emc/rs274ngc/interp_setup.cc      |  2 +-
 src/emc/rs274ngc/interpmodule.cc      | 34 +++++++++++++++--
 src/emc/rs274ngc/rs274ngc_pre.cc      |  2 +
 src/emc/usr_intf/axis/scripts/axis.py |  3 ++
 src/emc/usr_intf/gremlin/gremlin.py   |  3 ++
 tests/ccomp/lathe-comp-std/expected   | 69 +++++++++++++++++++++++++++++++++++
 tests/ccomp/lathe-comp-std/test.ini   |  2 +
 tests/ccomp/lathe-comp-std/test.ngc   | 49 +++++++++++++++++++++++++
 tests/ccomp/lathe-comp-std/test.sh    |  3 ++
 tests/ccomp/lathe-comp-std/test.tbl   | 21 +++++++++++
 14 files changed, 226 insertions(+), 9 deletions(-)
 create mode 100644 tests/ccomp/lathe-comp-std/expected
 create mode 100644 tests/ccomp/lathe-comp-std/test.ini
 create mode 100644 tests/ccomp/lathe-comp-std/test.ngc
 create mode 100644 tests/ccomp/lathe-comp-std/test.sh
 create mode 100644 tests/ccomp/lathe-comp-std/test.tbl

diff --git a/lib/python/rs274/glcanon.py b/lib/python/rs274/glcanon.py
index 6d907d6..c505c75 100644
--- a/lib/python/rs274/glcanon.py
+++ b/lib/python/rs274/glcanon.py
@@ -1495,7 +1495,17 @@ class GlCanonDraw:
         glEndList()
         gluDeleteQuadric(q)
 
+    lathe_orientation_map = {
+            2: 3, 3: 2,
+            1: 4, 4: 1,
+            6: 8, 8: 6,
+    }
 
+    def fix_lathe_orientation(self, o):
+        if self.is_tool_orient_standard():
+            o = self.lathe_orientation_map.get(o, o)
+        return o
+            
     lathe_shapes = [
         None,                           # 0
         (1,-1), (1,1), (-1,1), (-1,-1), # 1..4
@@ -1505,6 +1515,7 @@ class GlCanonDraw:
     def lathetool(self, current_tool):
         glDepthFunc(GL_ALWAYS)
         diameter, frontangle, backangle, orientation = current_tool[-4:]
+        orientation = self.fix_lathe_orientation(orientation)
         w = 3/8.
 
         radius = self.to_internal_linear_unit(diameter) / 2.
diff --git a/src/emc/rs274ngc/interp_convert.cc 
b/src/emc/rs274ngc/interp_convert.cc
index 8324123..73a2382 100644
--- a/src/emc/rs274ngc/interp_convert.cc
+++ b/src/emc/rs274ngc/interp_convert.cc
@@ -714,7 +714,7 @@ int Interp::convert_arc_comp1(int move,  //!< either G_2 
(cw arc) or G_3 (ccw ar
         NCE_BUG_IN_TOOL_RADIUS_COMP);
 
     // need this move for lathes to move the tool origin first.  otherwise, 
the arc isn't an arc.
-    if (settings->cutter_comp_orientation != 0 && 
settings->cutter_comp_orientation != 9) {
+    if (settings->get_cutter_comp_orientation_linuxcnc() != 0 && 
settings->get_cutter_comp_orientation_linuxcnc() != 9) {
         enqueue_STRAIGHT_FEED(settings, block->line_number, 
                               0, 0, 0,
                               cx, cy, cz,
@@ -1949,7 +1949,7 @@ int Interp::convert_cutter_compensation_on(int side,     
//!< side of path cutte
 #endif
 
   settings->cutter_comp_radius = radius;
-  settings->cutter_comp_orientation = orientation;
+  settings->set_cutter_comp_orientation_gcode(orientation);
   settings->cutter_comp_side = side;
   return INTERP_OK;
 }
diff --git a/src/emc/rs274ngc/interp_internal.hh 
b/src/emc/rs274ngc/interp_internal.hh
index f2eb3a9..f91bb15 100644
--- a/src/emc/rs274ngc/interp_internal.hh
+++ b/src/emc/rs274ngc/interp_internal.hh
@@ -648,7 +648,32 @@ typedef struct setup_struct
   double current_y;             // current Y-axis position
   double current_z;             // current Z-axis position
   double cutter_comp_radius;    // current cutter compensation radius
-  int cutter_comp_orientation;  // current cutter compensation tool orientation
+  int get_cutter_comp_orientation_gcode() {
+    int o = _cutter_comp_orientation;
+    if(tool_orient_standard)
+      switch(o) {
+      case 2: o = 3; break; case 3: o = 2; break;
+      case 1: o = 4; break; case 4: o = 1; break;
+      case 6: o = 8; break; case 8: o = 6; break;
+      }
+    return o;
+  }
+  int get_cutter_comp_orientation_linuxcnc() {
+    return _cutter_comp_orientation;
+  }
+  void set_cutter_comp_orientation_gcode(int o) {
+    if(tool_orient_standard)
+      switch(o) {
+      case 2: o = 3; break; case 3: o = 2; break;
+      case 1: o = 4; break; case 4: o = 1; break;
+      case 6: o = 8; break; case 8: o = 6; break;
+      }
+    _cutter_comp_orientation = o;
+  }
+  void set_cutter_comp_orientation_linuxcnc(int o) {
+    _cutter_comp_orientation = o;
+  };
+  int _cutter_comp_orientation;  // current cutter compensation tool 
orientation
   int cutter_comp_side;         // current cutter compensation side
   double cycle_cc;              // cc-value (normal) for canned cycles
   double cycle_i;               // i-value for canned cycles
@@ -710,6 +735,7 @@ typedef struct setup_struct
   CANON_DIRECTION spindle_turning;      // direction spindle is turning
   char stack[STACK_LEN][STACK_ENTRY_LEN];      // stack of calls for error 
reporting
   int stack_index;              // index into the stack
+  int tool_orient_standard;     // tool orientation (0=linuxcnc, 1="industry 
standard")
   EmcPose tool_offset;          // tool length offset
   int pockets_max;                 // number of pockets in carousel (including 
pocket 0, the spindle)
   CANON_TOOL_TABLE tool_table[CANON_POCKETS_MAX];      // index is pocket 
number
diff --git a/src/emc/rs274ngc/interp_queue.cc b/src/emc/rs274ngc/interp_queue.cc
index ac5a93e..59cfb6e 100644
--- a/src/emc/rs274ngc/interp_queue.cc
+++ b/src/emc/rs274ngc/interp_queue.cc
@@ -29,7 +29,7 @@ static int debug_qc = 0;
 // those with radius 0 (a point) do not need any translation.
 
 static double latheorigin_x(setup_pointer settings, double x) {
-    int o = settings->cutter_comp_orientation;
+    int o = settings->get_cutter_comp_orientation_linuxcnc();
     double r = settings->cutter_comp_radius;
     if(settings->plane != CANON_PLANE_XZ) return x;
 
@@ -39,7 +39,7 @@ static double latheorigin_x(setup_pointer settings, double x) 
{
 }
 
 static double latheorigin_z(setup_pointer settings, double z) {
-    int o = settings->cutter_comp_orientation;
+    int o = settings->get_cutter_comp_orientation_linuxcnc();
     double r = settings->cutter_comp_radius;
     if(settings->plane != CANON_PLANE_XZ) return z;
 
diff --git a/src/emc/rs274ngc/interp_setup.cc b/src/emc/rs274ngc/interp_setup.cc
index 2120991..2cdf9ff 100644
--- a/src/emc/rs274ngc/interp_setup.cc
+++ b/src/emc/rs274ngc/interp_setup.cc
@@ -65,7 +65,7 @@ setup_struct::setup_struct() :
     current_y (0.0),
     current_z (0.0),
     cutter_comp_radius (0.0),
-    cutter_comp_orientation(0),
+    _cutter_comp_orientation(0),
     cutter_comp_side(0),
     cycle_cc (0.0),
     cycle_i (0.0),
diff --git a/src/emc/rs274ngc/interpmodule.cc b/src/emc/rs274ngc/interpmodule.cc
index e5e9683..88dc08c 100644
--- a/src/emc/rs274ngc/interpmodule.cc
+++ b/src/emc/rs274ngc/interpmodule.cc
@@ -618,11 +618,35 @@ static inline int get_current_pocket (Interp &interp)  {
 static inline void set_current_pocket(Interp &interp, int value)  {
     interp._setup.current_pocket = value;
 }
-static inline int get_cutter_comp_orientation (Interp &interp)  {
-    return interp._setup.cutter_comp_orientation;
+static inline int get_cutter_comp_orientation_linuxcnc (Interp &interp)  {
+    return interp._setup.get_cutter_comp_orientation_linuxcnc();
+}
+static inline int get_cutter_comp_orientation_gcode (Interp &interp)  {
+    return interp._setup.get_cutter_comp_orientation_gcode();
+}
+static inline int get_cutter_comp_orientation(Interp &interp) {
+    PyErr_WarnEx(PyExc_UserWarning,
+    "cutter_comp_orientation is deprecated.  "
+    "Use cutter_comp_orientation_linuxcnc for values compatible with "
+    "LinuxCNC 2.7, or cutter_comp_orientation_gcode for values which "
+    "match gcode depending on the inifile setting "
+    "[RS274NGC]TOOL_ORIENT_STANDARD", 1);
+    return get_cutter_comp_orientation_linuxcnc(interp);
+}
+static inline void set_cutter_comp_orientation_linuxcnc(Interp &interp, int 
value)  {
+    interp._setup.set_cutter_comp_orientation_gcode(value);
+}
+static inline void set_cutter_comp_orientation_gcode(Interp &interp, int 
value)  {
+    interp._setup.set_cutter_comp_orientation_gcode(value);
 }
 static inline void set_cutter_comp_orientation(Interp &interp, int value)  {
-    interp._setup.cutter_comp_orientation = value;
+    PyErr_WarnEx(PyExc_UserWarning,
+    "cutter_comp_orientation is deprecated.  "
+    "Use cutter_comp_orientation_linuxcnc for values compatible with "
+    "LinuxCNC 2.7, or cutter_comp_orientation_gcode for values which "
+    "match gcode depending on the inifile setting "
+    "[RS274NGC]TOOL_ORIENT_STANDARD", 1);
+    set_cutter_comp_orientation_linuxcnc(interp, value);
 }
 static inline int get_cutter_comp_side (Interp &interp)  {
     return interp._setup.cutter_comp_side;
@@ -925,6 +949,10 @@ BOOST_PYTHON_MODULE(interpreter) {
        .add_property("current_pocket", &get_current_pocket, 
&set_current_pocket)
        .add_property("cutter_comp_orientation",
                      &get_cutter_comp_orientation, 
&set_cutter_comp_orientation)
+       .add_property("cutter_comp_orientation_linuxcnc",
+                     &get_cutter_comp_orientation_linuxcnc, 
&set_cutter_comp_orientation_linuxcnc)
+       .add_property("cutter_comp_orientation_gcode",
+                     &get_cutter_comp_orientation_gcode, 
&set_cutter_comp_orientation_gcode)
        .add_property("cutter_comp_side", &get_cutter_comp_side, 
&set_cutter_comp_side)
        .add_property("cycle_il_flag", &get_cycle_il_flag, &set_cycle_il_flag)
        .add_property("cycle_l", &get_cycle_l, &set_cycle_l)
diff --git a/src/emc/rs274ngc/rs274ngc_pre.cc b/src/emc/rs274ngc/rs274ngc_pre.cc
index 53231d2..1ab230e 100644
--- a/src/emc/rs274ngc/rs274ngc_pre.cc
+++ b/src/emc/rs274ngc/rs274ngc_pre.cc
@@ -856,6 +856,8 @@ int Interp::init()
           inifile.Find(&_setup.c_indexer, "LOCKING_INDEXER", "AXIS_5");
           inifile.Find(&_setup.orient_offset, "ORIENT_OFFSET", "RS274NGC");
 
+          inifile.Find(&_setup.tool_orient_standard, "TOOL_ORIENT_STANDARD", 
"RS274NGC");
+
           inifile.Find(&_setup.debugmask, "DEBUG", "EMC");
 
          _setup.debugmask |= EMC_DEBUG_UNCONDITIONAL;
diff --git a/src/emc/usr_intf/axis/scripts/axis.py 
b/src/emc/usr_intf/axis/scripts/axis.py
index 9611a27..c638161 100755
--- a/src/emc/usr_intf/axis/scripts/axis.py
+++ b/src/emc/usr_intf/axis/scripts/axis.py
@@ -419,6 +419,8 @@ class MyOpengl(GlCanonDraw, Opengl):
     def get_joints_mode(self): return joints_mode()
     def get_current_tool(self): return current_tool
     def is_lathe(self): return lathe
+    def is_tool_orient_standard(self):
+        return tool_orient_standard
     def get_show_commanded(self): return vars.display_type.get()
     def get_show_rapids(self): return vars.show_rapids.get()
     def get_geometry(self): return geometry
@@ -2962,6 +2964,7 @@ vars.coord_type.set(inifile.find("DISPLAY", 
"POSITION_OFFSET") == "RELATIVE")
 vars.display_type.set(inifile.find("DISPLAY", "POSITION_FEEDBACK") == 
"COMMANDED")
 coordinate_display = inifile.find("DISPLAY", "POSITION_UNITS")
 lathe = bool(inifile.find("DISPLAY", "LATHE"))
+tool_orient_standard = bool(inifile.find("RS274NGC", "TOOL_ORIENT_STANDARD"))
 foam = bool(inifile.find("DISPLAY", "FOAM"))
 editor = inifile.find("DISPLAY", "EDITOR")
 vars.has_editor.set(editor is not None)
diff --git a/src/emc/usr_intf/gremlin/gremlin.py 
b/src/emc/usr_intf/gremlin/gremlin.py
index b3fd53f..3558e87 100755
--- a/src/emc/usr_intf/gremlin/gremlin.py
+++ b/src/emc/usr_intf/gremlin/gremlin.py
@@ -141,6 +141,8 @@ class Gremlin(gtk.gtkgl.widget.DrawingArea, glnav.GlNavBase,
         self.grid_size = 0.0
         temp = inifile.find("DISPLAY", "LATHE")
         self.lathe_option = bool(temp == "1" or temp == "True" or temp == 
"true" )
+        temp = int(inifile.find("RS274NGC", "TOOL_ORIENT_STANDARD") or "")
+        self.lathe_option = bool(temp)
         self.foam_option = bool(inifile.find("DISPLAY", "FOAM"))
         self.show_offsets = False
         self.use_default_controls = True
@@ -296,6 +298,7 @@ class Gremlin(gtk.gtkgl.widget.DrawingArea, glnav.GlNavBase,
         return view_dict.get(self.current_view, 3)
 
     def is_lathe(self): return self.lathe_option
+    def is_tool_orient_standard(self): return self.tool_orient_option
     def is_foam(self): return self.foam_option
     def get_current_tool(self):
         for i in self.stat.tool_table:
diff --git a/tests/ccomp/lathe-comp-std/expected 
b/tests/ccomp/lathe-comp-std/expected
new file mode 100644
index 0000000..169346c
--- /dev/null
+++ b/tests/ccomp/lathe-comp-std/expected
@@ -0,0 +1,69 @@
+ N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
+ N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_XY_ROTATION(0.0000)
+ N..... SET_FEED_REFERENCE(CANON_XYZ)
+ N..... SET_FEED_RATE(30.0000)
+ N..... SELECT_PLANE(CANON_PLANE_XZ)
+ N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES)
+ N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
+ N..... SET_NAIVECAM_TOLERANCE(0.0000)
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 
0.0000 0.0000 0.0000)
+ N..... SELECT_POCKET(0)
+ N..... START_CHANGE()
+ N..... STOP_SPINDLE_TURNING()
+ N..... CHANGE_TOOL(0)
+ N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... COMMENT("interpreter: cutter radius compensation off")
+ N..... STRAIGHT_FEED(0.1000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... ARC_FEED(0.1000, 0.0000, 0.1000, 0.1000, 1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... STRAIGHT_FEED(0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000)
+ N..... ARC_FEED(1.2500, -0.2500, 1.0000, -0.2500, -1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... ARC_FEED(1.5000, -0.5000, 1.5000, -0.2500, 1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... STRAIGHT_FEED(-0.5000, 0.0000, 1.7500, 0.0000, 0.0000, 0.0000)
+ N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 1.7500, 0.0000, 0.0000, 0.0000)
+ N..... SELECT_POCKET(2)
+ N..... START_CHANGE()
+ N..... STOP_SPINDLE_TURNING()
+ N..... CHANGE_TOOL(2)
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 
0.0000 0.0000 0.0000)
+ N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... COMMENT("interpreter: cutter radius compensation on left")
+ N..... STRAIGHT_FEED(0.0500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... ARC_FEED(0.0500, 0.0000, 0.0500, 0.0500, 1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... STRAIGHT_FEED(0.0000, 0.0000, 0.9500, 0.0000, 0.0000, 0.0000)
+ N..... ARC_FEED(1.2500, -0.3000, 0.9500, -0.3000, -1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... ARC_FEED(1.4500, -0.5000, 1.4500, -0.3000, 1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... STRAIGHT_FEED(-0.5000, 0.0000, 1.7000, 0.0000, 0.0000, 0.0000)
+ N..... COMMENT("interpreter: cutter radius compensation off")
+ N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 1.7500, 0.0000, 0.0000, 0.0000)
+ N..... SELECT_POCKET(7)
+ N..... START_CHANGE()
+ N..... STOP_SPINDLE_TURNING()
+ N..... CHANGE_TOOL(7)
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 
0.0000 0.0000 0.0000)
+ N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 1.8500, 0.0000, 0.0000, 0.0000)
+ N..... STRAIGHT_TRAVERSE(-0.3000, 0.0000, 1.8500, 0.0000, 0.0000, 0.0000)
+ N..... COMMENT("interpreter: cutter radius compensation on right")
+ N..... STRAIGHT_FEED(-0.4000, 0.0000, 1.7500, 0.0000, 0.0000, 0.0000)
+ N..... ARC_FEED(1.7000, -0.4500, 1.7000, -0.4000, -1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... STRAIGHT_FEED(-0.4500, 0.0000, 1.4500, 0.0000, 0.0000, 0.0000)
+ N..... ARC_FEED(1.2500, -0.2500, 1.4500, -0.2500, -1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... ARC_FEED(0.9500, 0.0500, 0.9500, -0.2500, 1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... STRAIGHT_FEED(0.0500, 0.0000, 0.0500, 0.0000, 0.0000, 0.0000)
+ N..... ARC_FEED(0.0000, 0.1000, 0.0500, 0.1000, -1, 0.0000, 0.0000, 0.0000, 
0.0000)
+ N..... COMMENT("interpreter: cutter radius compensation off")
+ N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 
0.0000 0.0000 0.0000)
+ N..... SELECT_POCKET(0)
+ N..... START_CHANGE()
+ N..... STOP_SPINDLE_TURNING()
+ N..... CHANGE_TOOL(0)
+ N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_XY_ROTATION(0.0000)
+ N..... SELECT_PLANE(CANON_PLANE_XY)
+ N..... SET_FEED_MODE(0)
+ N..... SET_FEED_RATE(0.0000)
+ N..... STOP_SPINDLE_TURNING()
+ N..... SET_SPINDLE_MODE(0.0000)
+ N..... PROGRAM_END()
diff --git a/tests/ccomp/lathe-comp-std/test.ini 
b/tests/ccomp/lathe-comp-std/test.ini
new file mode 100644
index 0000000..a73ea37
--- /dev/null
+++ b/tests/ccomp/lathe-comp-std/test.ini
@@ -0,0 +1,2 @@
+[RS274NGC]
+TOOL_ORIENT_STANDARD = 1
diff --git a/tests/ccomp/lathe-comp-std/test.ngc 
b/tests/ccomp/lathe-comp-std/test.ngc
new file mode 100644
index 0000000..fc0b269
--- /dev/null
+++ b/tests/ccomp/lathe-comp-std/test.ngc
@@ -0,0 +1,49 @@
+g20 g64 g18 f30
+
+g49
+t0 m6
+
+g0x.3z0
+g40
+g1x.1
+g3x0z.1r.1
+g1z1
+g2r.25x-.25z1.25
+g3r.25x-.5z1.5
+g1z1.75
+g0x.3
+
+t2 m6
+g43 h2
+
+g0z0
+g41
+g1x.1
+g3x0z.1r.1
+g1z1
+g2r.25x-.25z1.25
+g3r.25x-.5z1.5
+g1z1.75
+g40
+g0x.3
+
+t7 m6
+g43 h9
+
+g0z1.85
+g0x-.3
+g42
+g1x-.4
+g2x-.5z1.75r.1
+g1z1.5
+g2r.25x-.25z1.25
+g3r.25x0z1
+g1z.1
+g2r.1x.1z0
+g40
+g0x.3
+
+g49
+t0 m6
+
+m2
diff --git a/tests/ccomp/lathe-comp-std/test.sh 
b/tests/ccomp/lathe-comp-std/test.sh
new file mode 100644
index 0000000..1ee1796
--- /dev/null
+++ b/tests/ccomp/lathe-comp-std/test.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+rs274 -i test.ini -t test.tbl -g test.ngc | awk '{$1=""; print}'
+exit ${PIPESTATUS[0]}
diff --git a/tests/ccomp/lathe-comp-std/test.tbl 
b/tests/ccomp/lathe-comp-std/test.tbl
new file mode 100644
index 0000000..a56b6ac
--- /dev/null
+++ b/tests/ccomp/lathe-comp-std/test.tbl
@@ -0,0 +1,21 @@
+POCKET FMS ZOFFSET XOFFSET DIAMETER FRONTANGLE BACKANGLE ORIENTATION # LATHE
+
+1      1   0.0     0.0     0.1      95.0      155.0       4
+2      2   0.0     0.0     0.1      85.0       25.0       3
+3      3   0.0     0.0     0.1     275.0      335.0       2
+4      4   0.0     0.0     0.1     265.0      205.0       1
+5      5   0.0     0.0     0.1     210.0      150.0       5
+6      6   0.5     0.5     0.1     120.0       60.0       8
+7      7   0.0     0.0     0.1     -30.0       30.0       7
+8      8   0.0     0.0     0.1     240.0      300.0       6
+9      9   0.0     0.0     0.1       0.0        0.0       9
+10    10   0.0     0.0     0.0       0.0        0.0       0
+11    11   0.0     0.0     0.0      95.0      155.0       4
+12    12   0.0     0.0     0.0      85.0       25.0       3
+13    13   0.0     0.0     0.0     275.0      335.0       2
+14    14   0.0     0.0     0.0     265.0      205.0       1
+15    15   0.0     0.0     0.0     210.0      150.0       5
+16    16   0.0     0.0     0.0     120.0       60.0       8
+17    17   0.0     0.0     0.0     -30.0       30.0       7
+18    18   0.0     0.0     0.0     240.0      300.0       6
+19    19   0.0     0.0     0.0       0.0        0.0       9
-- 
2.6.4

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to