diff options
Diffstat (limited to 'res')
| -rw-r--r-- | res/nist/canned-cycles.nc | 50 | ||||
| -rw-r--r-- | res/nist/expressions.nc | 48 | ||||
| -rw-r--r-- | res/nist/simple.nc | 62 | ||||
| -rw-r--r-- | res/shapes/circle.nc | 11 | ||||
| -rw-r--r-- | res/shapes/square.nc | 41 |
5 files changed, 212 insertions, 0 deletions
diff --git a/res/nist/canned-cycles.nc b/res/nist/canned-cycles.nc new file mode 100644 index 0000000..ce50390 --- /dev/null +++ b/res/nist/canned-cycles.nc | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | n0010 g20 (cycle test) | ||
| 2 | n0020 g17 g43 h1 m3 s1234 f16 (start in XY-plane) | ||
| 3 | n0030 g81 x3 y4 r0.2 z-1.1 | ||
| 4 | n0040 x1 y0 r0 g91 l3 (three more g81’s an inch apart) | ||
| 5 | n0050 y-2 r0.1 (one more g81) | ||
| 6 | n0060 g82 g90 x4 y5 r0.2 z-1.1 p0.6 | ||
| 7 | n0070 x2 z-3.0 (one more G82) | ||
| 8 | n0080 g91 x-2 y2 r0 l4 (four more g82’s) | ||
| 9 | n0090 g83 g90 x5 y6 r0.2 z-1.1 q0.21 | ||
| 10 | n0100 g84 x6 y7 r0.2 z-1.1 | ||
| 11 | n0110 g85 x7 y8 r0.2 z-1.1 | ||
| 12 | n0120 g86 x8 y9 r0.2 z-1.1 p902.61 | ||
| 13 | n0130 g87 x9 y10 r0.2 z-1.1 i0.231 j-0 k-3 | ||
| 14 | n0135 g91 x1 r0.2 z-1.1 i0.231 j-0 k-3 | ||
| 15 | n0140 g88 x10 y11 r0.2 z-1.1 p0.3333 | ||
| 16 | n0150 g89 x11 y12 r0.2 z-1.1 p1.272 | ||
| 17 | n0160 m4 (run spindle counterclockwise) | ||
| 18 | n0170 g86 x8 y9 r0.2 z-1.1 p902.61 | ||
| 19 | n0180 g87 x9 y10 r0.2 z-1.1 i0.231 j-0 k-3 | ||
| 20 | n0190 g88 x10 y11 r0.2 z-1.1 p0.3333 | ||
| 21 | |||
| 22 | n0220 g18 m3 (now run all cycles in the XZ-plane) | ||
| 23 | n0230 g81 z3 x4 r0.2 y-1.1 | ||
| 24 | n0240 g91 z1 x0 r0 l3 | ||
| 25 | n0260 g82 g90 z4 x5 r0.2 y-1.1 p0.6 | ||
| 26 | n0280 g91 z-2 x2 r0 l4 | ||
| 27 | n0290 g83 g90 z5 x6 r0.2 y-1.1 q0.21 | ||
| 28 | n0300 g84 z6 x7 r0.2 y-1.1 | ||
| 29 | n0310 g85 z7 x8 r0.2 y-1.1 | ||
| 30 | n0320 g86 z8 x9 r0.2 y-1.1 p902.61 | ||
| 31 | n0330 g87 z9 x10 r0.2 y-1.1 k0.231 i-0 j-3 | ||
| 32 | n0335 g91 z1 r0.2 y-1.1 k0.231 i-0 j-3 | ||
| 33 | n0340 g88 z10 x11 r0.2 y-1.1 p0.3333 | ||
| 34 | n0350 g89 z11 x12 r0.2 y-1.1 p1.272 | ||
| 35 | |||
| 36 | n0420 g19 (now run all cycles in the YZ-plane) | ||
| 37 | n0430 g81 y3 z4 r0.2 x-1.1 | ||
| 38 | n0440 g91 y1 z0 r0 l3 | ||
| 39 | n0460 g82 g90 y4 z5 r0.2 x-1.1 p0.6 | ||
| 40 | n0480 g91 y-2 z2 r0 l4 | ||
| 41 | n0490 g83 g90 y5 z6 r0.2 x-1.1 q0.21 | ||
| 42 | n0500 g84 y6 z7 r0.2 x-1.1 | ||
| 43 | n0510 g85 y7 z8 r0.2 x-1.1 | ||
| 44 | n0520 g86 y8 z9 r0.2 x-1.1 p902.61 | ||
| 45 | n0530 g87 y9 z10 r0.2 x-1.1 j0.231 k-0 i-3 | ||
| 46 | n0535 g91 y1 r0.2 x-1.1 j0.231 k-0 i-3 | ||
| 47 | n0540 g88 y10 z11 r0.2 x-1.1 p0.3333 | ||
| 48 | n0550 g89 y11 z12 r0.2 x-1.1 p1.272 | ||
| 49 | |||
| 50 | n1000 m2 (the end) | ||
diff --git a/res/nist/expressions.nc b/res/nist/expressions.nc new file mode 100644 index 0000000..68e7c16 --- /dev/null +++ b/res/nist/expressions.nc | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | n0010 g21 g1 x3 f20 (expression test) | ||
| 2 | n0020 x [1 + 2] (x should be 3) | ||
| 3 | n0030 x [1 - 2] (x should be -1) | ||
| 4 | n0040 x [1 --3] (x should be 4) | ||
| 5 | n0050 x [2/5] (x should be 0.40) | ||
| 6 | n0060 x [3.0 * 5] (x should be 15) | ||
| 7 | n0070 x [0 OR 0] (x should be 0) | ||
| 8 | n0080 x [0 OR 1] (x should be 1) | ||
| 9 | n0090 x [2 or 2] (x should be 1) | ||
| 10 | n0100 x [0 AND 0] (x should be 0) | ||
| 11 | n0110 x [0 AND 1] (x should be 0) | ||
| 12 | n0120 x [2 and 2] (x should be 1) | ||
| 13 | n0130 x [0 XOR 0] (x should be 0) | ||
| 14 | n0140 x [0 XOR 1] (x should be 1) | ||
| 15 | n0150 x [2 xor 2] (x should be 0) | ||
| 16 | n0160 x [15 MOD 4.0] (x should be 3) | ||
| 17 | n0170 x [1 + 2 * 3 - 4 / 5] (x should be 6.2) | ||
| 18 | n0180 x sin[30] (x should be 0.5) | ||
| 19 | n0190 x cos[0.0] (x should be 1.0) | ||
| 20 | n0200 x tan[60.0] (x should be 1.7321) | ||
| 21 | n0210 x sqrt[3] (x should be 1.7321) | ||
| 22 | n0220 x atan[1.7321]/[1.0] (x should be 60.0) | ||
| 23 | n0230 x asin[1.0] (x should be 90.0) | ||
| 24 | n0240 x acos[0.707107] (x should be 45.0000) | ||
| 25 | n0250 x abs[20.0] (x should be 20) | ||
| 26 | n0260 x abs[-1.23] (x should be 1.23) | ||
| 27 | n0270 x round[-0.499] (x should be 0) | ||
| 28 | n0280 x round[-0.5001] (x should be -1.0) | ||
| 29 | n0290 x round[2.444] (x should be 2) | ||
| 30 | n0300 x round[9.975] (x should be 10) | ||
| 31 | n0310 x fix[-0.499] (x should be -1.0) | ||
| 32 | n0320 x fix[-0.5001] (x should be -1.0) | ||
| 33 | n0330 x fix[2.444] (x should be 2) | ||
| 34 | n0340 x fix[9.975] (x should be 9) | ||
| 35 | n0350 x fup[-0.499] (x should be 0.0) | ||
| 36 | n0360 x fup[-0.5001] (x should be 0.0) | ||
| 37 | n0370 x fup[2.444] (x should be 3) | ||
| 38 | n0380 x fup[9.975] (x should be 10) | ||
| 39 | n0390 x exp[2.3026] (x should be 10) | ||
| 40 | n0400 x ln[10.0] (x should be 2.3026) | ||
| 41 | n0410 x [2 ** 3.0] #1=2.0 (x should be 8.0) | ||
| 42 | n0420 ##1 = 0.375 (#1 is 2, so parameter 2 is set to 0.375) | ||
| 43 | n0430 x #2 (x should be 0.375) #3=7.0 | ||
| 44 | n0440 #3=5.0 x #3 (parameters set in parallel, so x should be 7, not 5) | ||
| 45 | n0450 x #3 #3=1.1 (parameters set in parallel, so x should be 5, not 1.1) | ||
| 46 | n0460 x [2 + asin[1/2.1+-0.345] / [atan[fix[4.4] * 2.1 * sqrt[16.8]] /[-18]]**2] | ||
| 47 | n0470 x sqrt[3**2 + 4**2] (x should be 5.0) | ||
| 48 | n0480 m2 | ||
diff --git a/res/nist/simple.nc b/res/nist/simple.nc new file mode 100644 index 0000000..31af719 --- /dev/null +++ b/res/nist/simple.nc | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | (this program mills “Hello world” between X=0 and X=81 millimeters) | ||
| 2 | n0010 g21 g0 x0 y0 z50 (top of part should be on XY plane) | ||
| 3 | n0020 t1 m6 m3 f20 s4000 (use an engraver or small ball-nose endmill) | ||
| 4 | n0030 g0 x0 y0 z2 | ||
| 5 | n0040 g1 z-0.5 (start H) | ||
| 6 | n0050 y10 | ||
| 7 | n0060 g0 z2 | ||
| 8 | n0070 y5 | ||
| 9 | n0080 g1 z-0.5 | ||
| 10 | n0090 x 7 | ||
| 11 | n0100 g0 z2 | ||
| 12 | n0110 y0 | ||
| 13 | n0120 g1 z-0.5 | ||
| 14 | n0130 y10 | ||
| 15 | n0140 g0 z2 | ||
| 16 | n0150 x11 y2.5 | ||
| 17 | n0160 g1 z-0.5 (start e) | ||
| 18 | n0170 x16 | ||
| 19 | n0190 g3 x13.5 y0 i-2.5 | ||
| 20 | n0200 g1 x16 | ||
| 21 | n0210 g0 z2 | ||
| 22 | n0220 x20 y0 | ||
| 23 | n0230 g1 z-0.5 (start l) | ||
| 24 | n0240 y9 | ||
| 25 | n0250 g0 z2 | ||
| 26 | n0260 x26 | ||
| 27 | n0270 g1 z-0.5 (start l) | ||
| 28 | n0280 y0 | ||
| 29 | n0290 g0 z2 | ||
| 30 | n0300 x32.5 | ||
| 31 | n0310 g1 z-0.5 (start o) | ||
| 32 | n0320 g2 x32.5 j2.5 | ||
| 33 | n0330 g0 z2 | ||
| 34 | n0340 x45 y5 | ||
| 35 | n0350 g1 z-0.5 (start w) | ||
| 36 | n0360 x47 y0 | ||
| 37 | n0370 x48.5 y3 | ||
| 38 | n0380 x50 y0 | ||
| 39 | n0390 x52 y5 | ||
| 40 | n0400 g0 z2 | ||
| 41 | n0410 x57.5 y0 | ||
| 42 | n0420 g1 z-0.5 (start o) | ||
| 43 | n0430 g2 x57.5 j2.5 | ||
| 44 | n0440 g0 z2 | ||
| 45 | n0450 x64 | ||
| 46 | n0460 g1 z-0.5 (start r) | ||
| 47 | n0470 y5 | ||
| 48 | n0480 y4 | ||
| 49 | n0490 g2 x69 r4 | ||
| 50 | n0500 g0 z2 | ||
| 51 | n0510 x73 y0 | ||
| 52 | n0520 g1 z-0.5 (start l) | ||
| 53 | n0530 y9 | ||
| 54 | n0540 g0 z2 | ||
| 55 | n0550 x81 | ||
| 56 | n0560 g1 z-0.5 (start d) | ||
| 57 | n0570 y0 | ||
| 58 | n0580 x79.5 | ||
| 59 | n0590 g2 j2.5 y5 | ||
| 60 | n0600 g1 x81 | ||
| 61 | n0610 g0 z50 | ||
| 62 | n0620 m2 | ||
diff --git a/res/shapes/circle.nc b/res/shapes/circle.nc new file mode 100644 index 0000000..9d7a755 --- /dev/null +++ b/res/shapes/circle.nc | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | G17 G20 G90 G94 G54 | ||
| 2 | G0 Z0.25 | ||
| 3 | X-0.5 Y0. | ||
| 4 | Z0.1 | ||
| 5 | G01 Z0. F5. | ||
| 6 | G02 X0. Y0.5 I0.5 J0. F2.5 | ||
| 7 | X0.5 Y0. I0. J-0.5 | ||
| 8 | X0. Y-0.5 I-0.5 J0. | ||
| 9 | X-0.5 Y0. I0. J0.5 | ||
| 10 | G01 Z0.1 F5. | ||
| 11 | G00 X0. Y0. Z0.25 | ||
diff --git a/res/shapes/square.nc b/res/shapes/square.nc new file mode 100644 index 0000000..bfcc24f --- /dev/null +++ b/res/shapes/square.nc | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | (Exported by FreeCAD) | ||
| 2 | (Post Processor: linuxcnc_post) | ||
| 3 | (Output Time:2026-02-17 23:27:08.902610) | ||
| 4 | /(begin preamble) | ||
| 5 | G17 G54 G40 G49 G80 G90 | ||
| 6 | G21 | ||
| 7 | (begin operation: Fixture) | ||
| 8 | (machine units: mm/min) | ||
| 9 | G54 | ||
| 10 | (finish operation: Fixture) | ||
| 11 | (begin operation: TC: Default Tool) | ||
| 12 | (machine units: mm/min) | ||
| 13 | (TC: Default Tool) | ||
| 14 | M5 | ||
| 15 | M6 T1 | ||
| 16 | G43 H1 | ||
| 17 | (finish operation: TC: Default Tool) | ||
| 18 | (begin operation: Profile) | ||
| 19 | (machine units: mm/min) | ||
| 20 | (Profile) | ||
| 21 | (Compensated Tool Path. Diameter: 5.0) | ||
| 22 | G0 Z15.000 | ||
| 23 | G0 X51.768 Y51.768 | ||
| 24 | G0 Z13.000 | ||
| 25 | G1 X51.768 Y51.768 Z0.000 | ||
| 26 | G2 X52.500 Y50.000 Z0.000 I-1.768 J-1.768 | ||
| 27 | G1 X52.500 Y0.000 Z0.000 | ||
| 28 | G2 X50.000 Y-2.500 Z0.000 I-2.500 J0.000 | ||
| 29 | G1 X0.000 Y-2.500 Z0.000 | ||
| 30 | G2 X-2.500 Y0.000 Z0.000 I0.000 J2.500 | ||
| 31 | G1 X-2.500 Y50.000 Z0.000 | ||
| 32 | G2 X0.000 Y52.500 Z0.000 I2.500 J-0.000 | ||
| 33 | G1 X50.000 Y52.500 Z0.000 | ||
| 34 | G2 X51.768 Y51.768 Z0.000 I-0.000 J-2.500 | ||
| 35 | G0 Z15.000 | ||
| 36 | G0 Z15.000 | ||
| 37 | (finish operation: Profile) | ||
| 38 | (begin postamble) | ||
| 39 | M05 | ||
| 40 | G17 G54 G90 G80 G40 | ||
| 41 | M2 | ||
