Hello Guest it is March 28, 2024, 09:11:42 AM

Author Topic: G-Code wanted for a half sphere  (Read 28807 times)

0 Members and 1 Guest are viewing this topic.

G-Code wanted for a half sphere
« on: July 08, 2013, 02:57:12 PM »
I need to mill out a half sphere mould (60mm dia) in a block of acetal. Can anybody out there help with the G-code please.

I also have to make some other diameter moulds as well, so if there is any way I can alter to suit or if there is some kind of wizard that woould be cool.

Thanks.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G-Code wanted for a half sphere
« Reply #1 on: July 08, 2013, 06:28:27 PM »
By hand that would be a tough one to do. If it were a convex part not so hard , Concave that is a tough one(;-).

Need a Cam to do that one.

(;-)TP
Re: G-Code wanted for a half sphere
« Reply #2 on: July 09, 2013, 01:20:27 PM »
I can probably help. Send me some details of what you're trying to do.

Send it to middaymachining@cox.net.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G-Code wanted for a half sphere
« Reply #3 on: July 09, 2013, 01:27:57 PM »
What size ball mill where you going to use ? I have the concave sphere code worked out just need to finish up the pocketing for each layer.

Might make an interesting Wizard after all.

(;-)TP
Re: G-Code wanted for a half sphere
« Reply #4 on: July 09, 2013, 01:54:11 PM »
I can use any size from 2mm to 12mm.  Can go up to 16mm.

Sounds terrific - thanks

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G-Code wanted for a half sphere
« Reply #5 on: July 11, 2013, 01:10:01 PM »
OK here it is and I cannot say it is perfect as I have nothing here to actually cut with. BUT it simulates so give it a whirl.

As always dry run test before you cut.

( Cut Concave Sphere)
(Setup the next 4 variables)
#1030 = .250 (Cutter Diameter)
#1040 = 5     (Sphere Diameter)
#1020 = .005 (Finish Allowance)
#1070 = 200  (Feedrate)

#1080 = [#1030/2] (Tool Radius)
#1000 = [[#1040 - #1030] - #1020]       (Sphere Diameter - Finish allowance )
#1001 = 90  
#1010 = #1001

G17 G40 G80
F1
G0 Z.5
M98 P1 L#1001    (Roughing Routine)
#1000 = [#1040 - #1030 ]
M98 P3 L#1001  
M30

o001
(Roughing Routine)
#1002 = [0-90-#1010]
#1003 = [COS[#1002] * #1000 / 2]  
#1004 = [SIN[#1002] * #1000 / 2]  
G1 X[0-#1003] Y0 Z[#1004] F#1070
#2000 =#1003
#2001 = #1004
G2 X[0-#1003] Y0 I#1003 F#1070    

#1010 = [#1010 - 1]          
#1050 =  [Fix [ -1*[#1003 / #1030]] *2]

M98 P2 L#1050
#1003 = #2000
#1004 = #2001
G1 X[0-#1003] Z#1004
M99

o002
(Do Pocketing of each slice)
#1003 = [#1003 +#1080]
G1 X[0-#1003 ]
G2 X[0-#1003 ] Y0 I[#1003 ]  F#1070  
M99

o003
(Do Finish Profile )
#1002 = [0-90-#1010]
#1003 = [COS[#1002] * #1000 / 2]  
#1004 = [SIN[#1002] * #1000 / 2]  
G1 X[0-#1003] Y0 Z[#1004] F#1070
G2 X[0-#1003] Y0 I#1003 F#1070    
#1010 = [#1010 - 1]  
M99
%

        
HAVE FUN, (;-) TP



Re: G-Code wanted for a half sphere
« Reply #6 on: July 11, 2013, 01:59:36 PM »
WOW - Thanks...I will give this a go.
Re: G-Code wanted for a half sphere
« Reply #7 on: July 12, 2013, 01:54:24 PM »
This simulates terriffically, but it is in inches.

How do I convert to metric.  I tried but it didn't work, I must be missing something really simple.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G-Code wanted for a half sphere
« Reply #8 on: July 12, 2013, 08:48:52 PM »
The program does NOT know metric from inches. Set your machine to metric with G21.


On the line  G17 G40 G80

ADD a G21   , 

G17 G40 G80 G21


(;-) TP
« Last Edit: July 12, 2013, 08:51:32 PM by BR549 »
Re: G-Code wanted for a half sphere
« Reply #9 on: July 13, 2013, 03:20:51 AM »
Thank you - I knew it would be simple but I was just to thick to see it.