Generation of screw- or gearlike surfaces