Rotary groove machine