Make something
Email yourself a 10% off coupon
Send
Coupon sent! Check your email
This will be 3D printed near you and delivered to your door by May 02
Loading

It's always bugged me that you can't make screw threads easily with openscad's linear_extrude - and then I realized, on my bike ride home from work, that actually you can! . The main problem is that people usually think of a screw thread in terms of a vertical cross section, but openscad needs a horizontal cross-section for linear extrusion. But this isn't a fundamental limitation, it's a failure of imagination! So imagine cutting a screw in half with a hacksaw. Look at the shape the cut made. If you were to linearly extrude the resulting shape, with the correct twist, then you'd get the screw back, right? So we just have to figure out what the shape of that cross-section is. . Fortunately we can do that natively in openscad, basically by running the game backwards: make a doughnut the shape of the thread, cut it in a spiral, and look at it from above - that's your shape. . More rigorously: If P is the polygon you want to extrude as a thread, first of all rotationally extrude it, to get a P-shaped torus. Then intersect the torus with a helicoid of the same pitch as the threads you want (but the opposite orientation). A helicoid is what you get when you linear_extrude a thin stick, with a twist, so both of these shapes are easy to make in openscad. Now take the result of this intersection and project it onto the xy plane. This is the cross-section of the screw we were looking for. Nifty, yes? . I'm not saying it's efficient, or smart, or pretty, or better than any of the screw libraries - I'm just saying it's possible, and in fact conceptually simple. . However, I have one more observation: if you start with a polygonal thread shape and transform it as above, then the transformation I've described seems like it might just be a two-dimensional geometric inversion in some point. Under inversions, straight lines turn into circular arcs... so there's likely to be a way smarter way to do this transformation mathematically, without going through openscad's 3D system at all! Stay tuned... . Edit: not really sure why thingview is showing a solid cylinder... but I did notice that openscad was doing something similar if I made any of the extrusions use too many slices. Like I said, it ain't pretty yet.

openscad screw threads with linear_extrude
Please wait while we prepare the order
$ 0.00 + free delivery
Sorry we had trouble getting the 3D files. Download them yourself and upload them here to place an order.
View files
  • 0 inches x 0 inches x 0 inches
  • this product is 3D printed
  • 16 available colors
  • material is a strong plastic
  • free delivery by May 02
  • 0 parts
Delivery address
This field is required.
This field is required.
Please enter a valid email.
This field is required.
This field is required.
This field is required.
This field is required.
This field is required.
Pay with credit card or debit card
or pay with
Place order
Order summary
openscad screw threads with linear_extrude
Color:
Quantity:
Subtotal
$
Delivery (May 01 - May 03)
Free
Total
$