Automatic lathe machining