I'm implementing gcode subroutines for a wizard I'm writing to do circular pocketing on a milling machine. The input will be: pocket diameter, tool diameter, pocket depth, depth per pass, tool stepover, ramp angle, center x and y, climb or conventional, finish depth pass, finish radial pass.
See: http://www.se-ltd.com/~lerman/gallery/G-Wiz/wizarddemo for a sample screendump.
I've found that it is a lot easier to generate the screen than it is to generate the gcode (this will be implemented as an EMC style gcode subroutine). Some of the issues I'm having are:
1 - Do I mill the pocket from the outside in or from the center out? Going from the outside has the advantage that I should be able to ramp to each step in the first half circle. Since there is more motion, the ramping should cut better.
In that case, I would start inside of the finish allowance, ramp down to the first step in the first circle, then do concentric circles (in a CW direction) with circular arcs connecting them until I got to the center. Then go back to the outside and do it again. One awkward aspect of this is that when I do the finish pass on the diameter, I would have to reverse the direction so as to continue to climb mill.
2 - Assume I'm going from outside to inside. Then, what does the final pass look like? I would take an extra circular pass to remove what is left of the ramp from the previous pass. The ramp down in a CW direction to the finish depth and cut the full circle. The spiral out in a CCW direction taking the finish pass on part of the bottom and the outside diameter. Come back in again taking a circular pass to remove the last ramp. Then go CW again and spiral in to the center to finish the bottom. Is all of this necessary? Would it be sufficient to cut the outside finish pass in a CCW direction so as to climb mill it and continue in that direction in the spiral to the center. It seems to me that since this is just a shallow bottom cut, it probably shouldn't matter if it is climb or conventional milled.
3 - I'm assuming that the ramp is specified as an angle. Is that the most convenient way? Would users prefer it as slope (drop/run).?
Any thoughts or comments would be appreciated. Does anyone have a paper describing an algorithm for this?
Thanks,
Ken