Producing gear wheels or similar articles with grooves or projections