Hi Fern,
I still have some issues with both internal and external threading and I think I've figure out the issue.
It seems to me that the thread depth is not correct as its not taking into account if the thread is internal or external.
According to the drawings you pasted above, the height of internal thread H1=0.54127*p and the height of external thread h3=0.61344*p. The formula used for automatic in the threading.ngc file is:
#<depth> = [SIN[60] * #<pitch> * 2]
Due to this, when I'm cutting an external thread M16x2, the depth calculated with the formula above is 1.73205 which is too deep. If I calculate the depth as h3=> 0.61344 * 2 = 1.22688
If you agree with my correction can you update the threading routine? I think a dropdown that would allow me to specify if the thread is internal or external should be taken into consideration when deciding the depth of cut.
Also there are a few other comments I would like to add.
--When threading a bolt, the diameter of the bolt is the Major Diameter; the depth of cut * 2 = minor diameter. This is what I understand that the automatic should calculate. So the minor diameter should be 0.61344 * pitch * 2
--When threading a nut, the inside diameter of the nut is Minor Diameter, the depth of cut * 2 = major diameter. For a nut threading, I would like to specify the inside diameter of the nut, and the major diameter should be calculated automatically.
From my understanding, the major diameter for a nut should be 0.54127 * pitch * 2
en.wikipedia.org/wiki/Screw_thread#Minor_diameter
The way that this routine would be very intuitive and useful to me would be to have some inputs like:
Thread Type: External/Internal (this could replace thread peak 1 vs -1)
ToolNumber: - For other routines, it makes sense to have a tool specified as they can have depth of cuts, feeds per rev, etc. The feed for threading is given by pitch and the depth of cut is also specified as threading param.
RPM: This is the another relevant info that could be moved from Tool change into threading routine itself.
Spindle direction M3|M4
Hopefully I understood correctly what the problem was, please let me know what you think about this.
Thanks,
Vasi