by droftarts, published
This thing will create a range of metric and imperial tooth profile pulleys, with any number of teeth, specified in the Openscad file.
Tooth profiles currently supported are MXL, 40DP, XL, L, T2.5, T5, T10, AT5, HTD (3mm, 5mm, 8mm) and GT2 (2mm, 3mm 5mm).
NOTE: error in script regarding L and H pulleys spotted by OSTycoon (see comments) - the script says H, but actually it is L profile.
There are a range of editable parameters for editing the fit of the tooth (to account for printer variation), the pulley base, captive nut(s) slot for the set screw, motor shaft diameter, pulley height and belt retainers.
The attached stls are reference pulleys, mostly around the size used on repraps.
Download openscad file
Tweak to make your perfect pulley
Print
3.1 If you get blobs and/or stringing, you may need to reduce the perimeter speed, perhaps as low as 10mm/s depending on your electronics/baud rate etc. The model is high resolution, and slicing software will produce lots of very short moves, that the comms may not be able to keep up with. Alternatively, print from SD card. Printing slow should improve the tooth shape, and fit of the belt.
Rejoice!