Thread milling G-code generator
Writes an example program for a single-profile thread mill: a tangential entry, one helical turn per pitch, and a tangential exit. Internal and external, right or left hand.
How it works, guides and notes
How it works
For an internal thread the tool centre runs on a radius of (major diameter − cutter)/2. For an external thread it is (minor diameter + cutter)/2, using the basic minor d − 1.226869P. Each full turn moves Z by exactly one pitch. A right-hand thread rises anticlockwise, so internal threads climb from the bottom with G3 and external threads work down from the top with G2 (both climb milling with M3). Left-hand threads reverse the Z direction.
The feed you enter is at the cutting edge. On an internal thread the tool centre travels a smaller circle, so the programmed feed is scaled by (D − cutter)/D. On an external thread it is scaled by (D + cutter)/D.
Basic-profile sizes have no tolerance. Measure the first part with a gauge and adjust the diameter the cutter must reach (or your wear offset). See the thread calculator for sizes.
FANUC, Haas, Siemens, Heidenhain, LinuxCNC and Grbl are names or trademarks of their respective owners. They are mentioned only to describe which controls a code format relates to. Lathe Calculator is not affiliated with or endorsed by any of them. Trademarks.
Spotted a mistake? Report an error.