Punched this through a calculator a few times and it should work.
Code:
(#1 is X center)
(#2 is Y center)
(#3 is plunge depth)
(#4 is a quarter of stepover)
(#5 is one sixteeth of stepover plus #4)
(#6 is The finish radius)
(#15 is the start of the next loop)
o100 sub
G00 X#1 Y#2 Z.1
G01 Z#3 F10
X#4
G03 X#1 Y#4 R#4
X[[-2]*#4] Y#2 R#5
#15=0
#6=.12
o101 while [#15 LT #6]
G03 X#1 Y[[[#4*3]+15]*[-1]] R[#5+#4+#15]
X[[4*#4]+#1+#15] Y#2 R[[2*#4]+#5+#15]
X#1 Y[[5*#4]+#2+#15] R[[3*#4]+#5+#15]
X[[[#4*6]+#1+#15]*[-1]] Y#2 R[[4*#4]+#5+#15]
#15 = [#4*4]+#15
o101 endwhile
o100 endsub
o100 call [0] [0] [-.1] [.0125] [.0156]
G00 Z2
M02
the program should run like below, shouldn't it?
Code:
G00 X0.0000 Y0.0000 Z.1
G01 Z-.1 F10
X0.0125
G03 X0.0000 Y0.0125 R0.0125
X-0.0250 Y0.0000 R0.0156
G03 X0.0000 Y-0.0375 R0.0281
X0.0500 Y0.0000 R0.0406
X0.0000 Y0.0625 R0.0531
X-0.0750 Y0.0000 R0.0656
X0.0000 Y-0.0875 R0.0781
X0.1000 Y0.0000 R0.0906
X0.0000 Y0.1125 R0.1031
X-0.1250 Y0.0000 R0.1156
X0.0000 Y-0.1375 R0.1281
X0.1500 Y0.0000 R0.1406
X0.0000 Y0.1625 R0.1531
X-0.1750 Y0.0000 R0.1656
G00 Z2
M02
This is part of a larger python generated program. Python had no problem generating the long hand gcode using the same logic as I used in the above parametric.