Thread cutting script - WIP

 From:  OSTexo
5451.39 
Hello Martin,

Perhaps this graphic will help to see how I produce my manual thread cutting profile. The helix start point is also the point where the edge of the cylinder to be cut should be placed (major diameter). Since the profile is ratio based that profile should work for any pitch size.

As a side note, to determine that arc in the root of the cutting profile I just drew two construction lines perpendicular to the walls of the profile and used the intersection as the center for the arc.

If I'm thinking correctly, that profile in red should be able to be fixed and scaled accordingly. Perhaps the profile should be scaled down from the scaling point indicated on the image by .9375? For example if the pitch is 2mm, if you scale the cutting profile down by .9375 using the indicated scale point as the origin, you end up with a correctly placed and scaled cutting profile. Then, the helix start point (and position of the cylinder edge to the cut, and outward point on the major diameter on the callout) would be at the center vertically of the cutter profile, and would be placed from the top of the cutter profile downward at pitch * .125, correct? Since you have the helix start point determined, which also is the outward point of the major diameter, you can then determine the start point for the axis of your helix depending on what diameter of screw you would like to produce, just by dropping straight down from the helix start point, then inputting the length of the screw (In the case od an M2 the major diameter usually is 16mm). The third position of the callout is the length of the screw thread, which you could enter numerically to determine the end point on the helix axis. The tricky part would be how to determine how many extra turns you need to run the helix so the cutting profile clears the end of the bolt, but I'm guessing that is probably some sort of formula that can determine that. What is also probably tricky is how to lift the cutting object if you want screws that have a longer total length than thread length. You already know the pitch, so that probably could be put into the pitch field of the helix function. That profile also avoids any problems with intersections and should result in a successful Boolean. Does that make sense?

Attachments: