This is some STL files and a parameterized model generation tool using Autodesk Inventor. It's set up so the dimensions for the nuts and bolts are stored in an Excel spreadsheet, and if you edit the spreadsheet, the model(s) get updated accordingly.
The zip file contains the Inventor part files and the spreadsheet, which all need to be kept in the same folder for the parameter changes to flow.
The threads are based on the ISO standards found here (http://en.wikipedia.org/wiki/ISO_metric_screw_thread) with a couple of variations; the tooth pitch isn't restricted to 30 degrees as you can change this in the Excel file, and the tolerance is settable in the spreadsheet as well, so the prints "just work" the first time you print them.
Note that the tolerance setting is subtracted from the nut, and the bolt is printed unaltered.