Pitch diameter means the "effective" diameter of the gear.
The outside diameter is slightly larger.
You must use the pitch diameter to determine the spacing of the shafts.
For example, assume that you have two gears, one with 90mm pitch diameter and 93mm
outside diam and the other with 45mm pitch diam and 48mm outside diam.
The spacing of the centers of the two parallel shafts would then be 90mm/2+45mm/2=67.5mm