


Here's how that shape stacks up into a screw thread, using 32 angular steps per full rotation: We get rectangular facets where the stacked polygon edges are parallel (like the inner and outer radius surfaces), and we'll also get triangles at the transitions between the different surfaces. Because this is an irregular shape, some polygon edges won't be parallel on each rotational step, so we won't end up with nice clean rectangular facets everywhere. The angular step size is equal to the angular step size used to generate the polygon shape, so that for each rotational increment, the polygon vertices are always vertically aligned. As these polygons stack vertically, they rotate by one angular step for each layer. Those two non-constant radius curves form the sloped faces of the threads.
#Openscad spiral iso#
When \(\theta=30^\circ\), the threads are ISO threads. Fortunately, the ISO standard defines the parameter \(H\) (and therefore thread depth) in this figure as a function of angle \(\theta\) and thread pitch \(P\):

If the 3D printer doesn't work reliably for printing overhang slopes shallower than 45° (or if you're printing really large threads) it may be a good practice to increase the thread face angle from 30° to 45°. However, the approach to thread generation described here doesn't work well for horizontal thread face angles, as I explain near the end of this article. Even then, only one face of the worm gear thread is under load, so it can be printed face up with a 45° angle on the unloaded underside face of the thread. The primary exception that comes to mind would be a worm drive thread, which should have a nearly-flat thread face angle. At less than 30°, however, the slicer does start identifying overhang perimeters, but angles shallower than the ISO standard aren't needed for fitting threads to machine parts. In my case, using PrusaSlicer 2.1 with my Prusa i3 MK3S, the slicer doesn't identify any part of a standard ISO screw thread as an "overhang perimeter" so it should be OK as is for most modern printers. The traditional "45 degree rule" for 3D printing says to avoid overhangs less than 45° from horizontal. If the screw shaft is printed vertically, the 30° face angle may not work well, depending on your printer.
