Yes I do occasionally make stuff out of Lego. At some point I got annoyed that i only had up to 64 teeth gears and decided that i could make my own.
For some other project I bought the excellent Gear template generator from woodgears.ca
After a bit of experimenting i found the parameters for making Lego compatible gears:
Tooth spacing: 3mm
When machining gears to exactly the measurements produced by the program you get a remarkably good fit.