In the past I did some CAD experiences with Houdini. The advantage of Houdini is the procedural concept, that allows you to make it very easy to modify and adjust values, or duplicate stuff.
After some experiments, I decide to redux my old whGear SoftImage|XSI Plugin, see SoftImage Plugin whGear for Houdini
With whCogWheel you can create cog wheels very freely. I decide to not make it technical correct, because that would take the free style to adjust parameters you maybe need. If you use it for printing, you can adjust all parameters to fit the print-out to the thing you need.
Here a small picture of the output geometry with edge groups:
All parameters are very roughly explained in the help
See some example results on my CAD mit Houdini page