A gear that can mesh with a rack with out undercutting can mesh with any other gear of equal or greater size without undercutting. Standard gears with the same diametral pitch and same pressure angle are interchangeable. A rack is a gear with infinite diameter. On a rack, the involute becomes a straight line. Hobs act like a bit in a milling machine.
Shapers have a translating cutting stroke.
The type of cutter determines the minimum number of teeth possible with out undercutting. The hob represents the worst case, since it is like a rack. For a gear cut with a shaper, the minimum number of teeth may be given by the shaper, if N of the shaper is known.