I didn't have the luxury of a CNC when I was rebuilding the ring and pinion gears in dril rig rotary tables.
Click image for larger version. 

Name:	15.jpg 
Views:	406 
Size:	223.6 KB 
ID:	22682
I had to weld up the teeth then grind by hand until the profile was correct