%
(A universal hole driller)
(start at the marked center)
#31 = 0.0 (starting x pos)
#32 = 0.0 (starting back x pos)
#33 = 0.0 (radii starting number)
#34 = 9 (size increment divider, cut this hole in X concentric passes to get to target diameter)
#35 = 1.980 (size of desired hole)
(#36 = [[#35 - 0.250] / 2.00]) (should now be the correct radii to cut a 1.130" diameter hole with a .25" mill)
#36 = 0.9224
#37 = -0.080 (starting z - in case of restart)
#38 = 10 (divisor for number of steps to get to depth)
#39 = -0.400 (ending z)
#40 = [[#36] / [#34]] (#40 should now contain the increment that should end at the right size)
#41 = [[[#39] - [#37]] / [#38]] (#41 should now contain the depth increment, again ending at the right depth)
o100 sub (cut one iteration of a circle to make hole)
g1f10x0y0z[#5] (slowly center bit in a ramp to the new z)
o105 while [#1 lt #4] (while radii is less that target)
g1f5x[#1]y0 (start at right edge of hole)
#1 = [#1 + #3] (increment diameter using parents #40)
#2 = [#2 - #3] (increment diameter using parents #40)
g1f5x[#1]y0 (start at right edge of hole)
g3g17x0y[#1]r[#1] (make 90 degrees of cut)
g3g17x[#2]y0r[#1] (make next 90 degrees of cut)
g3g17x0y[#2]r[#1] (make third 90 of cut)
g3g17x[#1]y0r[#1] (make last 90 of cut)
g1f3x[#1]y0 (new right edge of hole, may be superfoulous as the line above should end there anyway)
o105 endwhile
o100 endsub (now go back to adjust for next cut)
g0z#37
o200 while [#37 ge #39] (while depth isn't deep enough)
o100 call [#31] [#32] [#40] [#36] [#37]
#37 = [[#37]+[#41]] (lower bit by #41)
o200 endwhile
g1f10z2x0y0 (hole done, return to center & high)
m2