Example OpenSCAD Screw Thread Transformation by Jamie_K 3d model
Warning. This content is not moderated and could be offensive.
m4
3dmdb logo
Thingiverse
Example OpenSCAD Screw Thread Transformation by Jamie_K

Example OpenSCAD Screw Thread Transformation by Jamie_K

by Thingiverse
Last crawled date: 3 years ago
Inspired by speedymollusc's openscad screw threads, this is an example function for transforming a "radial" polygon representation of screw threads into an "axial" polygon suitable for linear_extrude with rotation.
By "radial" representation, I mean a list of coordinates [[ r1, z1 ], [ r2, z2 ], ... ] where each pair contains a radius and z position (dimension parallel to axis of screw). Such a polygon will generate a thread-like shape when used with rotate_extrude, but unfortunately OpenSCAD does not allow "rotate_extrude with advance" to produce screw threads this way.
If a screw were cut perpendicular to the axial direction, the shape of the cross section would contain the information about the thread shape, but in a different (and less intuitive) form. This I am calling the "axial" polygon. This polygon, when used with linear_extrude with twist, can generate the thread shape.
Contained in this short .scad file is a pair of functions that transform a radial polygon, representing the thread shape in an intuitive way, into an axial one, fit for linear_extrude with twist. This is similar in spirit to speedymollusc's work, but solves it in a different way.
This is intended for OpenSCAD experts and does not by itself generate screw threads suitable for a particular application. Its best use may be in support of a screw thread library.

Tags