Patent ID: 7457684

Claim:
An automatic programming device that creates a machining program for machining a workpiece into a product model with a machining tool, where an area for the machining is determined by using a work model and the product model with a numerical control device for a two-spindle machine having a first main spindle and a sub-spindle and a one-spindle machine having a second main spindle, the automatic programming device comprising: a memory storing software instructions; and a processor executing said software instructions, wherein the software instructions comprise: a first machining-program creating unit that creates a machining program for the two-spindle machine, including a first machining program for a first process that is performed by using the first main spindle and a second machining program for a second process that is performed by using the sub-spindle; a second machining-program creating unit that creates a machining program for the one-spindle machine, including a third machining program for a third process and a fourth machining program for a fourth process that are performed by using the second main spindle; and a selecting unit that determines a type of a machine to use, and selects either one of the first machining-program creating unit and the second machining-program creating unit to start, based on the determined type of the machine, wherein the first machining-program creating unit executes a first process development processing for dividing a first machining for the first process and a second machining for the second process into a plurality of machining units, wherein the plurality of machining units form a unit of machining in which a continuous machining is performed with said first main spindle, said sub-spindle, and said machining tool, and wherein the second machining-program creating unit executes a second process development processing for dividing a third machining for the third process and a fourth machining for the fourth process into the unit of machining, separately for the third machining and the fourth machining.