MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now


Screw Threads, Holes, Bolts, Nuts, and Rods Library

by rcolyer Jul 23, 2016
Download All Files

Thing Apps Enabled

Please Login to Comment

Great tool! I had a need for a left-hand thread, and being the type that doesn't read directions, I found that if you MIRROR the object in your print software, a left hand thread is printed. If there isn't a note about this (that I missed), It would be a good thing to add on your next revision. Many thanks,

Openscad is very confusing can someone point me to a good training link?

Himim new to this....is this something anyone can do or do u have to be a software engineer to understand?

Im looking for atl files for standard non metric bolts and nuts

This shouldn't require any special skills or training to use. All of the complicated parts and hard work are hidden inside the library, and the interface is designed to be very simple with sensible defaults for everything. But as an OpenSCAD library it's expected that you can install and run OpenSCAD, and use this to export stil files. People without any special training should be able to learn how to do this reliably with perhaps an hour of work, since there is very good documentation for it.

I can see that there are 5 Nuts in the center of the set, to the left of the washers. I'm pretty sure the middle one is M5 but can you tell me what are the other nut sizes?
Is it M3,M4,M5,M6, and M7 ?

Thanks in advance and thanks for the library

The "demo" render shown in the images is displaying M3, M4, M5, M6, and M8. However the library should correctly support every standard metric size from M2 through M64, and it will attempt to extrapolate up from M64 proportionally. (I extrapolated past M64 since I couldn't locate any standards for larger than that at the time of creation.) For example to make the M7 set you mentioned, you could make a two line scad file with:

use <threads.scad>
MetricBoltSet(7, 10);  // The second number is the nominal height of the bolt.

Or you could just make the nut with:

use <threads.scad>

Thanks for the library! I have been looking for something like this for a while. Can you possibly add a round cap head hex screw and appropriate recessed hole to the library? If not that could you show someone else how to easily use your library to create what I am asking? I use a lot of the round cap head hex screws in my work. It would be nice to have a way to print threads into things as opposed to hand tapping after the print is done.


Hi. I actually thought about that one when first creating the library, but there were a few reasons I didn't. For the bolts, the printed plastic ones are a lot more fragile near the caps than metal, and button caps are much shallower and then get very thin near the top. I didn't have much luck with smaller printed bolts staying together in my early tests, so I ended up sticking with ones which combine hex drives and hex heads so that there's an even plastic edge.

However, it's not hard to experiment with variations there. All the "hard" work is abstracted away in the threading portions. The MetricBolt module has only a difference operation of an outer 6-sided cylinder for the socket and an inner 6-sided cylinder for the drive. Variations of those three lines will allow creating and experimenting with all sorts of cap designs.

The recessed hole for a button cap is already supported, you just have to pass in appropriate parameters. Standards vary a bit, but typically a button cap would be just a little less than half the height of the nominal thread diameter, so if you use the RecessedClearanceHole module and simply set a value for the optional recessed_height parameter of half the diameter, it should be about right for a recessed button cap hole.

Thanks for the reply. I’ll look into doing that tomorrow. ;)

Anybody have any idea what the specs are for threads of a toothpaste tube? I'd like to print some threads that a toothpaste cap would fit onto. I read somewhere that toothpaste threads use a "buttress" thread... THX

I'm not sure if toothpaste tube threads are actually standardized, but the ones I've seen do tend to be a buttress style thread, which has some advantages for getting a liquid-tight seal. While the routines could be modified to support buttress style threads, it introduces some subtle complexities for printing since you can only reliably print a buttress style thread with the flat side of the threads up. The ScrewThreads and ScrewHoles would have to be printed in opposite orientations to achieve this. You could probably get a good enough thread match though by just using an AugerThread with appropriate dimensions. I haven't actually printed to test (so try some tests with your own caps), but just as a demonstration of how to adapt AugerThread, the tube I have in hand looks approximately compatible with this shape:

difference() {
union() {
AugerThread(13, 11, 9, 2, tip_height=2);
cylinder(r=11/2, h=9, $fs=0.1, $fa=1);
translate([0,0,-0.01]) cylinder(r=7/2, h=9.02, $fs=0.1, $fa=1);

Comments deleted.

Nice set. Which material is best for making clean threads? Cheers.

PLA tends to be very rigid and under good settings prints with a smooth low-friction surface. Both of these are very good properties for threads. When I print thread_demo_v2.stl in PLA with 3 perimeter layers and 50% infill, the paired pieces slide together very smoothly, but without any wiggle. All similar filaments should work acceptably for reasonable thread size ranges, but I suspect that as you gradually increase flexibility on the filaments the narrower threads gradually become less suitable.

Any particular filament which doesn't print with a smooth surface is going to also cause problems, but these can be compensated for to some extent in each of the module calls by increasing the tolerance parameter.