I'm trying to make an involute spur gear generator but can't seem to get it right. I know that the diameter of the base circle of the involutes is equal to the pitch diameter * cos(pressure angle). But this means that as I increase the number of teeth and the pitch circle gets larger, its scale relative the base circle also increases. And at a certain point, the pitch circle passes the the intersection point of the two involute curves that will make up the sides of a tooth! (My tooth sides are made of an involute in standard position, and one that is mirrored and rotated by an appropriate angle)
That is impossible. The whole point of the pitch diameter is that the thickness of the tooth $X$ equals the gap $Y$ at that radial distance.
Take one profile and rotate it half the tooth separation angle and where it intersects the other profile is where the pitch diameter is.