summaryrefslogtreecommitdiff
path: root/tests/interp/g10/g10-l1-l10
diff options
context:
space:
mode:
authorChris Radek <chris@timeguy.com>2011-01-03 16:16:30 -0600
committerChris Radek <chris@timeguy.com>2011-01-03 22:40:18 -0600
commit5f74110d4f32f15c1e4f5207ad3b899ac8f7bbb9 (patch)
tree8c1f48ad917377fa40242c418bdcf24d21a9e04c /tests/interp/g10/g10-l1-l10
parentfd470e781b506074a021dad897f02c6d16da670c (diff)
downloadlinuxcnc-5f74110d4f32f15c1e4f5207ad3b899ac8f7bbb9.tar.gz
linuxcnc-5f74110d4f32f15c1e4f5207ad3b899ac8f7bbb9.zip
Tests for G10 L1 and G10 L10
Diffstat (limited to 'tests/interp/g10/g10-l1-l10')
-rw-r--r--tests/interp/g10/g10-l1-l10/expected109
-rw-r--r--tests/interp/g10/g10-l1-l10/test.ngc70
-rwxr-xr-xtests/interp/g10/g10-l1-l10/test.sh3
-rw-r--r--tests/interp/g10/g10-l1-l10/test.tbl1
4 files changed, 183 insertions, 0 deletions
diff --git a/tests/interp/g10/g10-l1-l10/expected b/tests/interp/g10/g10-l1-l10/expected
new file mode 100644
index 000000000..31c8abf2a
--- /dev/null
+++ b/tests/interp/g10/g10-l1-l10/expected
@@ -0,0 +1,109 @@
+ 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..... USE_LENGTH_UNITS(CANON_UNITS_INCHES)
+ N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_XY_ROTATION(0.0000)
+ N..... COMMENT("interpreter: continuing to use same coordinate system")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SELECT_POCKET(1)
+ N..... STOP_SPINDLE_TURNING()
+ N..... CHANGE_TOOL(1)
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... USE_TOOL_LENGTH_OFFSET(1.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... MESSAGE(" should be 1 0 0: 1.000000 0.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 2.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 2.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be 1 2 0: 1.000000 2.000000 0.000000")
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be 1 0 0: 1.000000 0.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 2.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 2.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be 1 2 0: 1.000000 2.000000 0.000000")
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SELECT_POCKET(1)
+ N..... STOP_SPINDLE_TURNING()
+ N..... CHANGE_TOOL(1)
+ 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.1000, 0.2000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... USE_TOOL_LENGTH_OFFSET(-0.9000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... MESSAGE(" should be -.9 0 0: -0.900000 0.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 -1.8000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 -1.8000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be -.9 -1.8 0: -0.900000 -1.800000 0.000000")
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.1000 0.2000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.1000 0.2000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be .1 .2 0: 0.100000 0.200000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 0.2000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 0.2000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be -.9 0.2 0: -0.900000 0.200000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 -1.8000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 -1.8000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be -.9 -1.8 0: -0.900000 -1.800000 0.000000")
+ N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_XY_ROTATION(45.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..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SELECT_POCKET(1)
+ N..... STOP_SPINDLE_TURNING()
+ N..... CHANGE_TOOL(1)
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.7071 -0.7071 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.7071 -0.7071 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be -.707 -.707 0: -0.707107 -0.707107 0.000000")
+ N..... USE_TOOL_LENGTH_OFFSET(-0.7071 -0.7071 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... MESSAGE(" should be 1 0: 1.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.0000 -1.4142 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.0000 -1.4142 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be 0 -1.414 0: -0.000000 -1.414214 0.000000")
+ N..... MESSAGE(" should be 1 0: 1.000000 0.000000")
+ N..... USE_TOOL_LENGTH_OFFSET(-0.0000 -1.4142 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... MESSAGE(" should be 1 1: 1.000000 1.000000")
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_XY_ROTATION(45.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..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SELECT_POCKET(1)
+ N..... STOP_SPINDLE_TURNING()
+ N..... CHANGE_TOOL(1)
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000")
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.7071 -0.7071 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.7071 -0.7071 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.0000 -1.4142 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.0000 -1.4142 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0)
+ N..... MESSAGE(" should be 0 -1.414 0: -0.000000 -1.414214 0.000000")
+ N..... MESSAGE(" should be 1 0: 0.000000 0.000000")
+ N..... USE_TOOL_LENGTH_OFFSET(-0.0000 -1.4142 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... MESSAGE(" should be 1 1: 1.000000 1.000000")
+ N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
+ N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
+ N..... SET_XY_ROTATION(45.0000)
+ 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/interp/g10/g10-l1-l10/test.ngc b/tests/interp/g10/g10-l1-l10/test.ngc
new file mode 100644
index 000000000..c4fca2484
--- /dev/null
+++ b/tests/interp/g10/g10-l1-l10/test.ngc
@@ -0,0 +1,70 @@
+g20
+g10 l2 p1 x0 y0 z0
+g54
+g10 l1 p1 x0 y0 z0
+t1 m6 g43
+(debug, should be 0 0 0: #5401 #5402 #5403)
+g10 l1 p1 x1
+g43
+(debug, should be 1 0 0: #5401 #5402 #5403)
+g10 l1 p1 y2
+(debug, should be 1 2 0: #5401 #5402 #5403)
+g49
+g10 l1 p1 x0 y0
+(debug, should be 0 0 0: #5401 #5402 #5403)
+g10 l1 p1 x1
+(debug, should be 1 0 0: #5401 #5402 #5403)
+g10 l1 p1 y2
+(debug, should be 1 2 0: #5401 #5402 #5403)
+
+g49
+g10 l1 p1 x0 y0 z0
+t1 m6 g43
+g0 x.1 y.2
+(debug, should be 0 0 0: #5401 #5402 #5403)
+g10 l10 p1 x1
+g43
+(debug, should be -.9 0 0: #5401 #5402 #5403)
+g10 l10 p1 y2
+(debug, should be -.9 -1.8 0: #5401 #5402 #5403)
+g49
+g10 l10 p1 x0 y0
+(debug, should be .1 .2 0: #5401 #5402 #5403)
+g10 l10 p1 x1
+(debug, should be -.9 0.2 0: #5401 #5402 #5403)
+g10 l10 p1 y2
+(debug, should be -.9 -1.8 0: #5401 #5402 #5403)
+
+
+g10 l2 p1 r45
+g49
+g0 x0 y0
+g10 l10 p1 x0 y0 z0
+t1 m6 g43
+(debug, should be 0 0 0: #5401 #5402 #5403)
+g10 l10 p1 x1
+(debug, should be -.707 -.707 0: #5401 #5402 #5403)
+g43
+(debug, should be 1 0: #5420 #5421)
+g10 l10 p1 y1
+(debug, should be 0 -1.414 0: #5401 #5402 #5403)
+(debug, should be 1 0: #5420 #5421)
+g43
+(debug, should be 1 1: #5420 #5421)
+g49
+
+
+g10 l2 p1 r45
+g49
+g0 x0 y0
+g10 l10 p1 x0 y0 z0
+t1 m6 g43
+(debug, should be 0 0 0: #5401 #5402 #5403)
+g10 l10 p1 x1
+g10 l10 p1 y1
+(debug, should be 0 -1.414 0: #5401 #5402 #5403)
+(debug, should be 1 0: #5420 #5421)
+g43
+(debug, should be 1 1: #5420 #5421)
+g49
+m2
diff --git a/tests/interp/g10/g10-l1-l10/test.sh b/tests/interp/g10/g10-l1-l10/test.sh
new file mode 100755
index 000000000..8fa0c30de
--- /dev/null
+++ b/tests/interp/g10/g10-l1-l10/test.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+rs274 -g test.ngc -t test.tbl | awk '{$1=""; print}'
+exit ${PIPESTATUS[0]}
diff --git a/tests/interp/g10/g10-l1-l10/test.tbl b/tests/interp/g10/g10-l1-l10/test.tbl
new file mode 100644
index 000000000..36b4d8f84
--- /dev/null
+++ b/tests/interp/g10/g10-l1-l10/test.tbl
@@ -0,0 +1 @@
+t1 p1 x0 y0 z0