OpenSCAD program to generate screws following the metric standard. Various screw head types and slots. Real thread. Create threaded nuts also. Can generate screws without thread for modelling.
M2 though M14 can be created. Its really easy to add new screw sizes to the array of existing definitions.
Use openSCAD to load the codefile. At the bottom of the file the samles as shown here are generated by a single call per item.
Have just updated the library. An error was discovered which made the threads slimmer at the end of the screw.