Making gear wheels, racks, spline shafts or worms