Abstract:
The present invention comprises a system and method for generating a CNC program for machining a part having planar and curvilinear surfaces and surfaces of revolution comprising an interface for inputting part information including for at least one face corresponding to at least one surface of the part and having face information comprising a boundary, an orientation, and a type of machining function corresponding to the face. A set of features corresponding to each face is also input via the interface. Thereafter a set of machining operations to machine the set of features is generated. The machining operations are optimized to achieve a minimum process time to machine the part.

Description:
This application claims the benefit of U.S. Provisional Application Ser. No. 60/076,261 filed Feb. 27, 1998. 
    
    
     FIELD OF THE INVENTION 
     The present invention relates to a system and method for automatically generating a computer numerical control (CNC) machine program for machining parts with multiple planar and/or curvilinear surfaces. More particularly, it relates to a system and method for generating a CNC program by representing a complex, tooling intensive part as a plurality of simple planar and curvilinear faces and related elementary features (such as, for example, holes, slots, and pockets) of these faces. 
     BACKGROUND OF THE INVENTION 
     CNC machines cut material from a workpiece to produce a specific part using a plurality of cutting tools in a sequence of machining operations. The CNC machine moves the tools and the workpiece in three-dimensional space in a pre-determined path, facilitating their interaction and resultant material removal. The examples of CNC machine tools shown in FIGS. 1a, 1b, 2 and 3 are more accurate and productive than manual machines. 
     A computer supervises the motion of the CNC machine by executing commands of a CNC program. These commands define the tool to be used, the tool&#39;s cutting feed and rotational speed information, and describe a tool path necessary to remove material for a given operation. The CNC machines recognize special languages that differ from one brand of machine to another. The languages of the CNC machines are typically cumbersome for humans and are not user friendly. 
     Computer Aided Manufacturing (CAM) software systems simplify the process of generating the CNC program in some cases. CAM systems accept graphic design input in an interactive manner, and often in a 3D solid model form. Traditional CAM systems grew out of Computer Aided Design (CAD) and Computer Aided Engineering (CAE) systems. The focus of CAD and CAE is on the functionality and properties of the entire part. In this context, solid modeling is essential to investigate various properties of the materials, e.g., such as heat distribution or deformation under stress. 
     In contrast to design and engineering applications, a machining application is essentially a surfacing process. Often only a small segment of the entire part surface is machined. As an example, only the mating surfaces of metal cast parts are machined, leaving most of the surface in rough form. The machinist is interested only in the surfaces on which he has to work and the relationship between these surfaces. Although the global coordinates of all the part elements are known in the solid model produced for the design and engineering application, for a machining operation the operator is required to create a local coordinate system for each surface that requires machining. This procedure is difficult and labor intensive for a machine tool operator. 
     A typical machine part includes of one or more surfaces wherein each surface may contain multiple standard mechanical features, e.g., holes, slots, pockets, grooves, or threads. A mechanical drawing of the part contains sufficient information about the geometrical shape, the features, and the material of the part to define the part. The features are typically referenced to a surface on which they are located. Each surface is drawn as a separate view of the part. The surfaces may be planar or curvilinear surfaces created by a milling procedure or a curvilinear surface or a surface of revolution created by a turning procedure. Machining the features involves using a large number of cutting tools and setting machining parameters for every operation. For example, a simple tapped hole may require a minimum four tools: center drill, drill, tap, and chamfering tool. Numerous parameters such as speed, feed rate, and depth of cut might be required for each operation. In order to optimize the manufacturing process, the sequence of machine operations may have to be changed from the order in which the data were initially entered. Cost effective production dictates minimizing time invested in generating a validated CNC program and maximizing tool and equipment utilization. Expert knowledge is essential in organizing an efficient production process. 
     Since the tools and sequence of operations for a CNC program in most CAM systems are a function of the machine&#39;s capabilities and the operator&#39;s practices (which differ from one machine shop to another), they are usually defined by the operators. Therefore, while traditional CAM systems provide assistance in tool path calculations for jobs with sculptured and free machine surfaces, they do not offer much help for machining parts with many distinct features that require using a large number of tools. 
     One way to simplify entry of tooling information is described in U.S. Pat. No. 4,521,860 to Kanematsu et al. This patent discloses a special CNC computer that allows entry of three modes of operation connected to specific keys on a front panel. Each mode contains a pre-determined number of operation units such as hole drilling and tapping, slot milling, or pocket milling. The units allow entry of a combination of geometrical and tooling information that can be reused. Establishing hard rules for entering machine data into predefined units allows the computer to reuse the information within the confines of one surface of a part. 
     In addition, there are CAM systems for programming planar (two-dimensional) milling machines that include automated CNC program generators for tooling intensive parts produced on CNC drilling, boring, or planar milling machines. These systems have the capability of subtly capturing the operator&#39;s expertise in machining part features on a flat surface and reapplying this knowledge to machining the same or similar features on the same or different parts. To further simplify the program preparation process, the system allows the operator to identify several planar surfaces on a part, program each surface separately, and then generate one CNC program for the entire part. 
     CNC Milling Machines and Machine Centers, shown for example in FIG. 1A, are used for producing essentially flat or sculptured surfaces and for machining features (such as holes, slots, and pockets) on these surfaces. In this system, the workpiece moves in a linear fashion, while the cutting tool simply rotates. Relative to the cutting tool, the part moves in the X-, Y-, and Z-directions. Multi-Axis Machining Centers, shown for example in FIG. 1b, allow tilt to A-, B-, C-angles around X-, Y-, and Z-axes, respectively. Simpler machines, like CNC drills and bores, cut material only on one axis. 
     A CNC lathe (CNC Turning Machine), shown for example in FIG. 2, produces parts having curvilinear inner and outer surfaces of revolution, e.g., solid or hollow cylinders, cones, semi-spheres, and parts with surface features created by rotational movement of the part including grooves and threads. To create a round surface, the CNC lathe rotates the workpiece while moving the cutters in the plane of the rotational axis. In this respect, the CNC lathe differs substantially from CNC mills, drills, and bores. The CNC lathe cutters typically have only one cutting surface. This places additional constraints on the tool orientation in the process of automatic CNC program generation. 
     The newest CNC Turn-Mill Machining Centers, shown for example in FIG. 3, combine the capabilities of CNC milling, drilling, boring, and turning machines. A complex part having planar and curvilinear surfaces can be completely manufactured by one machine in one set-up. The Turn-Mill machines make parts with greater precision than other CNC machines because they eliminate the need to reposition the workpiece between turning and milling operations. The programming of these powerful machines, however, represents a significant challenge for the machine operators. 
     BRIEF SUMMARY OF THE INVENTION 
     The invention provides a visual system and method for automatically generating a CNC program for machining parts with planar and curvilinear surfaces. These parts generally require a plurality of faces to visually define the part. A face is a two-dimensional view of the part that presents a graphic representation of information detailing a particular surface and a number of features (such as, for example, hole, slots, grooves, and threads) dimensionally referenced to the particular surface. A face may represent planar or curvilinear surfaces. Parts that require a large number of tools to machine the features are typically referred to as &#34;tooling intensive parts.&#34; The subject invention uses a graphical user interface (GUI), that allows multiple windows to be displayed and accessed simultaneously on a computer monitor. 
     The system of the present invention comprises a graphical interface for inputting part information for defining (a) a plurality of faces, each face corresponding to a surface of the part and being displayed in a separate window, (b) a set of features associated with each of the plurality of faces, and (c) a set of machining operations and cutting tools associated with each element of the set of features. The system of the invention also comprises a datastore memory element, in communication with the interface, that maintains a datastore for storing the part information and a process optimization module, in communication with the datastore memory element, for receiving the part information. The process optimization module includes a memory element for maintaining a materials machineability database for selecting operational parameters for the set of machining operations and cutting tools and thereafter selectively ordering the set of machining operations. A code generation module, in communication with the process optimization module, that receives the ordered set of machining operations. The code generation module includes a configuration subsystem for creating a configuration file and thereafter using the configuration file to convert the ordered set of machine operations into a CNC program for machining the part. 
     The method of the present invention comprises the steps of inputting part information defining (1) a plurality of faces, each face corresponding to a surface of the part, (2) a set of part features associated with each of the plurality of faces, and (3) a set of machining operations and cutting tools associated with each element of the set of part features; storing the part information in a datastore memory element; selectively ordering the set of machining operations using a materials machineability database; and converting the ordered set of machining operations into a CNC program for machining the part. 
    
    
     BRIEF DESCRIPTION OF THE FIGURES 
     FIG. 1a and 1b illustrate examples of multi-axis CNC milling machines. 
     FIG. 2 illustrates an example of a CNC lathe with two tool turrets. 
     FIG. 3 illustrates an example of a CNC turn-mill center. 
     FIG. 4 illustrates an engineering drawing of a machinable part. 
     FIG. 5 illustrates a block diagram of an embodiment of a system of the present invention. 
     FIG. 6 illustrates three examples of a window of a GUI for use with the present invention. 
     FIG. 7 illustrates three examples of another window of a GUI for use with the present invention. 
     FIG. 8 illustrates an example of another window of a GUI for use with the present invention. 
     FIG. 9 illustrates three example of another window of a GUI for use with the present invention. 
     FIG. 10 illustrates an example of another window of a GUI for use with the present invention. 
     FIG. 11 illustrates an example of another window of a GUI for use with the preset invention. 
     FIG. 12 illustrates an example of program code generated by the present invention. 
     FIG. 13 illustrates a three-dimensional, solid model generated by the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The system and method for generating a CNC program for machining parts with planar and curvilinear surfaces and surfaces of revolution according to the invention is illustrated in the drawings. FIG. 4 illustrates an engineering drawing 10 of a part 12 having a plurality of planar and curvilinear surfaces and surfaces of revolution. All of the information necessary to define the part 12 can be derived from the drawing 10. The drawing 10 contains pictorial and dimensional information defining the surfaces of revolution 12, 14, and 16 and the planar surfaces 18 and 20. The part 12 detailed in the drawing 10 would typically be machined from cylindrical stock three inches long and two and one-half inches in diameter. The drawing 10 may be a hard copy paper drawing or a standard formatted electronic drawing file, such as Drawing Exchange Format (DXF) or Initial Graphic Exchange System (IGES). The drawing 10 includes the geometry of the part 12 and the material makeup of the workpiece used to make the part 12. If the drawing 10 is a paper drawing, the information may be input to the system of the present invention using a conventional CAD program incorporated into the system of the present invention. The CAD program provides an operator with graphic tools to input the part information into the system, as specified in the drawing 10. 
     The present invention may be implemented using hardware, software, or any combination thereof. Furthermore, the system of the present invention may be incorporated into any one of the devices illustrated in FIG. 1-3. FIG. 5 illustrates an example of the components of the system of the present invention. These include a central processing unit (CPU) 24, a control program memory element 26, a cycles database memory element 28, a tools database memory element 30, an interface module 32, and an operations module 34. The CPU 24 controls the operation of the present invention and may be any processor capable of controlling such a system. The control program memory element 26 stores a control program that directs the CPU 24 to operate the system and implement the method of the present invention. The control program memory element 26 may be incorporated into the CPU 24 or may be a separate memory element. Similarly, the cycles database memory element 28, the tools database memory element 30, and the interface module 32 may be incorporated into the CPU 24, or may be separate elements or combined in any fashion to improve the functionality of the present invention. The operations module 34 includes a datastore memory element 36, a process optimization module 38, and a code generation module 40. 
     The interface module 32 enables an operator of the present invention to open a GUI, for example, a window 42 similar to one illustrated in FIG. 6. The window 42 includes a menu pull down system 44 and an icon system 46, that operates in conventional manner. Using the menu pull down system 44 and/or the icon system 46, the operator enters part information describing each surface (14-20) of the part 12. The part information is stored in a datastore memory element 36, which is a memory element capable of storing data. The part information includes information defining a plurality of faces 48, each face corresponding to a different surface (14-20) of the part 12. Each of the faces 48, required to define all of the surfaces of the part 12, is illustrated in a separate window and associatively stored in the datastore memory element 36. For example face 48a is illustrated in window 42a, face 48b is illustrated in window 42b, and face 48c is illustrated in window 42c. The face information includes a boundary, an orientation, and a type of machining function required to machine the particular face 48. If the drawing 10 is an electronic file, it is preferable that the geometry of each face 48 be illustrated in a separate face window 42. If, however, this convention is not followed, CAD tools allow the geometry of each face 48 to be copied and pasted into a separate face window 42. 
     Because the faces may be of topologically different types, a graphic icon 50 in a corner of a given face window 42 graphically identifies the face type. For example, icon 50a displayed in window 42a represents a turn surface, the icon 50b displayed in window 42b represents a surface milled on a flat end of a round workpiece and the icon 50c displayed in window 42c represents a cylinder milling surface. The capabilities of a particular CNC machine determine the available selection of faces. Using the pull-down menu system 44 available in the face window 42, a dialogue window 52 associated with each face window 42 may be opened. The face parameters dialogue window 52, an example of which is illustrated in FIG. 7, includes a pictorial representation 54 of the particular face type, corresponding to the icon 50, and a plurality of descriptive parameters of the face boundaries and parameters relating the positioning of the face relative to a coordinate system of the CNC machine. Using the face parameters dialogue window 52, the operator may input the values for each of the boundary and positioning parameters to define a particular face. The information for each face, input using the dialogue window 52, is separately stored in the datastore 36 in the form of a record for each face 48. 
     For each face 48, information defining a set of features associated with the face is input to the system using the GUI. Using the pull down menu system 44, the operator may open a cycles dialogue window 56, an example of which is illustrated in FIG. 8. The cycles dialogue window 56 enables the operator to define a cycle for machining a particular feature. A cycle is a set of operations for machining the particular feature. For example, the cycle illustrated in FIG. 8 includes four operations for creating a tapped, chamfered hole. The cycle parameter information includes the tooling, cutting path, and other operations information needed for machining a particular feature. The cycle includes an operation type, a canned cycle, a hole diameter, a hole depth, and a tool ID number. Using the cycles dialogue window 56 the operator may create a new cycle or gain access to the cycles database stored in the cycles database memory element 30 for retrieving a previously defined cycle. Each time a new cycle is defined it is stored in the cycles database for later use. A retrieved cycle can be reused or modified to create a new cycle. The cycles dialog window 56 displays the cycle parameter information using an easily modifiable table 60 with icons 62 of the tools used the cycle. This facilitates quick and easy modification of existing cycles to create new cycles. Once the cycle has been defined, it is applied to the face 48 through which the particular cycles dialogue window 56 was opened and is illustrated in a work space 58 in the face window 42 using a graphic representation of face features (e.g., holes, slots, pockets, grooves, and threads). A cycle for machining each feature of a particular face must be applied to that face. A listing of all of the cycles for a particular face will appear in the work space 58. Each feature requires a cycle to machine that feature. A cycle record, including the cycle parameter information, is created for each new feature and the cycle record is stored in the datastore and associated with the appropriate face information. 
     When defining a new cycle or modifying an existing cycle, the system draws information from the tool database stored in the tool database element 30. The tool database maintains a tool record for each tool available to the CNC machine. The tool database provides a complete predefined tool capability description for the CNC machine. Using the pull down menu system 44, the operator may open a tool dialogue window 64. The tool dialogue window 64 enables the operator to define a plurality of tools, e.g., end mills, face mills, slot mills, centering tools, dove tail mills, thread mills, spot drills, drills, cornering tools, bores, reams, taps, chamfers, facing turning tools, grooving tools, turning cutters, and threading tools, available for use by the CNC machine. The tool dialogue window 64 contains a pictorial representation 66 of the particular tool and a list of tool parameters. The tool parameters describing the tool are entered once and permanently maintained in the tool database as long as the tools are available in the given CNC machine. The system is capable of simulating and displaying the tool path and the process and material removal to shape a particular part feature. The system includes the ability to define special custom-shaped tools provided to a given CNC machine. 
     Once all of the features are described for all of the faces, the face information and the machining operations for each of the cycles is transferred from the datastore 36 to a memory 68 of the process optimization module 38. The process optimization module 38 schedules the machining operations to minimize process time. In the process optimization module 38, the cycles are dissembled into simple, individual machining operations and then the operations are grouped by tools, thus minimizing the number of tool changes. The CNC machine constraints define the sequence of operations. For example, in hole making processes, small diameter drills are used before larger diameter drills, and taps are used after drills. In milling, roughing mills are used before finishing mills. 
     Using a material machinability database stored in a material database memory element 70, the process optimization module 38 selects the optimum tool cutting speed and feed for each operation. The material machinability database contains recommended material removal speeds as a function of tool parameters, such as diameter and number of cutting edges. The machinability database information may be presented in customizable charts 72, illustrated for example in FIG. 10. The operator may modify a standard chart by dragging the points on the chart up or down to suit his experience. The cutting speed and feed, once selected, is automatically reused for subsequent applications for other tools with the same material. The process optimization module also minimizes the process time by eliminating redundant tool changes and part repositioning in order to machine different faces. 
     The process optimization module generates a process table 74, an example of which is illustrated in FIG. 11, that includes the selectively ordered machining operations. The rows in the process table 74 correspond to machining operations describing the tools and operations. Each row includes a tool icon, a feed speed, a tool speed, a face to which the operation is to be applied, and the time to perform the operation. A special synchronization entry allows the operator to schedule operations to avoid tool collision from machines with multiple simultaneously operating tool-holding turrets and multiple spindles. The latter allows simultaneous cutting of the material from both ends of the part. Reordering of the display rows in the process table 74 changes the machine operation sequence. 
     The code generation module 40 uses the process table data and a machine specific configuration file stored in a configuration file memory element 76 to generate a set of code 78, an example of which is illustrated in FIG. 12, for use by a CNC machine. The machine specific configuration files are created using a post configuration subsystem 80. This allows an advanced user to customize an output of the code generation module 40 to generate code in a format compatible with any one of a variety of CNC machine types. If the part, according to the manufacturing process, has to be produced on more than one CNC machine or on a multi-spindle machine capable of execution of more than one CNC process, the code generation module 40 will produce a plurality of CNC programs. These programs may include special codes that synchronize execution of parallel processes. 
     The configuration file created with the post configuration subsystem 80 is used by the code generation module 40 as a set of templates to convert the process table data into a CNC program code 78. A separate template corresponds to a different action such as G01=linear move or G06=tool change. Templates use a combination of specific characters (called &#34;letter address characters&#34;) such as &#34;X&#34;, &#34;Y&#34;, &#34;Z&#34;, and variables such as &lt;X-COORD&gt;, &lt;Y-COORD&gt;, &lt;Z-COORD&gt;, to indicate the sequence of data. For example, a linear move template commonly looks as &#34;G01X&lt;X-COORD&gt; Y&lt;Y-COORD&gt; Z&lt;Z-COORD&gt;&#34;. The code generation module 40 converts a template into a CNC program code 78 by substituting variables with their corresponding value from the process table of 74. For example, if a tool moves to a point X=1, Y=2, and Z=3, the linear move template is converted into a string &#34;G01 X1.0 Y2.0 Z3.0&#34;. The resulting CNC program code 78 is a text file that can be recognized by a CNC control program. 
     The post configuration subsystem 80 uses a GUI &#34;point and click&#34; approach to construct templates from variables that are displayed in windows on the screen. In addition to templates, the post configuration subsystem 80 allows the user to customize all machine codes such as, but not limited to, motion types, coolant control, and tool wear. It also allows the user to assign a specific format to each numeric variable. The post configuration subsystem 80 contains a complete machine description. 
     When machining curvilinear and planar surfaces on a single CNC turn-mill machine with a plurality of spindles and tool-holding turrets and cartridges, the post configuration subsystem 80 consists of two &#34;forks&#34;. One fork contains a complete description of a CNC mill, and one fork contains a complete description of a CNC lathe. If the part, according to the manufacturing process, has to be produced on more than one CNC machine or on a multi-spindle machine capable of execution more than one CNC process, the code generation module 400 may produce a plurality of CNC programs. 
     To validate the final CNC program, an optional code verifier can read, interpret, and execute each line of the CNC code and display the resultant actions. A 3D, solid model simulator reproduces cutting tool movements, the material removal, and the shaping of the workpiece into the machined part. The system can visually simulate fabrication of a specific feature by displaying a demonstration of the tool path associated with the machine operations for that feature. In addition, the system can visually simulate fabrication of all of the features associated with a face by displaying a demonstration of all of the tool paths of all of the tools associated with the machine operations for that face. 
     Implementation of the present invention uses the data that are entered into a CAM system defining a part by organizing the data into conventional features, e.g., surfaces, holes, slots, and threads. In order to machine each feature, multiple tools and operations are assigned to each cycle. New information entered into the system for a particular feature is automatically stored in the cycles database and the tools database and can be reused for programming other parts with similar features. This approach eliminates repetitive data entry and storage in contrast to prior art CAM systems that require entry of tooling and operations information in the sequence these operations are to be performed by the CNC machine for each new part. 
     The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof and, accordingly, reference should be made to the appended claims, rather than to the foregoing specification, as indicating the scope of the invention.