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


NUT JOB | Nut, Bolt, Washer and Threaded Rod Factory

by mike_mattala Dec 1, 2013
Download All Files

Thing Apps Enabled

Please Login to Comment

If I print the Nut and the Thread, in the dimension they are created, does the Nut fit the Thread? And if I need smaller dimensions, can I just adjust the dimensions in whatever I need, to fit together?

Right not sure what I'm doing wrong but I'm trying to create a M12 1.5 pitch rod so I can thread a gear knob but most of the time the customizer keeps crashing.

I have the same issue even with the SCAD program. Doesn't render for some reason. Something is wrong

Thank you so much for this. I have been looking for a way to make them quickly and this is the ticket. Perfect!

Excellent Job! Wow, I had a need to print a very large bolt M30 and very long, 120mm. I used fine metric thread setting. I also used a thick M30 nut and a thin M30 nut. This was all to retrofit 57mm holders for my filament spool to mount using part of the stock filament holder on the CR-10s Pro. It really turned out awesome! A tip to anyone using this program, be sure to oversize your nut by perhaps 1mm on the I.D. (Inside Diameter) to make things go together smooth! Anyway, awesome job on the program!

I am trying to make som M5 bolts with a non threaded section. It would work except, that they all break because of an error in the program:

The countersunk bolt head ends in a diameter smaller than the thread_outer_diameter while the non treaded section is the same diameter - this gives a small indentation, that causes the screws to break.

I just found out how to correct it(probably breaks someting else): Remove "-0.5" in line 332.

hi peeps Im new here,
We Just got a ender 3 and I want to make my son some of these nuts and bolts to play around with,
as i think the pitch depth and many variables are a great entry way to the learning curve of engineering.
However I cant seem to work out how to export an STL file of anything below the first one in the list. Is there a tutorial on how to use this.
Sorry for my ignorance and any help would be greatly appreciated. Thanks to the up loader for this awesome work .

** Sorry for the hassle I seem to have worked it out :P

Hi, this work is really really cool & useful.
I would make a suggestion, nonetheless, for bolts...

When a unthreaded length is added to a bolt, user could define a radius for a fillet between the head and the un-threaded part, that requires to be smaller :

  • than he unthreaded length;
  • than the difference in radius between head & unthreaded diameter...

It is a small suggestion but anyway the work done is really great. Thanks.

I found a problem. The marriage of the threaded portion to the shank portion is weak. The smaller bolts and rods seem to work OK. I encountered the problem with a large diameter rod. I specified a 24mm rod diameter with about 100mm each of thread and shank. The thread pitch was 1 in 6mm. I used OpenScad and Cura 3.6. The resulting object is easily snapped in half. You can then also see that the attachment together looks like a "support" rather than a solid weld. In particular, there was a large diameter thin gap in between with just tacking around the circumference.

Strangely, the problem got worse when I elevated this object to stand on top of a larger cylinder of about 100mm height. I used TinkerCad to create this combined object. Note: You don't actually have to print the object to see a problem. In TinkerCad, there is some strange cross-hatching at the problematic boundary.

Finally, I "fixed" the problem by merging a little cylinder of about 20mm diameter and height into that area. The print was now strong and solid.

I really like this library because it produces easily printable nuts and bolts, but:

I found a bug in the hex nut / hex head routine which doesn't calculate the radius correctly when the number of facets is not 6.

In module hex_head(hg,df) you use rd0=df/2/sin(60); which only works for 6 facets.
For "any" number of facets to work I changed it to rd0=df/2/cos(180/facets);

Please check if the button head routine has a similar bug for the hex slot type. I couldn't quite figure out how it works.

I have tried and tried to print a M8 bolt with nut from this with openscad. No matter what i do the Nut doesnt fit the bolt. Am I missing something?

This is great. I can customize my projects instead of customizing projects to the hardware available.

This is by far the most useful thing on Thingiverse :) A couple of comments / questions: 1) You should maintain this on github where people can submit enhancements to you easily! 2) One issue that I see is that the nominal head diameter is not respected. Even the rounded socket head with no texture comes out larger than the specified diameter. 3) It would be great to have the nut and washer sections by default draw their diameter from the bolt section and be able to generate one or all of them at the same time. 4) There are some great knurled texture libraries out there now and it would be awesome to update the texture options to use these.

Brilliant, thanks so much. Bolt a tad undersize for nut but easy enough to adjust.
Thanks again

This is brilliant thank you!

It would be great to have a hex head with a philips in it as well in the future but this is great already!

For the life of me I just cannot figure out how to use this. What is the inner diameter as opposed to the outer diameter? Diameter of what? Inner part of the threads and outer part of the threads? Or something else. The parameters for the bolt and nut are not clear which is which. Is there somewhere in the 215 comments an explation of the fields? Some are not immediately obvious.

This looks totally cool, but the "rinse repeat" cycle can be murderous in the waiting...


Spoke too soon! I made some guesses that worked and by hit or miss figured it out. I have been searching for anything that could help me make threaded sets. FINALLY I found yours, and as it is a SCAD file, it is just perfect.
Thanks for your contributions!


Now, if it could only do fractions, I could approximate English threads...

I need an 5/16" - 24 UNF Bolt....and never heard of that kind of thread before.
Seems to be somewhere near a M8, but I can`t use this customizer to create such a strange thing as an 5/16” 24 :(

Comments deleted.
Comments deleted.

Don't expect to print the downloaded file of default 8mm bolts and have them fit a nut for a 8mm bolt. The threads are NOT metric, couldn't fit anything that fit the bolt. The file prints just fine, makes nice bolts and MATCHING nuts. Just don't expect the printed thing to match a commercial bolt or nut.
I will use this when I don't have a need like now where I need a 8mm bolt to put in a existing chassis.

Awesome! Makes putting screw holes into my models so much easier.

Thank you for this thing! Thumbs up to you!

  • Sent from 3D Geeks: Thingiverse Browser for Android
Comments deleted.

struggling with the complexity on this, the limited docs and the examples provided. I need to make a 1/2 screw, length 1.7 inches (including head) prefer with a phillips or standard screw driver slot. (going to be used as a plug to close a 1/2 pipe hole. Can any provide the example stl code to genrate with the library?

Does anyone know the settings for camera tripod mount thread? or how i work it out.
Also is it possible to add opposite thread to the library?

there is a camera tripod mount thread on thingiverse already. Search "nut & bolt 1/4" - 20 UNC for tripods/camera mount standard". I printed it and it does fit a camera mount very well at the recommended print sizes. I did have to rotate the stl along the x-axis 90 degrees though so they would lay flat rather than deal with removing supports from threads

Camera tripod threads are 1/4-20. How to make one with this, I don't know.

was this question ever answered? :P

Customizer doesn't make nut with different head size it's fixed to 8 the parameter doesn't work for the head!
I need a nut of 6mm!

This is a really nice, complete library. Thanks! I would love to see you add an option for a knurled head (alternative to the wing nut). There is a knurled surface OpenSCAD lib here: https://www.thingiverse.com/thing:32122/files

Knurled Surface Library v2
by aubenc

Thanks for the suggestion. It has been on my todo list for a while. Hopefully I can squeeze some time over the next few weeks, Cheers

Comments deleted.

Would it be possible to add an option to create rods with threaded ends? I notice that there is an option to an unthreaded length on the rod, but it would be nice to have that unthreaded length in the middle, for when you are using the rod to join e.g. a group of items together with nuts on the end, so you know that only a small amount of thread will get engaged.

Is there any way to change the thread angle?
Trying to replicate this:

Mirror it in the slicer?

In Customizer "/usr/local/bin/openscad/openscad: error while loading shared libraries: libCGAL.so.10: cannot open shared object file: No such file or directory"

Try to find libcgal13_4.11-2+b1_amd64.deb and install it with
dpkg -i libcgal*deb

Newest version of openscad needs libcgal13. In Debian (unstable, sid) just do
apt install libcgal13

Would these bolts be strong enough to hold my x-carriage for my new e3d v6 onto the bearing blocks? Wouldnt be much weight on them as its just the hotend. Not the stepper motor/extruder. Thanks!

Sorry but, all bolts are broken very easy :(

If you print horizontal with supports then the layers don't make weak points and these are a bit better. Also if you use some unthreaded part they seems stronger too.

/usr/local/bin/openscad/openscad: error while loading shared libraries: libCGAL.so.10: cannot open shared object file: No such file or directory

I was under the assumption you could open Customizer without downloading any programs, but this error code sounds like I need to download OpenCad?

I suggest just loading it locally with OpenSCAD. The error is on Thingiverse itself which is causing issues across the site.

Currently printing one bolt for test, would it be possible for texture to have knurled surface, instead of those lines (which are anyway ignored in Cura)?

It's been on my to do list for a while.

I managed to hack something by c/p parts from other scads

Well seems customizer is broken. So you need to download Openscad http://www.openscad.org/downloads.html

Copy the Code (click view source in thingiverse customizer)

Paste it in OpenSCAD then.

When you change something in the code press F5 to see effect. Finally press F6 to render it (This can take a while depending on your hardware)

Then export it as stl and be happy :D

<RuntimeError: Failed to get https://www.thingiverse.com/download:3145672 403: Forbidden>

Tried on 5 different browsers and 3 different machines.

Pls read comments on Nov 8 2017. This is a common problem with browser security settings and thingiverse.

You can always just download the openscad file and run it locally if needed.

did not helped me

I keep trying to make an m5 bolt but every time it comes up with the "#<RuntimeError: Failed to get https://www.thingiverse.com/download:3145672 403: Forbidden>" error code. what should I do?

Copy the source code and use OpenSCAD http://www.openscad.org/downloads.html

Customizer seems broken

Looks like a browser problem. Have a look at my reply to a similar problem on Nov 17.

I have the same problem. Whenever i try to generate anything i get the same runtime error

Looks like a browser problem. Have a look at my reply to a similar problem on Nov 17.

I could not find an issue on Nov 17 in this issue list. I have read about some problems with customizer and cookies but i don't this that is the problem. I accept cookies from customizer and still getting the same error message (#<RuntimeError: Failed to get https://www.thingiverse.com/download:3145672 403: Forbidden>) whenever i try to make a new bolt or nut etc.

I am also having this same issue.

Great library, I was able to do this tripod adaptor easily: https://www.thingiverse.com/thing:2745281

Hi Mike, I'm new to this & when I used customizer after setting all parameters, clicking create etc, checked queue & it showed error with this message

<RuntimeError: Failed to get https://www.thingiverse.com/download:3145672 403: Forbidden>, tried several times

was trying to create a rod, nut & washer, what am I doing wrong ( was creating rod length of 270 mm, might this be the problem)

Would appreciate your help please

Looks like a browser problem. Have a look at my reply to a similar problem on Nov 17.

Having the exact same problem, regardless of settings used. Even leaving at defaults, it will not render and export. Same error message every time. :(

I am also unable to use this customizer.
I always get the following error in the queue:

<RuntimeError: Failed to get https://www.thingiverse.com/download:3145672 403: Forbidden>

ok, Mike_mattala I stumbled around and found where to add into the approved cookies. added it and Customizer now opens !!
about to try it out !

Mike_mattala Sorry, But I know Little about changing settings in the computer .

Customizer is currently unavailable. Please try again later.

this is the message I get when I try to open Customizer

Thanks I'll try that !

wont open in customizer, now what ?

It is working, however, you may have an issue with your browser. Have you tried allowing cookies or adding "customizer.makerbot.com" to the browser's cookie allow list? Are you running adblocker?

You will find some info here: https://www.thingiverse.com/app:22/instructions

Im a complete noob to 3d printing and know enough about computers to be dangerous
I downloaded the file, and see the samle bolts, nut, washer but how do I set to print the size nuts bolts I need ??

No need to download - you can use the 'open in customizer' button directly in thingiverse. If you want to run the openscad file manually, you need to install openscad, load the file then edit the header section with your custom details.


Hello Mike,

Great work there. Just a Quick Question,

I modified the scad file for 6 mm bolt and nuts but the it shows only bolt on render page eventually exporting on ly bolt as stl. Where can I find the nut and washer. Sorry I'm a noob in this field.

Thanks in Advance

Just set the component type in the header, then export.

Thankyou Very mych Mike :)

Anyone actually get the textured option to work? It shows up in S3D but the printer/slicer just ignores the lines?

Good job!

Many thanks for share.

Love It!
Quite late to the game I know but this has made quick renders of screws/threads a dream, just wish I came across it sooner...
A Question...

Not sure if its by intent, but after creating a number of socket head cap screws and using them within a few models I realized that something was "off" and the heads didn't "fit" in the models where actual screws did.
I started checking and noticed that the heads (M3 for eg.) should be OD 5.5mm, however set to that set they were actaully being created 6.35mm dia, while the upper and lower unchamfered faces were 5.5mm...

Digging through I noticed the heads are getting created with module socket_head, within it the head appears to be getting being created larger due to rd0=df/2/sin(60), is this by design? Is there selection I'm missing to set the true head diameter?

I hope you don't mind, but after looking at that module (not really familiar with OpenSCAD) i noticed a couple other oddities if texture was set to true (at least with M3 settings) it wasn't touching the part, appeared offset beyond the head on the Y-axis, and was missing a facet.
I took a quick whack at it and just wanted to share the changes I made to socket_head in case its larger dimensioning is not intended which renders the same head but at the given diameter; "I think" it renders the texture possibly as intended as well.

module socket_head(hg,df)
//  texture_points=2*PI*(head_diameter/2); //original 
//  texture_offset=head_diameter/18; //original 
//  texture_radius=head_diameter/24; //original 
    texture_points=2*PI*(df/2); //SD Edit: to use standard names as elsewhere
    texture_offset=df/18; //SD Edit: to use standard names as elsewhere
    texture_radius=df/36; //SD Edit: to use standard names as elsewhere

//  rd0=df/2/sin(60); //original
    rd0=df/2; //SD Edit: remove enlargement of the cylinders radius

//  x0=0;   x1=df/2;            x2=x1+hg/2; //original
    x0=0;   x1=df/2*sin(60);    x2=x1+hg/2; //SD Edit: add reduction of the polygon to keep the chamfer 
    y0=0;   y1=hg/2;            y2=hg;

        cylinder(h=hg, r=rd0, $fn=60, center=false);
        rotate_extrude(convexity=10, $fn=6*round(df*PI/6/0.5))
        polygon([ [x0,y0],[x1,y0],[x2,y1],[x1,y2],[x0,y2] ]);

    if (texture=="include") //add texture to socket head. Adjust texture density and size using texture variables above 
//      for (i= [1:texture_points]) //original 
        for (i= [1:texture_points+1]) //SD Edit: add one more point to complete the translation around         
//          translate([cos(360/texture_points*i)*(head_diameter/2+texture_offset), sin(360/texture_points*i)*(head_diameter/2+texture_offset),1])//original
            translate([cos(360/texture_points*i)*(x1+texture_offset), sin(360/texture_points*i)*(x1+texture_offset),y1])//SD Edit: changed to allow the texture inside the head
//          rotate([0,0,360/texture_points*i])cylinder(r=texture_radius,h=head_height*0.6,$fn=3); //original
            rotate([0,0,360/texture_points*i])cylinder(r=texture_radius,h=hg*0.6,$fn=3,center=true); //SD Edit: changed to referece the y center and +- that position

I could also very well have just missed a setting, but I tried the customizer and got the same results, please let me know if it helps or I'm just wrong lol.
please excuse if this is a double post, apparently posting code breaks things and [code] doesn't work here...

Thanks for the feedback. The key measurements you are referring to are part of the original screw library which I don't maintain. I have made a couple of mods to it to remove deprecated code, but otherwise it is the original code. You may want to contact the author for more info. If I get time, I will have a deeper look.

Regarding texture, I was planning to add a knurling option as a better long term replacement for the existing texture option - just finding the time :)

Comments deleted.

Question about the nut Job scad. I was trying to design a simple 8mm hex bolt with 10mm unthreaded. The unthreaded is the same diameter as the threads (0). I get ONLY the hex head and unthreaded section of the bolt, any idea what i've screwed up.

ETA: Using thread_step of 1.25 (from note for m8) seems to never render.

Never mind, not sure what i did but it is working now, with 2 and 1.25. Sorry for the waste of space.

Great Job.

I highly recommend this collection.
The nut and bolt printed fine on my Monoprice Select, the first time.
I've used the Customizer and TinkerCad to make screw-on tops and winged-bolts, etc..

I print using PLA with Cura 1.5x set to:

  • Layer Height 0.15,
  • Shell Thickness 1.6,
  • Btm/Top Thickness 1.6,
  • Fill 33%
  • Print Speed 40,
  • Print Temp. 220,
  • Bed Temp. 60
  • No Supports,
  • No Adhesion structure.

NOTE: The default nut was a little loose on the M25x8 bolt.
I used the Customizer to make a M6x8.5 nut.

I cant render the bolts in openSCAD....its taking literally hours.....


Worked great

Comments deleted.

Hi, This is great! I would really like to create a nut with a taper on the inside of about 1 mm over 10 mm of distance, is there anyone who could point me to the part of code I need to be changing or how to achieve such a thing :P ?

This is used in tightening plastic nut for swivelling cell phone holders, like ones found on a car windscreen. Mine broke and I tried an ordinary nut printed from but it doesn't work properly due to not having the taper. (it's a 24mm ID and 2mm pitch nut btw.)

Worked for me on first print....bit weak in ABS at the head....a good tweak is the increase the transition from bolt head to threads since one rarely goes all the way down on the bolt bit it's minor the most you can get out of it is the minor space to the thread depth. However, that's significant if you must apply torque. Great job by the designer (mike)! Kudos!

Comments deleted.

I printed the nut and bolt (in Matchbox PLA) as one of my first projects on my new printer. I wanted the nut/bolt for my desk and scaled it up 200% in Cura (2.3.1) so people could handle it. The parts came out absolutely great even on medium quality with no supports. The threads are nice and clean, no sanding necessary. I did find that the nut is pretty loose on the threads though. Is this due to shrinkage in PLA or is was it my fault in scaling all three axes 200%?

I'm reprinting the nut at 197% (just a WAG on my part) to see if that would tighten it up on the threads. No pun intended. Hopefully when I get home I'll find the nut finished and fitting better.

It really depends on your printer tolerances, speed, cooling etc.regarding how tight you can make the fit. For an 8mm bolt, a gap of 0.8 mm (8.8 inner nut diameter) seems to work well for most. That translates to a 10% tolerance, but that is not proportional to scaling. In other words, the gap should not need to change, regardless of scale.

If you are scaling it 200%, I would guess a 1mm tolerance would be plenty. I would use the customizer to produce the nut and bolt rather than use the existing stl files which are just for demo purposes. For example, generate the bolt by doubling the basic dimensions and the same for the nut but with a 1mm larger inner diameter.

I'm trying to model my own 5/8-27 in fusion but I can't figure it out. Someone posted their design that was made possible by your files, but I can't figure out the 5/8-27 on the customizer. any help would be greatly appreciated.

Some basic metric conversion:

  • A TPI (threads per inch) of 27 is equal to a metric thread step of (2.54/27) = .9407 mm.
  • 5/8" inch diameter is 15.875 mm.
  • You will need to look up the thread type to check what step shape in degrees is needed. As a guess, the step shape looks like 30 degrees.

I hope that helps.

I want to design also some screws in CAD with the thread modeler, download
what kind of thead do you have there ? Is it a standard ISO M8x1.25 ?

Thanks :) - and apropos - great job ! i printed some and they worked fine.

The example nut and bolt were created with a 2mm thread step or pitch and a step shape of 45 degrees. Standard M8 bolts are 1.25 pitch and a step shape of 30 degrees. It depends on your printer, but the larger the step angle and pitch, the easier it is to print.

hi what slicer did you use .repetier host and cura engine wont slice threads.thanks

Not sure what slicer version or settings you are using, but tested on old and new versions of Cura, Simplify 3d and Slic3r and all performed perfectly.

thank you mike_mattala for your reply,i used repetier v1.6.2,cura 2.3.1,slic3r v 1-2-9a-stable.with default settings.the strange part is when I use your stl files they all work perfectly .I don't know why they wont do mine.i am using inventor 2016.thread modelling and coolorange tool.i don't have any problem with my other stl files,just for threads .thanks

I suggest generating your item using the customizer and publishing it. I can then check the parameters, download your stl file and test.

I printed some custom oddball screws in the range of M3.8 to M3.9, which I used to verify that some screw holes in a TV were slightly undersized. Having verified that I then ran a standard M4 tap through the screw holes to make them accept standard M4 screws. This model was a huge help!

Hi! Just wondering how strong they are? have you been able to snap one in two with your fingers?

The small screws that I made are not very strong at all. I made them to verify sizing but for actually mounting the TV I used standard steel M4 screws.

Comments deleted.

Damn! Just printed it in regular size and it fits perfectly as if it was already screwed in 50 times. Really Realy awesome!

Damn! Just printed it in regular size and it fits perfectly as if it was already screwed in 50 times. Really Realy awesome!


Thanks for the great work! I printed an M8 nut and bolt but the nut does not fit the bolt. I've tried increasing the outside diameter of the nut (beyond 9 which is set to by default). Any idea what is wrong?

Hi. Without knowing your printer, calibration settings, filament etc. it is difficult to answer your question. Apart from calibrating your printer, you may want to try printing a couple at a time to improve cooling. Good luck

Hey mike,

I printed 0.2mm resolution. ABS with raft. The printer is well calibrated. The bolt looks fine It seems that the nut is too small. I tried increasing the outer diameter and the nut's opening fits but the threads are the wrong size. I didn't change the default settings from your script. Simply switched to render the "nut" from "bolt" which was by default.

The issue seems to be due to S3D slicer. I have FFCP and when Replicatorg is used everything fits just fine... Anyone know why this is? The inner hole diameter is way off when printed using S3D.

I'm also interested in an answer to Asaeidi's question.

I'm also interested in an answer to Asaeidi's question.

I'm also interested in an answer to Asaeidi's question.

The issue seems to be due to S3D slicer. I have FFCP and when Replicatorg is used everything fits just fine... Anyone know why this is? The inner hole diameter is way off when printed using S3D.

Just about to start with designing and some printing in the near future. Thanks for the great project for me to learn a bit - and hoping it doesn't drive me nuts ...

Perfect modelling. Thanks a lot! I've just printed 3mm diameter without any problems. Perfect!

Thanks for sharing the great job. Just want to ask, how small can we go on those bolts and nuts ?

It really depends on the printer. For FDM printers 4mm diameter is about as low as I would normallly recommend, but with good cooling and printing multiple parts at once you may be able to go smaller. Good luck :)

How about an SAE version? I work with Metric too and this customizer is great for that, but right now I really need a virtual chunk of 3/8-16 threaded rod.

May as well do Whitworth, BSA and other odd thread forms.

Thread chard for UNC (coarse) UNF (fine) and UNEF (extra fine) thread sizes with metric dimensions for major diameter and thread pitch. https://mdmetric.com/tech/thddat9.htm

Find a chart with fractional inch to mm and it should be possible to get SAE size fasteners from the customizer.

I customized a chunk of threaded rod and it makes sharp crests and roots. ISO and UNC or UNF and other thread standards specify flat crests and flat or rounded roots. It would be nice to see this customizer setup to generate threads that match those.

Very handy, saves a trip to the hardware shop. thank you.

OpenSCAD is giving me the compiler warning
"DEPRECATED: The assign() module will be removed in future releases. Use a regular assignment instead."
Not a problem at the moment but will it be?
An absolute boon which lets me print all sorts of useful things
Thank you Mike

Always good to hear it being put to good use. Regarding the assign() module, it is part of a 3rd party library. I will have a look and see if there is a later version.


Good afternoon Mike,
I am having the same problem as JEttles above. Any changes to the openscad script yet?
Thanks and Regards
Chin Huat Tan

Not yet. It shouldn't cause any issues in the current OpenSCAD release. As mentioned, it is part of a 3rd party library. If a get time I will have a look at alternatives, but not likely in the near future.


Thank you.

just perfect thanks !!!!!!

3D printing technology is great!You can refer to the 3D printing technology in http://www.mayin3d.info/cong-nghe-in-3d-khong-gi-la-khong.html

Hi I have used this for a while and it is great !! but I have found I need SAE bolts and nuts too. Can you tell me how I might customize this
for american thread sizes like 5/8 X 11 or 1/4X20 Thank you for putting this up on thingiverse

Sorry about that if I would read all of the comments I would have seen that its not possible but still it works great in metric

Thank You - very impressive !!!
I am (was) an old school machinist and to now be able to call up and print - these - boggles the mind.
Just building my first 3D Printer and looking for things like this.
Again Thank You!!!

Thank you very much - exactly what I needed to make this:


Much appreciated.

Dowel, nuts and bolts for Minifig TP Holder

I would like to learn if/how can I use this to generate a standard M3, 25mm long countersunk bolt+nut. It is late and after staring at this for a few minutes I cannot figure it out ...


I'm trying to make a 63-3 x 45mm rod. Customizer times out on any diameter greater than about 40mm, and OpenSCAD running locally just seems to hang, going back and forth between "not responding" and doing nothing, at roughly 20 second intervals; I've let it run for about 40 minutes or so. It's using 25% of my processor time under Win 7 and the other 75% is idle according to Task Manager. The PC has 4GB of memory, OpenSCAD is using about 600M, there's 2GB "available" and 1.4GB "free". Any help will be appreciated, thanks!

I went ahead and clicked "Create" in Customizer regardless of the "script timed out" error, Customizer did in fact make the parts - maybe that error is only for the preview.

Preview could be the culprit. It is a very different process to rendering and has caused issues in the past with different graphics cards and the number of elements. Rendering is really all that matters for the final result.

Perhaps the advanced preferences in OpenSCAD might help. Some of the calculations are definitely CPU intensive, but it completes OK on my PC. I am using the following settings.

Turn OFF Rendering at 8000 elements
CGAL cache size 104857600 bytes
PolySet cache size 104857600 bytes

They may not be optimal but they seem to be working OK for me (W10 16GB Intel 4600 Graphics). The item you mentioned would likely require at least 10000 elements which could be the issue. I you limit it, it should at least respond, although the object may not be complete.

I apologize for being importunate, but I'd like to reiterate my request for "threaded tube" option. I pretty much never need to print a nut, but I have a frequently-recurring need for threaded holes in printed parts, so currently I make a nut and then slice off the outer hex shape with a boolean. Maybe I should just make a slightly oversized rod and use a negative of that in a boolean operation to form internal threads - will that work, or is there some other difference between bolt and nut threads?

Hi Julia

The threaded tube option is available. Just generate a nut with the number of surfaces you want for the resolution of the cylinder eg. 64 faces is commonly used for a cylinder


Except that there is no "number of surfaces" nut parameter enabled in Customizer :(

Sorry - facets not surfaces

I understood that :), but there's no control for the number of facets in Customizer - just the facet-facet width.

Under extended options

Ahhhhh, thanks, I stopped reading at "Washer Options", lol.

Haha, awesome solution, thanks!

Thank you for this. Having my extruder calibrated (https://www.youtube.com/watch?v=YUPfBJz3I6Y) I found that a gap of 0.8 between the bolt and nut fits really well (not too tight, not too loose).

You are welcome. I have added your suggestion to the instructions :)

I'd like to adapt your library to work with my (mcad nuts_and_bolts replacement)[http://www.thingiverse.com/thing:1259672]. I've been playing around a bit, but I'm not sure how the thread algorithm works. I'd like to do a better approximation of the M series thread than the hack that I'm using now.
Can you point me to some documentation of how yours works so I can wrap my head around it better?

Thanks again for the sweet library.

nuts_and_bolts - MCAD replacement (nuts, bolts, washers, T-Slots)
by txoof

By the way, you can get a HUGE performance increase if you remove the "intersection()" call inside the screw_thread module.

I just now realized that the thread library comes from this thing: http://www.thingiverse.com/thing:8796

I'll shout out to the creator for more help with the post above as well.

Poor man's openscad screw library
by aubenc

Really outstanding thread library. Very, very elegant! I'm really keen to give this a play. Thanks for sharing!

Very nice. Thank you. To print out a M2, M1 screw with 2 cm length what would be the correct values ?

Nice job Mike!

Thanks for sharing your hard work.

Phenomenal job on this one. So versatile and useful. A drive type of none would be useful feature for creating a toolless bolt that you can tighten with just your fingers.

Actually, you have that option already. Just select socket head, slot drive, slot width '0' and 'include' texture :)

I don't know how much work it took to create this but it sure has saved me a lot of work. Thank you for publishing this.

Prints up beautifully also. Smooth operation between screw and nut.

Really Nice ! Good Job & thanks for sharing !

I love this! however I have a question. Would it be able to customize the nut a little more?
What I mean by this is. I created a wonderful screw by your customize but I wanted to create a nut very similar.
My head of the screw has a round top because in your model you can specify the amount of sides and I want to create a nut with a round head. obviously in most cases this is a nonsensical design because you can hold on to it to tighten it. But I wanted to glue this within a tube so the nut needs to be round. Are you able to add a side option to the nut as well? I suspect it is similar code as your nut :)

It is actually on my todo list - hopefully I will get some free time soon :)

yeah!!!!!!! thanks so much :)

New version released with the features you wanted. Enjoy :)

yeaaaaaaaaaaaaaaah!!!! thanks so much :) :)

hi, may you create an very simple version of this customizer where we can chose (for ex.) m1-m24 and the lenght
that would be really great because i'm a noob at english so i have a quite few problems to use this one :)

agreed! one that used standard conventions like m1-m5 would be a god send for the laymen like us

I need a bolt and nut to fit a DSLR camera / flash mount. I think it is a 1/2-20 . . . I haven't had any luck searching for it, but wondered how I might customize "This Thing" so that it would do the trick.

were you ever able to get a customized version for this thread?

if you're talking about the bolt under the camera, that's a "c-style" mount, which is a 1/4-20

can you guide us in making one? thanks

When i update "thread_step" it's fine for bolt but it doesn't update nut thread, any work-around? It also would be nice for nut to have the same setting like "head_diameter" and "head_height"


Thanks for making the scad file available. For some reason the customizer has been having major problems today, but I was able to run the scad locally and get just what I wanted to make some adjustable feet for my printer. This is a really useful design, many thanks!

great work!
For some reason when I try to download the file from customizer, it gives me a json error:

<JSON::ParserError: A JSON text must at least contain two octets!>

Any ideas?

This is one of the best. Thanks for sharing.
One thing I would like is a Wing Bolt similar to the Wing Nut.

It´s god to see screws and Nut, what side is it, metrisch or zoll ?
i would like to have a collection, in M5 and M6. can you tell me a price? i don't have until now a Printer
kindly regard thomas thwagner.cfc@gmail.com

i will print them for you if your in the uk

The settings are all in metric. Unfortunately I cannot offer a printing service for you, but there are other sites that will do this for you such as 3dhubs.com.

Fantastically useful, in particular for its non-standard thread angle, which makes support-less printing easy. One feature I'd really like to see is a third nut option to just make an internally-threaded tube rather than a hex nut or wingnut. I need this component frequently for doing threaded bosses or holes in parts rather than nuts per se, and having to manually crop the hex shape off each time is a nuisance.

Thanks for your great work and for sharing.

New version released with the features you wanted. Enjoy :)

Hi Julia

Thanks for the feedback. I have a couple of enhancements I will be adding shortly, including the option you suggested. Stay tuned.


Great, Mike, thanks! If I may add another request: round threads, as widely used on bottles and jars.

This is the most useful app. I have come across in the past year. I have printed dozens of nuts and bolts. So versatile and strong .
Thank You ...

Wow! about the best thing i have found on thingiverse to use THANK YOU

I just printed off a nut and bolt. I can't believe they actually work and without any cleanup. Thanks for making this, it's incredible.

Comments deleted.

This is one of the absolute best customizer apps. Strike that, it is the best. i use it to print parrot toys for them and they think you are the best for this work. Thank you from the bottom of our human and feathered hearts.

Phenomenal model!!!
I know you have it set up to work with customizer now. Have you thought about setting it up so it can be called as a module from OpenSCAD? I don't know enough about customize to know if both can be made to work but it should be doable.

I have a project where I needed to put two different threads on different parts. I simply took all the up front variables and made them module parameters - I now from my model call nut_job(type="rod", ....) with just the parameters needed for that particular rendering. Then the part can be easily translated to fit where I want it in the model.

How small do you think these will print?

It depends on the printer, but anything smaller than 4mm diameter gets a bit tricky on my printer. If you keep the thread step at 2mm, step shape at 45 degrees and print multiple at once to improve cooling between layers, you can push the limits.

I'm not sure why, but when I download the .scad file and try to make a hex screw longer than 29mm (the length is the only setting i changed), the rendered screw is completely messed up. This does not happen in the customizer, though, so I'm not sure what is causing it. I am using the latest OpenSCAD release.

I just tested using the latest version of OpenSCAD on a 45mm bolt without any issues on a windows pc. Have you tried using another computer or altering the advanced preferences on OpenSCAD?

Ok, I just checked and it's only the preview mode that's messed up. When I render it looks correct, thanks. The only difference is that I'm running on linux.

The preview mode looks like this: https://i.imgur.com/2ybyxHK.png

OpenSCAD preview mode is bit buggy for example, difference calculations where the object subtracted has the same dimension value as the object it is subtracted from, often causes display anomalies. In some of my designs I have added small values eg. 0.001mm to fix display anomalies when using preview mode (f5) to render with OpenCSG, rather than the full CGAL render (f6). Customizer also uses an older version of OpenSCAD.

How about a acorn nut to round out the collection.

amazing!!! keep up man! with this, you have saved one my important project

Is the washer that is in the picture, in the downloaded files? I've re-downloaded several times and opened all .stl files, but cannot find the washer anywhere. Anyone have any ideas why I'm not seeing it?

Great upload by the way! Massively useful files! Thanks for the time spent on these.

I have added a sample washer :)

Comments deleted.

This is awesome! Just wish I could customize it to do SAE instead of metric.

If you need to you can look up a table of SAE thread pitches expressed in mm. Example: http://www.newmantools.com/tech/pitchconversions.htm

Awesome, thanks for the suggestion! I will have to give that a shot! Trying to build bolts for something I can't find the hardware for, but it is all standard.

Comments deleted.

Very nice! Thank you.

Comments deleted.

Hi mike_linus,

Thanks for the cool customizer! Can I also ask that you extend it for Robertson (Square) heads? Red Robertson is the most common size for general use. But Green is also used in smaller screws.

There is a nice chart on wikipedia:

Thanks again

Would it be possible to extend it for https://en.wikipedia.org/wiki/Torx Torx heads?

I will add it to my 'to do' list :)

Comments deleted.

Especially when using the customizer
Thank you very much :-)

Comments deleted.

Would be nice to be able to print insulated mounting HW for T0-220 and similar semiconductors.

Hi Jerome

You will need to change the variable values at the start of the openscad file eg.

/ [Component Type] /
type = "bolt";//[nut,bolt,rod,washer]

To generate a nut, change the value to:

type = "nut";//[nut,bolt,rod,washer]

You can change any of the key parameters by changing the variable values in the top section of the file and pressing f5 to regenerate. If you use customizer, these values are displayed as selectable options.

I hope that helps.


Mike, you're my new hero !
you've done a very pro and intuitive work ... I've also found the way to change a nut into a wingnut !
Thank you so much and take care !

Hello Mike.

I am a beginner on Openscad.
I have just opened your "scad" file and only see a single bolt without any other objects (nuts, wing, rod, ring, ...), even if i click on "display all"
Is it normal ?
Am i supposed to "unlock" the other objects in the code to see and modify them ?

Independently on your answer, i would like to thank you for your marvelous idea (and obviously i am not alone to do it) !


Comments deleted.

WHERE SHOULD I SEND ALL THE MONEY I'LL BE SAVING??? Wow this is fantastic! Thank you for this!!!

Comments deleted.

Great work ! - Is it possible to define for UNC threads?

I have had a look at doing this but it gets a bit messy trying to support all the older standards eg. British, UNC. I suggest using a conversion table If you need an older thread type.

Comments deleted.

I was able to use your bolt and nut to embed in a larger C clamp design for clamping a lamp on a table. Thanks!

I used these on a recent design. Thanks!

Only suggestion I would make is to make it so the wings on the wingnuts could be re-sized. They were a tad big for my design as the bolts were fairly close together. I made it work but it would be awesome if I could make the wings a bit smaller.

I have added adjustable wing sizing on wing nuts :)

wish there was a way to make small bolts and screws work :/ printer just cant seem to get to a fine enough detail for the threads

We're looking at some lazer/epoxy printer models for fine detail stuff. There's one on the market that is quite affordable, but the "ink" is not so affordable. So it would be perfect for the screws and other tiny bits. here's an example on youtube: https://www.youtube.com/watch?v=snOErpOP5Xk This tech is pretty new but expect it to really take off in the next while. It's efficient, high detail, pretty plastics, and very compact for the home market. It's just pricey for the photosensitive polymer "inks." Teamed with a cheaper filament printer, you would be quite versatile.

There are some techniques to try to print smaller objects. The main issues are cooling and the thread step angle. Most printers struggle with a step angle less than 45 degrees, but you can improve results by optimising cooling. Even for ABS, cooling fans can be used effectively on small objects. Also try slowing the print speed and printing multiple objects at the same time. This ensures there is plenty of time for cooling between layers and the print head does not spend too much time directly over the object, effectively overheating it.

I hope that helps - good luck :)

thank you for sharing this project

Comments deleted.

Standard bolt, nut and wing nut printed great on FlashForge Creator Pro with PLA, 0.2 mm layer height (first layer .35 mm), 210°C extruder temp, 70° first and 60°C others print bed temp, 20% infill. The nut is a bit loose though, I'll try reducing the outer diameter to 8.8 mm.

Thank you very much for this models and the scad file!

New Year update. Phillips and Slot drive support added.

Mike :)

I just released an update which includes optional surface texturing on socket heads and control over the number of facets on hex head bolts.

Mike :)

Thanks for this great tool, Mike. I downloaded OpenSCAD and used it to customize bolts for a plastic construction toy that had lost several parts. It worked great! Any chance that you could add the ability to inset screwdriver sockets in the hex heads? A Philips head option would be a great addition to this already useful toolset. Thanks again!

I just released an update with phillips and slot drive support. You can add the drive support to any head except hex at this stage.

Mike :)

Thanks for the feedback. I will see what I can do - the holiday project list is growing!

So freaken cool...thanks for making such a nice customizer!

You're welcome - thanks for the feedback :)

Hi Mike, great design :D I have used this a few times and love how easy it is to use. Is there any way you can change the HEAD on the ROD/HEX section to include X/inputted head facets? One application for this set, I wanted to make a thumbscrew, and have more than 6 facets on the head, and turned to your app - wishing this feature was there :)

Thanks again!

Thanks for the feedback. Is the preference for controlling the number of facets or providing surface texturing? I will see what I can do, time permitting.

Well both would be preferable, but if I had to pick then surface texturing.

I have updated the code as follows:

  • included ISO262 metric references to assist in generating ISO compliant threads.
  • improved the wingnut algorithm to better support unusual nut sizes.

Enjoy :)

Could you possibly make a version with customary measures, instead of metric ?

Sorry, unlikely to have the time. I suggest converting. "treybert's" comments below have some good tips.

Very useful thank you!

I wish customizer would work for me , all my pc's wont load it

Have you tried opening the OpenSCAD code directly in OpenSCAD and manually modifying the parameters? At least that will get the job done and help isolate the problem.

I don't have that, ill look for it ,I take it that its opensource and a free download?

It is open source and free - great software and well worth the time to get to know. Here is the link. http://www.openscad.org/

I suggest having a read of the first few pages of the user manual and you should be good to go (Customizer is just a set of scripts that run on top of OpenSCAD).

thanks great info, ill have fun tonight reading and tinkering

A very excellent generator. I just used it to make a 3/8-16 bolt with a through hole for a tripod time lapse rig I've been working on.
I stumbled through the metric to sae conversion a little, mostly because the terms are different.
So to save anyone else the trouble, all you need to change is
thread_outer_diameter (major diameter)
thread_step (pitch or TPI or threads per inch)
step_shape_degrees from 45 to 30
inch:mm conversions for threads can be seen here: http://en.wikipedia.org/wiki/Unified_Thread_Standard

hey Nice work mike_linus .. printed your model using UM2.. both the nut and bolt fits perfectly!
Can you tell me what profile have you used? Also about the entry and exit angle. I tried creating the same model in solid works using the parameters given in the customizer.. but couldn't get the correct fit after printing. rajimut

Hi rajimut. Not sure what 'profile' you are referring to. The design is written in OpenSCAD and the source is included.

mike_linus: I recently made use of a comment that was invaluable. If you generate the threads as repeatable sections, i.e. make a ten turn thread as 10 x 1 turn, then OpenSCAD caching massively increases compile speed.
Please see http://www.thingiverse.com/thing:311031http://www.thingiverse.com/thi... instructions, it is an invaluable lesson to any developer.

OpenSCAD ISO metric thread library / functions (updated)
by TrevM

Thanks for the tip. I am using the third party polyscrew library http://www.thingiverse.com/thing:8796http://www.thingiverse.com/thi... which is where the enhancements would be best exploited. Hopefully they are watching this thread.

Poor man's openscad screw library
by aubenc

Yes... "we" are watching :)
cannot tell how I did that OpenSCAD script, it's so long time ago... hopefully some day I will be able to polish a couple of details in another library that should be more easy to use and better coded.

this thing is awesome just one small idea any chance you can make an option to create all 3 at once instead of one at a time

Thanks for the feedback. Generating a nut, bolt and washer at once can be done, but would slow down compile times and add considerable complexity to the settings. I am not sure of the overall benefit except for some specific cases. Creating a "hollow" option is an interesting idea that I will look into, when time permits :), although depending on the material and use, you would need to be careful to maintain the strength.

Regarding the "hollow" matter... it's quite straight forward to do it at slice-time. It can be done by setting wall thickness value (or number of shells) together with infill = zero. At least this is how I do it.

Thank you very much!

Thanks for the feedback. I will see what I can do.

Nice work!

But it would be more helpful if we could have some presets for common thread piches etc.

Well done!! Love the wingnut!