algorithmic modeling for Rhino
Here are three grasshopper documents for generation thread screw
The scripts just generate surface with or without problem on joints. I did 1 turn RailRevolution with n threads profile. It seems not better with n turns with 1 thread profile.
female is for internal thread and male for external thread. It is surely a bad translation from French (my language). See real definition here http://en.wikipedia.org/wiki/ISO_metric_screw_thread, The tolerances for ISO are for metal parts and are not centered.
I am interested in 3d printing screw threads (bolts and nuts) and I have added some new features to Laurent and Peter's definition:
1. "Friendly" user interface.
2. Previsualisation of the result (with a sectioned view to appreciate clearance and modify it if necessary).
3. Normalised and common values of diameters and pitch (snapping sliders, although customised values are also allowed), as well as list of common combinations of diameter and pitch for reference.
4. Fundamental deviation or allowance for clearance and good fit. The diameters of the male and female threads are calculated by default with the minimum allowed clearance. But this clearance can be increased within the tolerance zone of both, with values ranging from 0 to 1, being zero the minimum tolerance and 1 the maximum tolerance for any given pitch and diameter.
Tolerance values and relationships have been taken from these two sites:
I have not tested any 3d printing yet. This Grasshopper definition would be valid for FFF 3d printers under the assumption that they provide results within the tolerances. I do not think that is a problem for medium and large size threads, but I doubt they could do for the smallest values where the pitch is smaller than common resolutions.
I am not a mechanical engineer and I might have made some mistakes. Please do not hesitate to review or correct them.
This a link to a video showing how the definition works: