Patent ID: 7487006

Claim:
An automatic programming method of selecting workpiece data from a workpiece database in which a material, a shape, and a dimension of a workpiece are registered, creating a workpiece model for lathe turning based on the selected workpiece data, and creating a program for controlling a numerical control device based on a product model for lathe turning and the created workpiece model, the automatic programming method comprising: workpiece selecting including selecting workpiece data involving a product shape and having a smallest diameter for lathe turning around a turning axis from the workpiece database, by comparing dimension data of the workpiece data with dimension data of the product model in a state in which the product model is arranged on the turning axis and the workpiece data is arranged so that a center axis of each workpiece matches a center of the turning axis; and selecting, from a plurality of workpiece data involving the product shape and having the smallest diameter for lathe turning around the turning axis, workpiece data having a length equal to or longer than the product shape and a shortest length; and creating the workpiece model for lathe turning based on the selected workpiece data.