Steve:
Funny, but i wrote this hex milling program some years back....bit of digging and this is what i have on this.
N1 G0 X0.0 Y0.0 Z4.0
N2 G17 T1*1
N3 S= P6
N4 G0 Z.1 M70
N5 G91 Z = -P13 F= P4 M70
N6 G90 M70
N7 G41 G47 A= P7 X= P10 Y= -P11 G0 G64 G61
N8 X= -P10 F = P5
N9 G7 R= P12
N10 X = -P9 Y 0.0
N11 G7 R = P12
N12 X= -P10 Y= P11
N13 G7 R= P12
N14 X= P10
N15 G7 R= P12
N16 X= P9 Y 0.0
N17 G7 R= P12
N18 X= P10 Y= -P11
N19 G7 R= P12
N20 X 0.0
N21 G40 G47
N22 G91
N23 G0 Z.1
N24 G90
N25 L= P14 N5 N24
N26 G0 Z.1
N27 T1
N28 L1 N5 N26
N29 G0 Z4.0
N30 G0 X0.0 Y0.0
N31 M30
P list (mode 12)
P1= (Hex size , across flats given in inches)
P2= (Height of hex in inches)
P3= (number of depth passes to get full height)
P4= (feed rate for depth moves) Note: rate will be 1/10 of value entered here
P5= (Feed rate around profile) Note: rate will be 1/10 of feed rate entered here
P6= (+Spindle speed)
P7= (enter value for arc out and arc into contour)
P9= P1* .5774
P10= (P1*.5774) / 2
P11= P1 / 2
P12= P1 / 8 (this setting makes the corner radius as a percent of the hex size, shown as 1/8 the hex size here)
P13= (P2 / P3) + .100
P14= P3 - 1
Some explanation:
P1 is the size of the hex you wish.
P2 is eh height of the hex.
P3 is the number of cuts needed around the profile to get to full depth.
The program cuts the profile to depth then calls a finish tool for final passes around the part.
Hex is oriented with the starting flat parallel with the "X" axis)
Corner radius is a function of the hex size...can set that amount in "P" 12.
Profile cuts are retracted at the end of the profile before reposition and next depth cut.
Depth moves are done incrementally, so it might be possible to have accumulating errors if lots of passes are needed to get the depth...
As with anything, might be errors in typing this so proof the program and use at your own risk..
T1*1 is the rough cutting tool. Call cutter radius larger than the true size of the tool by the amount needed for finish cut.
T1 is the true size (radius) of the tool.
Both rough and finish cuts done with the same actual tool.
Cheers Ross