o sub
# = #1 (x axis length)
# = #2 (y axis length)
# = #3 (corner radius)
# = #4 (kerf width)
# = #5 (peirce height)
# = #6 (peirce delay)
# = #7 (cut height)
# = #8 (leadin radius)
# = #9 (side out 0, in 1)
# = #10 (cut feed rate)
# = #11 (Y Offset)
# = #12 (X Offset)
G20 (units: inches)
G40 (cancel cutter comp)
G90 (absolute mode)
G64 P0.005 (continuous mode + path tolerance)
G92 X0 Y0 (set current position to X0 Y0)
o call (set Z0.000)
G1 X-# Y[[# / 2] - #] F#
o call [#] [#] [#] (Touchoff and start cutting)
F# (set feed rate after ngctouch changed it)
o110 if [# EQ 0]
G41
# = 3
# = 2
o110 else
G42
o110 endif
G# X0.0 Y[# / 2] I0.0 J#
G1 X0.0 Y[# - #]
G# X[#] Y[#] I[#] J0.0
G1 X[# - #] Y[#]
G# X[#] Y[# - #] I0.0 J-[#]
G1 X[#] Y[#]
G# X[# - #] Y0.0 I-[#] J0.0
G1 X[#] Y0.0
G# X0.0 Y[#] I0.0 J[#]
G1 X0.0 Y[# / 2]
M5 ; turn off torch
G53 G0 Z0.0
G0 Y[# + #]
G40 G92.1
o endsub
M2