Ok, this got me interested. I wrote a fanuc macro to machine this. If you don't have fanuc macro B or some of the system variables used, you will have to modify it. I did not test run this either, so use a bit of caution trying it out.
Code:
O8001(Spherical bowel macro)
(for Fanuc macro B)
(cut half spherical pocket)
(#24=X Sphere center)
(#25=Y Sphere center)
(#26=Z Sphere center)
(#6=K Sphere radius)
(#9=F Feed rate)
(#21=U Ball mill radius)
(#18=Q maximum step over)
(#17=R Rapid plane)
IF[#4010EQ98] THEN #17=#5043 (set R to current Z Initial point return)
IF[#4003NE90] THEN #3000=90(Must be in absolute mode)
#2=#4001 (store G01-G03 mode)
#3=FUP[[.5*3.1416*#6]/#18] (number of layer cuts)
#4=90/#3 (angle for each step)
#5=0 (current angle)
#7=0 (zero out current radius)
#8=#26-#21 (current Z)
G0 X#24 Y#25
G0 Z#17
G1 Z#8 F#9 (Ball center at sphere center)
WHILE [#5LT90] DO 1
#7=COS[#5]*[#6-#21]
#8=[#26-#21]-[SIN[#5]*#7]
G1 X[#24+#7] (move to current radius)
Z#8 (move to current Z)
G3 X[#24+#7] Y#25 I-#7 J0 (I J set to inc. center point value)
#5=#5+#4
END 1
G1 X#24
Z[#26-#6]
G0 Z#17
G#2
M99
And since it isn't much different, the external ball version
Code:
O8002(Spherical ball macro)
(for Fanuc macro B)
(cut half spherical ball)
(#24=X Sphere center)
(#25=Y Sphere center)
(#26=Z Sphere center)
(#6=K Sphere radius)
(#9=F Feed rate)
(#21=U Ball mill radius)
(#18=Q maximum step over)
(#17=R Rapid plane)
IF[#4010EQ98] THEN #17=#5043 (set R to current Z Initial point return)
IF[#4003NE90] THEN #3000=90(Must be in absolute mode)
#2=#4001 (store G01-G03 mode)
#3=FUP[[.5*3.1416*#6]/#18] (number of layer cuts)
#4=90/#3 (angle for each step)
#5=90-#4 (current angle)
#7=0 (zero out current radius)
#8=#26+#21+#6 (current Z)
G0 X#24 Y#25
G0 Z#17
G1 Z#8 F#9 (Ball center at sphere X Y center and Z top)
WHILE [#5GE0] DO 1
#7=COS[#5]*[#6+#21]
#8=[#26-#21]+SIN[#5]*#7
G1 X[#24+#7] (move to current radius)
Z#8 (move to current Z)
G2 X[#24+#7] Y#25 I-#7 J0 (I J set to inc. center point value)
#5=#5-#4
END 1
G0 Z#17
G#2 (reset movement mode)
M99