Below is Dan's code with lines added (separated by space) to cut the other end of the tube.
It doesn't work properly cutting from 0,0 rather than the 5" offset.
Can someone please point out the error in my code?
I've tried absolute vs incremental mode.... and nothing seems to work.
(CNC A axis Plasma TUBE Coping routine)
(Math derivative by Dan Hopper Copyright 2006)
#100= 1.250 (CutTube Diameter)
#101= 1.250 (Uncut Tube Diameter)
#103= .095 ( Tube Thickness )
#104= 45 (Joint ANGLE)
#200 = [#100 / 2] (RO)
#201 = [#101 / 2] (RU)
#202 = [#200 - #103] (RI)
#203 = #104 (AF)
#204 = 0 (ID)
#300= 2 (A step in deg)
G0 G40 G54 G90 G49 G17 G50 G64 G91.1 G94
G0 A0.000 x0.000 Z1.000 F500
Z0.000
M98 P01 L180
#104= -45 (Joint ANGLE)
#200 = [#100 / 2] (RO)
#201 = [#101 / 2] (RU)
#202 = [#200 - #103] (RI)
#203 = #104 (AF)
#204 = 0 (ID)
#300= 2 (A step in deg)
G0 A0.000 x5.000 Z1.000 F500
Z0.000
M98 P01 L180
G0 A0.000 X0.000 Z1.000
M30
o01
G1 A#300 X [sqrt [#201 **2 - [ [#202 * sin [#204]] **2]] / sin[#203] - tan [90-#203] * #202 * cos[#204]]
#204=[#204+2]
#300=[#300+2]
m99
%