Switching of machining conditions during machining