A numerical control device that controls movement of a processing tool which applies internal surface processing to a recessed part formed in advance in a workpiece, the numerical control device configured to execute a processing program stored in a memory accessible to the numerical controller, wherein execution of the processing program causes the numerical control device to:
- give a processing command to a connected processing device on a basis of the processing program;
- pre-read and analyze blocks of the processing program to determine a type of control command for the movement of the processing tool;
- and
- set a moving path to be taken by the processing tool upon completion of the internal surface processing on the workpiece, wherein in the setting of the moving path to be taken by the processing tool, the numerical control device further:
- sets a retreat position with respect to the recessed part to be assumed by the processing tool upon completion of the internal surface processing, on a basis of the pre-read and analyzed blocks of the processing program;
- sets a stop angle to be formed upon completion of the internal surface processing by a cutting edge attached to the processing tool, on a basis of a moving direction in which the processing tool is to move from the retreat position;
- and
- sets a retreat path from the stop position to the retreat position to be taken by the processing tool upon completion of the internal surface processing,
- wherein the stop angle is set in such a manner that a pointing direction of a tip of the cutting edge falls within a stop range defined so as not to have a moving vector component oriented in a same direction as the moving direction.