I 3D printed a timing pulley, calculating the diameter as:
pitch x number of teeth / PI
The result was a (100 tooth) pulley that was about two pitches too large in circumference. (A 20-tooth pulley seems fine as the error is too small to have an effect).
I couldn't find a clear calculation online, but measured a real 66 tooth pulley which was just over 98.2% of the calculated diameter.
I did find a diagram that showed how the pitch line is some distance 'up' the teeth, but no formula for calculating the amount of compensation for this.
I'm printing a second pulley using the empirical figure of 98%, as this seems right if the original size was two pitches too large for a 100 tooth pulley.
But it would be nice to know a formula for calculating the correct figure, especially if I create machine pulleys in the future.
Neil