This calculator generates a Python script that draws a threaded surface with a profile
falloff, which can be used to model screws, nuts, screw-caps, etc.
A thread profile can be represented by a simple 4-segment broken line shown on the diagram above in gold.
It is fully described by its outer and inner radii (R and r) and the heights of its 4 line segments
(h1, h2, h3 and h4).
A full thread can be modeled in Blender by applying the Screw modifier to the profile. However, this approach will only
produce satisfactory results with nuts but not bolts. The latter require a profile falloff -- the outer radius of the profile
needs to become equal to the inner radius at the top and bottom of the thread. This calculator automatically spits out a Python script which generates a threaded surface with a smooth profile falloff based on your profile
parameters, as shown on the image above.