import math

# size in mm
mill = 0.8
circ = 2.54 
zmax = -22
step = 5

r = (circ-mill)/2

def hole(xpos,ypos):
    print ('G00 Z5.0')
    print ('G00 X{0:.4f} Y{1:.4f}' .format( xpos, ypos + r))

    for z in range (-2, zmax, -2):
        print ('G01 F50')
        print ('G01 Z{0:.4f}' .format(z/10))
        print ('G01 X{0:.4f} Y{1:.4f}' .format( xpos, ypos + r))
        for i in range (0,360,step*3):
            print ('G01 X{0:.4f} Y{1:.4f}' .format(xpos + r * math.sin(math.radians(i)) , ypos + r * math.cos(math.radians(i))))
        print ('G01 X{0:.4f} Y{1:.4f}' .format( xpos, ypos + r))
                
    print ('G00 Z5.0')

hole (-41.91, 24.13)
hole (-41.91, 87.63)
hole (-123.19, 87.63)
hole (-123.19, 24.13)
hole (-52.28, 63.5 )
hole (-110.28, 63.5 )
hole (-52.28, 86.5 )
hole (-110.28, 86.5 )

