A machining program generation method implemented by a postprocessor device that outputs a machining program for controlling a CNC machine tool, comprising:
- a step of reading information about a characteristic shape to be machined from cutter location data (CL data) including information about a characteristic shape in addition to information about a tool path, wherein the CL data is data generated by a main processor device based on CAD data;
- a step of setting one or more set sections on a tool path in response to the information about the characteristic shape;
- and
- a step of generating a machining program including instruction for changing at least one parameter to be used for controlling at least one axis of the CNC machine tool outside the set section and inside the set section,
- wherein the information about the characteristic shape includes information about a section in which a tool contacts an edge of a workpiece on a tool path,
- wherein the parameter includes a command speed, an allowable acceleration, an allowable jerk, and a time constant related to acceleration/deceleration control for a spindle outside the set section and inside the set section, the set section being a low-speed section having a start point and an end point set such that the low-speed section is larger than the section in which the tool contacts the edge of a workpiece on the tool path,
- wherein the information about the characteristic shape to be machined are inserted into the CL data as comments in the form of tagged text, and
- wherein the start point of the low-speed section is separated from a start point of the section in which the tool contacts the edge of the workpiece on the tool path by a distance corresponding to the time constant, and the end point of the low-speed section is separated from an end point of the section in which the tool contacts the edge of the workpiece on the tool path by the distance corresponding to the time constant.