Patent Publication Number: US-5295075-A

Title: Method and apparatus for machining workpieces with numerically controlled machines

Description:
REFERENCE TO RELATED APPLICATIONS 
     The disclosures of the following copending applications assigned to the assignee of the present application and filed concurrently herewith are specifically incorporated by reference: 
     &#34;Method and Apparatus for Ascertaining Tool Path Contours Approximating Curved Contour Intersection Lines in Numerically Controlled Machines&#34;, by Klaus-Dieter Korner U.S. Ser. No. 07/765,127 pending; and 
     &#34;Method and Apparatus for Ascertaining Tool Path Contours in Numerically Controlled Machines&#34;, by Norbert Vollmayr U.S. Ser. No. 07/765,377 pending. 
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The invention relates to a method and apparatus for machining workpieces, and more particularly, a method and apparatus for accurately and simply creating complex bodies from primitives wherein tool corrections have been incorporated. 
     2. Description of the Prior Art 
     In numerically controlled (NC) machine tools, data for producing a workpiece from a workpiece blank is derived in the form of tool path data by means of an NC program. The tool path data produces a tool path contour which differs from the desired contour of the workpiece. The difference is due to the tool radius. More specifically, the NC machine operates the tool based upon the center point of the tool path contour. When the tool is moved along the tool path contour, the actual cutting, drilling or other operation performed by the tool occurs at a certain distance from the tool path contour, namely the tool radius. Thus, if a workpiece having the desired workpiece contour is to be created, the tool must be moved according to the tool path contour. The tool path contour will often be referred to as the corrected contour throughout the remainder of the specification. 
     Often, the workpiece to be produced by the NC machine is a complex body formed by various shapes. It is often difficult to define such a complex body and determine the intersection line contour or workpiece contour between the workpiece and an applicable machining plane. In addition, correcting the workpiece contour for the tool radius so that a particular tool will create the desired workpiece, taking into account possible collisions with a given accuracy, is a complex task requiring a great deal of calculation. The amount of computer capacity and memory capacity needed is thus correspondingly high. To perform such calculations, additional hardware and software are necessary on the NC control computer. These include special arithmetic processors, for instance, as well as geometric methods and display methods for describing free-form surfaces. 
     It is known that workpieces having complex shapes can often be created by combining primitives such as cylinders, rectangles and spheres using set theory operations. In addition, relatively complex body contours can be put together from simple contour parts such as circles and rectilinear lines. The tool radius corrections can be carried out easily with these simple contours. It is problematic, however, to ascertain the resultant tool path from the various corrected contours, since overlapping occurs when the various corrected contours are put together. For instance, U.S. Pat. No. 4,868,761 (Hayashi), which corresponds to German Published, Non-Examined Patent Application 36 08 438, discloses a method of calculating free, curved edges for manufacture by means of numerically controlled machines by means of computer-aided design (CAD) and computer-aided manufacture (CAM). In addition, set theory, also known as Boolean operation, is used to combine simple mathematically definable bodies to form a complex body. The function of defining a shape, however, is completely separate from the function of determining the geometric location of a tool. The latter is the task of numerical control. 
     An object of the present invention is to provide a method and apparatus of machining workpieces in a simple manner. 
     A further object of the present invention provides a method and apparatus for ascertaining tool path contours that produce a workpiece having desired workpiece contours. 
     Further objects and advantages will become apparent from the following description and the accompanying drawings. 
     SUMMARY OF THE INVENTION 
     A method and apparatus for machining workpieces by linking workpiece blank data with tool path data with the aid of a numerical control. A workpiece contour is formed by combining mathematically defined base bodies. More specifically, two-dimensional contours are corrected with tool radius data stored in memory to create corrected 2-D contours. Corrected three-dimensional base bodies are generated from the data for corrected two-dimensional contours by either translating or rotating the two-dimensional contours. The data of the three-dimensional base bodies is stored in memory. The data from said corrected three-dimensional base bodies is linked with data from assembled bodies oriented arbitrarily in space stored in memory to create surfaces equidistant from the surface of the workpiece. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Further objects and advantages of this invention will become more apparent and readily appreciated from the following detailed description of the present invention, taken in conjunction with the accompanying drawings, of which: 
     FIG. 1 illustrates a conventional numerically controlled milling machine; 
     FIG. 2A illustrates a bearing block; 
     FIG. 2B illustrates the bearing block of FIG. 2A dismantled into its corresponding base bodies; 
     FIG. 3A illustrates a 2-D contour; 
     FIG. 3B illustrates a 3-D object generated from the 2-D contour of FIG. 3A; 
     FIG. 3C illustrates a corrected 2-D contour; 
     FIG. 3D illustrates a corrected 3-D objected generated from the corrected 2-D contour of FIG. 3C; 
     FIG. 4A illustrates the union of two cylindrical base bodies; 
     FIG. 4B illustrates the subtraction of one cylindrical base body from another cylindrical base body; 
     FIG. 4C illustrates the intersection of two cylindrical base bodies; 
     FIG. 5 illustrates a milling cutter path in plan view; 
     FIG. 6A illustrates a cutter path contour; 
     FIG. 6B illustrates an enlarged segment of the cutter path contour shown in FIG. 6A; 
     FIG. 7 illustrates the functions performed by various components of an apparatus and method of machining workpieces with numerically controlled machines in accordance with the present invention; 
     FIGS. 8a and 8b are a subroutine for inputting parameters; 
     FIG. 9 is a subroutine for ascertaining basic bodies from the Boolean linkage equation; 
     FIG. 10 is a subroutine to calculate intersecting contours; 
     FIG. 11 is a subroutine to calculate global parameters for contour projection; 
     FIG. 12 is a subroutine to generate basic bodies by translation; 
     FIG. 13 is a subroutine to calculate the contour from a body generated by rotation; 
     FIGS. 14a and 14b are a subroutine for calculating the intersection of the machining plane with a body generated by rotation; 
     FIG. 15 is a subroutine for calculating the intersection of the machining plane with a body generated by rotation where the axis of rotation is parallel to a normal vector of the inching plane; 
     FIG. 16 is a subroutine for generating the intersection of a machining plane and a body generated by translation; 
     FIG. 17 is a calculation of a normal location; 
     FIG. 18 is a subroutine for generating the intersection of a machining plane and a body generated by translation where the displacement vector is parallel to a vector normal to the machining plane; 
     FIG. 19 is a subroutine for generating the intersection of a machining plane and a body generated by translation where the displacement vector is parallel to the machining plane; 
     FIGS. 20a and 20b are a subroutine for machining height lines by scanning line method; 
     FIG. 21 is a subroutine for a test Boolean linkeage equation; 
     FIG. 22 is a subroutine for testing a current point with the number of the page node; 
     FIG. 23 is a subroutine for testing the linkeage state; 
     FIG. 24 is a subroutine for generating machining layer line by scanning line method; 
     FIG. 25 is a subroutine for calculating global parameter for contour projections; 
     FIG. 26 is a subroutine for body generated by translation; 
     FIG. 27 is a subroutine for calculating the contour resulting from the intersection of the machining plane by a body generated by rotation; 
     FIG. 28 is a subroutine for generating an output contour; 
     FIG. 29 is a subroutine for generating an output contour when the axis of rotation of the body is parallel to a normal vector to the machining plane; 
     FIG. 30 is a subroutine for generating an output contour that results from the intersection of a machining plane and a body generated by translation; 
     FIG. 31 is a subroutine for generating a normal location; 
     FIG. 32 is a subroutine for generating intersection where the displacement vector of the body generated by translation is parallel to a normal vector of the machining plane; and 
     FIG. 33 is a subroutine for generating a contour by transforming a contour into the machining plane by parallel displacements. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 illustrates a conventional numerically controlled milling machine 1 used to carry out the method according to the present invention. A workpiece to be machined is represented by a workpiece blank 2. A tool serving to machine the workpiece blank 2 is represented by a spherical cutter 3. Milling machines, workpiece blanks and spherical cutters are all well known to those skilled in the art. 
     FIG. 2A illustrates a bearing block 4. The bearing block 4 of FIG. 2A is a relatively complex object, however, it is capable of being defined by simple base bodies 4a-4i, also known as primitives, as shown in FIG. 2B. Set theory is used to properly combine these base bodies to create the complex body of FIG. 2A. Specifically, by means of set theory operations, also known as Boolean operations, the bearing block 4 can be derived from the base bodies 4a-4i. (see U.S. Pat. No. 4,868,761 which describes this in relation to CAD systems). 
     More specifically, to create the bearing block 4, a bore 4a in the shape of a round column is subtracted from another round column (not shown) having a greater radius than the bore 4a to create a hub 4b. A web 4d comprising a trapezoidal column is created by subtracting two triangular columns 4c and 4e from a rectangular column (not shown). To combine the hub 4b with the web 4d, the hub 4b is subtracted from the web 4d. Added to the above simple base bodies is a base plate 4f comprising a rectangular column and a rectangular column strip 4g. Two screw holes 4h and 4i, embodied by round columns, are subtracted from the base plate 4f and column strip 4g. It is clear from this example that relatively complicated bodies, like the bearing block 4, can be assembled from simple, mathematically determinable base bodies 4a-4i. 
     FIGS. 3A-3D illustrate the generation of three-dimensional (3-D) and corrected 3-D base bodies respectively. In FIG. 3A, a 2-D contour in the form of a rectangle 5a is illustrated. To create a 3-D rectangle 5b of FIG. 3B, the rectangular column 5a is translationally shifted by a certain amount in the direction of a vector V. The base bodies described in detail with respect to FIG. 2B can be created by either translating or rotating 2-D contours. The rectangular column 5b was created by translating rectangle 5a along vector V. 
     Other bodies can be generated by rotating a 2-D contour about an axis. This has not been illustrated because it is known that a circular ring of rectangular cross section is created if rectangle 5a is rotated about an axis outside its contour. With respect to FIG. 2A, the hub 4b could be defined in this way instead of subtracting round column 4a from a larger round column as described above with respect to FIG. 2B. 
     To manufacture bodies such as a rectangular column 5b, other base bodies or combinations thereof from a workpiece blank 2, a tool such as a spherical cutter 3 must be moved along a tool path contour. The tool path contour is equidistant from the desired workpiece contour. The distance between the tool path contour and the workpiece contour is determined by the radius of the spherical cutter 3 as discussed above. 
     When complex bodies such as the body illustrated in FIG. 2A, are assembled from simple base bodies or primitives as shown in FIG. 2B, the correction calculations made to incorporate the tool radius become relatively complicated and are subject to error. Specifically, the tool path contour determined by the corrected path data does not necessarily coincide with the intersection lines of the assembled base bodies, therefore, the tool path contour is not necessarily equidistantly located from the desired workpiece contour. This results in a workpiece having a contour not identical to the desired workpiece contour. 
     To simplify ascertaining the tool path contour or its path data, a tool path correction is performed on the simple 2-D contour 5a as shown in FIG. 3C. The resulting tool path contour is illustrated by dot-dash lines and forms a corrected 2-D contour 5c. To create a corrected 3-D body, the corrected 2-D contour is shifted translationally along a vector V resulting in the corrected 3-D body 5d shown in FIG. 3D. The surfaces of the corrected body 5d describe surfaces equidistant from the surfaces of the base body 5b. As already described above, the distance between the surfaces of the base body 5b and the corrected base body 5d is determined by the tool radius. 
     Corrected base bodies such as the one described above are used to create the resultant body representing the workpiece to be manufactured. This eliminates the potential disadvantage that the tool path contour may not coincide with the intersection lines of the desired workpiece contour which will be referred to again hereinafter with respect to FIG. 5. 
     Intersection lines formed by the intersection of the corrected surfaces of the base bodies and an applicable machining plane are calculated. For base bodies generated by translation, the intersection lines are rectilinear segments. For base bodies generated by rotation the intersection lines are curves of general conical or cylindrical sections. For curved intersection lines it is useful to linearize the sequence of the generated curves, taking into account the resolution dictated by the machine. A suitable method for this purpose will be described in detail with respect to FIGS. 6A and 6B. In addition, copending application &#34;Method and Apparatus for Ascertaining Tool Path Contours Approximating Curved Contour Intersection Lines in Numerically Controlled Machines&#34;, by Klaus-Dieter Korner U.S. Ser. No. 07/765,127, referred to earlier describes the linearization of such curves. This application is incorporated herein by reference. Generally, interpolation with 3-D rectilinear segments is generated as a function of the actual curvature of the curve. This assures that only as many rectilinear segments as are necessary to not exceed the maximum error are generated. This greatly reduces the quantity of data and thus economizes the amount of memory space required. The sequence of rectilinear segments calculated in this way produces the corrected sectional contour. 
     The corrected resultant workpiece is obtained by performing set theory operations using points located on the intersection lines or periphery of the corrected base bodies. A point located on the periphery of such a base body will either become a point located on the intersection line of the resulting workpiece contour or it will not. 
     In FIGS. 4A-4C, three basic set theory operations will be explained in terms of two inter. nested cylinders 6 and 7. To manufacture a complex body resulting from a set theory operation, i.e. a resultant body, it is important to determine whether a point located on the periphery of a base body will become a valid point located on the periphery of the resultant body. The answer will of course depend upon the set theory operation performed. 
     In FIG. 4A the resultant body comprises the union () of the cylinders 6 and 7. To perform the union operation, valid peripheral points result whenever a point is located on the periphery of one cylinder and outside the periphery of the other cylinder. If these two conditions are not satisfied, then the point is not a valid point and thus does not become a point on the periphery of the resultant body. For example, point 6a is a peripheral point on cylinder 6 and is located outside cylinder 7 and is therefore a valid point and becomes a peripheral point on the resultant body. Similarly, point 7a is a peripheral point of cylinder 7 and is located outside cylinder 6 and is therefore a valid point. On the other hand, point 6u is located on the periphery of cylinder 6 but it is located inside cylinder 7 and thus is not a valid point under the rules for performing the union operation. Thus, point 6u does not become a peripheral point on the resultant body. The resultant body is shown in bold line in FIG. 4A. 
     In FIG. 4B the resultant body comprises the difference () between the cylinders 6 and 7 with cylinder 7 subtracted from cylinder 6. To perform the difference operation, valid peripheral points result whenever a point is located on the periphery of cylinder 6 and outside cylinder 7 or a point is located on the periphery of cylinder 7 and inside cylinder 6. Point 6b is a peripheral point of cylinder 6 and is located outside cylinder 7 and therefore it is a valid peripheral point. Point 7b is a peripheral point of cylinder 7 and is located inside cylinder 6 and thus it too is a valid peripheral point. Point 7u, on the other hand, is not a valid point, because although it is located on the periphery of cylinder 7, it is located outside cylinder 6. The resultant body is shown in bold line in FIG. 4B. 
     If cylinder 6 is to be subtracted from cylinder 7, the above described operations are altered so that valid peripheral points for the resultant body are located on the periphery of cylinder 7 and outside cylinder 6 or a point is located on the periphery of cylinder 6 and inside cylinder 7. 
     In FIG. 4C the intersection () of cylinders 6 and 7 is performed. To perform the intersection operation, valid peripheral points for the resultant body result when a point is located on the periphery of one cylinder and inside the other cylinder. Point 6c is a peripheral point of cylinder 6 and is located inside cylinder 7 and thus is a valid peripheral point of the resultant body. Point 7c is a peripheral point of cylinder 7 and is located inside cylinder 6 and it too is a valid peripheral point. Point 6u is not a valid point because although it is located on the periphery of cylinder 6, it is located outside cylinder 7. The resultant body is shown in bold line in FIG. 4C. 
     In addition to the set theory operations described above, points located at the intersection of boundaries are always valid points. 
     In FIG. 5, a plan view on a workpiece 8 and its corrected body 8&#39; is shown. The workpiece 8 comprises three base bodies in the form of cylinders. The plan view illustrates an intersection contour between the surface of the workpiece 8 and the applicable machining plane. In addition, the intersection contour of the corrected workpiece 8&#39; and the applicable machining plane is shown. The tool path contour coincides with the intersection contour of the corrected body 8&#39;. The cylinders are identified by reference numerals 9, 10 and 11. Cylinders 9 and 10 represent positive cylinders to be summed together while cylinder 11 is a negative cylinder which must be subtracted from the sum of cylinders 9 and 10 in composing the workpiece 8. These cylinders can be solid or hollow. 
     To produce workpiece 8, cylinders 9, 10 and 11 are corrected and linked by set theory algebra to ascertain the corrected cutter path data. In order to generate the corrected base bodies, it must first be determined whether the applicable base body is a positive body or a negative body. In FIG. 5, the positive cylinders 9 and 10 have corrected contours having a radius greater than the radius of the cylinders 9 and 10. For negative cylinder 11, the corrected contour has a smaller radius than the radius of cylinder 11. By set theory algebraic operations, the valid peripheral points for the cutter paths are ascertained as described below. 
     To ascertain the valid peripheral points, auxiliary lines are placed in a particular matrix over the corrected body 8&#39;. For the sake of clarity, only four auxiliary lines a, b, c, d are shown. The sequence of valid peripheral points corresponds to the cutter path that generates the contour of the work piece 8. 
     The basic condition of the set operation involved for the three cylinders is the union of cylinders 9 and 10 from which the cylinder 11 is subtracted. The set operation is represented by the equation: 
     
         (9 10) 11. 
    
     The determination of valid or invalid peripheral points is always carried out on the contours of the corrected bodies 9, 10 and 11. The method of determining whether a point is valid or not is analogous to the explanation given with respect to FIGS. 4A, 4B and 4C. 
     The first step in performing the operation (9 10)/11 is to determine whether a point is a valid peripheral point of 9 10. This was described with respect to FIG. 4A. The second step is to determine whether the point resulting from the union of cylinders 9 and 10 is a valid point located on the periphery of body resulting from the difference between cylinder 11 and the union of cylinders 9 and 10. A valid point resulting from the second step will be a point located on the periphery of the resulting body. 
     The following symbols and their definitions are used in the tables: 
     R i  =peripheral point located on cylinder i 
     I i  =point located inside cylinder i 
     A i  =point located outside cylinder i 
     R.sub.(9 10) =peripheral point located on union of cylinders 9 and 10 
     I.sub.(9 10) =point located inside the union of cylinders 9 and 10 
     A.sub.(9 10) =point located outside the union of cylinders 9 and 10 
     ®.sub.((9 10) 11) =valid peripheral point of resultant body defined by equation (9 10) 11 
     I.sub.(9 10) 11) =point located inside the resultant body 
     A.sub.(9 10) 11) =point located outside the resultant body 
     Auxiliary line &#34;a&#34; intersects the corrected cylinder 9 at point a&#39;. The point a 1  is the peripheral point of cylinder 9, (R 9 ), and is located outside of cylinder 10, (A 10 ), thus, a 1  is valid for the union set 9 10. The following particulars apply, a 1  is the peripheral point of the union set 9 10, (R.sub.((10)) and is located outside of cylinder 11, (A 11 ), accordingly, a 1  is a valid peripheral point for the differential quantity (9 10) 11 as well. 
     Expressed in table form: 
     
         ______________________________________                                    
location of the point                                                     
                   location of the point                                  
on corrected bodies                                                       
                   on resultant body                                      
______________________________________                                    
a.sub.1 = R.sub.9 ; A.sub.10                                              
                   R.sub.(9 10)                                           
a.sub.1 = R.sub.(9 10) ; A.sub.11                                         
                   ®.sub.((9 10) 11)                                  
a.sub.2 = R.sub.9 ; A.sub.10                                              
                   R.sub.(9 10)                                           
a.sub.2 = R.sub.(9 10) ; A.sub.11                                         
                   ®.sub.((9 10) 11)                                  
______________________________________                                    
 
    
     Both intersection points a 1  and a 2  are accordingly valid peripheral points, which the cutter may drive up against. Valid peripheral points are identified in the tables and in FIG. 5 with a concentric circle around the applicable point which is intended to represent a spherical cutter. 
     Analogously, for an auxiliary line b, the following applies: 
     
         ______________________________________                                    
location of a point location of a point                                   
on corrected bodies on resultant body                                     
______________________________________                                    
b.sub.1 = R.sub.9 ; A.sub.10                                              
                    R.sub.(9 10)                                          
b.sub.1 = R.sub.(9 10) ; A.sub.11                                         
                    ®.sub.((9 10) 11)                                 
b.sub.2 = I.sub.9 ; A.sub.10                                              
                    I.sub.(9 10)                                          
b.sub.2 = R.sub.11 ; I.sub.(9 10)                                         
                    ®.sub.(11 (9 10))                                 
b.sub.3 = R.sub.9 ; A.sub.10                                              
                    R.sub.(9 10)                                          
b.sub.3 = R(.sub.9 10) ; I.sub.11                                         
                    I.sub.(11 (9 10))                                     
______________________________________                                    
 
    
     Since point b 3  is not valid for all conditions, it does not represent a valid peripheral point for machining. 
     
         ______________________________________                                    
location of a point location of a point                                   
on corrected bodies on resultant body                                     
______________________________________                                    
b.sub.4 = A.sub.9 ; A.sub.10                                              
                    A.sub.(9 10)                                          
b.sub.4 = R.sub.11 ; A.sub.(9 10)                                         
                    A.sub.((9 10) 11)                                     
______________________________________                                    
 
    
     Accordingly, in auxiliary line b, only the peripheral points b 1  and b 2  are valid cutter path points. 
     For auxiliary line c, the following applies: 
     
         ______________________________________                                    
location of a point location of a point                                   
on corrected bodies on resultant body                                     
______________________________________                                    
c.sub.1 = R.sub.9 ; A.sub.10                                              
                    R.sub.(9 10)                                          
c.sub.1 = R.sub.(9 10) ; A.sub.11                                         
                    ®.sub.((9 10) 11)                                 
c.sub.2 = R.sub.10 ; I.sub.9                                              
                    I.sub.(9 10)                                          
c.sub.2 = I.sub.(9 10) ; A.sub.11                                         
                    I.sub.((9 10) 11)                                     
c.sub.3 = I.sub.9 ; I.sub.10                                              
                    I.sub.(9 10)                                          
c.sub.3 = R.sub.11 ; I.sub.(9 10)                                         
                    ®.sub.(11 (9 10))                                 
c.sub.4 = R.sub.10 ; I.sub.9                                              
                    I.sub.(9 10)                                          
c.sub.4 = I.sub.(9 10) ; I.sub.11                                         
                    I.sub.((9 10) 11)                                     
c.sub.5 = R.sub.9 ; A.sub.10                                              
                    R.sub.(9 10)                                          
c.sub.5 = R.sub.(9 10) ; I.sub.11                                         
                    I.sub.((9 10) 11)                                     
c.sub.6 = A.sub.9 ; A.sub.10                                              
                    A.sub.(9 10)                                          
c.sub.6 = R.sub.11 ; A.sub.(9 10)                                         
                    A.sub.((9 10) 11)                                     
______________________________________                                    
 
    
     Accordingly, in auxiliary line c the peripheral points c 1  and c 2  are valid cutter path points. 
     For auxiliary line d, the following 
     
         ______________________________________                                    
location of a point location of a point                                   
on corrected bodies on resultant body                                     
______________________________________                                    
d.sub.1 = R.sub.10 ; A.sub.9                                              
                    R.sub.(10 9)                                          
d.sub.1 = R.sub.(10 9) ; A.sub.11                                         
                    ®.sub.((10 9) 11)                                 
d.sub.2 = A.sub.9 ; I.sub.10                                              
                    I.sub.(9 10)                                          
d.sub.2 = R.sub.11 ; I.sub.(10 9)                                         
                    ®.sub.(11 (9 10))                                 
d.sub.3 = R.sub.10 ; A.sub.9                                              
                    R.sub.(10 9)                                          
d.sub.3 = R.sub.(10 9) ; I.sub.11                                         
                    I.sub.(11 (10 9))                                     
d.sub.4 = A.sub.9 ; A.sub.10                                              
                    A.sub.(9 10)                                          
d.sub.4 = R.sub.11 ; A.sub.(10 9)                                         
                    A.sub.((9 10) 11)                                     
______________________________________                                    
 
    
     Upon observing the more heavily drawn boundary line of workpiece 8, it is seen that all the peripheral points a 1 , a 2 , b 1 , b 2 , c 1 , c 2 , d 1  and d 2 , recognized as valid points, are located on the corrected contour 8&#39;, or in other words equidistantly from the workpiece contour 8, the distance of which corresponds to the radius of the spherical cutter 3 of FIG. 1. 
     Although only four auxiliary lines were shown, the location of the auxiliary lines is arbitrary and the auxiliary lines should be located close together in order to create a continuously extending cutter path. 
     Now the aforementioned linearizing of a curved intersection line will be explained, in conjunction with FIGS. 6A and 6B. In FIG. 6A, a curved course of a contour K is shown, which according to the prior art is generated approximately by the milling cutter by means of rectilinear segments K i  where i=1 . . . n of a fixedly defined grid pattern. Since the length of the rectilinear segments is fixed, the deviation in the actually produced contour from the desired or ideal contour K increases with the increasing curvature of the ideal contour K. 
     This deviation is illustrated with particular clarity in the exaggerated view of FIG. 6B. The contour K is produced with rectilinear segments, of which only the segment K i  is shown. A milling cutter (not shown) would join points P 1  and P 2  of contour K along this segment K i  by means of its cutter path. To improve the approximation of the cutter path to the desired contour K, a vertical is dropped from the rectilinear segment K i  onto the contour K and the location of the greatest deviation is ascertained. The point of intersection of the contour K and the vertical defines a point P 3 . The NC control, with the aid of which point P 3  was ascertained, defines new rectilinear segments by the rectilinear lines K j  and K k , with which points P 1  and P 3  as well as P 3  and P 2  are connected. It is evident that the linearizing by the new rectilinear lines K j  and K k  has already brought about a markedly better approximation of the cutter path to the desired contour K. If the same procedure is employed with the new rectilinear segment K k , then the resultant rectilinear segments K l  and K m  provide a better approximation of the desired contour K. It can be seen that with this method for curvature-dependent linearizing, the rectilinear segment length also becomes curvature-dependent. With this method, the path of the cutter is made maximally conforming to the ideal contour K. 
     FIG. 7, illustrates the functions performed of various components of an apparatus and method of machining workpieces with numerically controlled machines in accordance with the present invention. Input unit 12 provides an interface to the user so that data can be entered to operate a numerically controlled machine. In apparatus 13, the machining parameters, dimensions of the workpiece blank and the machining plane referred to with respect to FIG. 5 and the cutting conditions are defined and checked. 
     Memory 14 stores the three-dimensional body defined by the user, for example, the bearing block 4 shown in FIG. 2A. Computer 15 dissects the whole bodies in accordance with FIG. 2A, for example, into two-dimensional base bodies such as those shown in FIG. 3A. The base bodies are corrected to form two-dimensional corrected base body data of FIG. 3C. Memory 16 stores the corrected two-dimensional base body data. 
     Computer 17 calculates the machining plane as described with respect to FIG. 5 from the data stored in the shape memory 14 and the corrected two-dimensional base body data received from the memory 16. Memory 18 stores the combined and corrected 2-D base bodies data for the appropriate machining plane as calculated by computer 17. Computer 19 carries out the set theory algorithms, i.e. Boolean operations, with the generated intersection lines stored in the memory 18. The data calculated by computer 19 is sent to the NC machine as tool path data. 
     FIGS. 8-33 illustrate a flow chart in the form of NASSI-Shneider diagrams for implementing the invention. During the development of the present invention, computers made by DEC-VMS were used. Later, when the invention is commercialized, numerical control systems using Motorola processors, for instance, of the kind used in personal computers will be used. In the flow chart, the most comprehensive application representing the present invention is marked &#34;I&#34;, while parts of the program representing copending application U.S. Ser. No. 07/765,377 (which is incorporated herein by reference) are marked &#34;II&#34; and parts of the program representing copending application U.S. Ser. No. 07/765,127 are marked &#34;III&#34;. The diagrams for II and III are included in I. Briefly, FIG. 8 is a subroutine for inputting parameters. 
     In FIG. 9 all incident hollow and solid bodies (basic bodies) from the Boolean linkage equation are ascertained. 
     In FIG. 10 the intersecting line contours of all basic bodies defined by time, location and correct generatrix, with the current machining plane are calculated. 
     In FIG. 11 global parameters for contour projection, such as solid angle of the primitive, location of the machining plane, etc., from the parameters of the primitive are calculated. 
     FIG. 12 relates to a body generated by translation. 
     In FIG. 13 the contour resulting from intersection of the machining plane by the body generated by rotation is calculated. 
     In FIG. 14 the output contour, which is the outcome of the intersection of the machining plane and the body generated by rotation, is a generalized conical section. 
     In FIG. 15 the output contour comprises one or more circles, because the normal vector of the machining plane and the axis of rotation of the body generated by rotation are parallel. 
     In FIG. 16 the output contour that results form the intersection of the machining plane by the body generated by translation. 
     In FIG. 17 this is a normal location, i.e. a location of the body generated by translation that does not lead to an singularities of the equation. 
     In FIG. 18 the normal vector of the machining plane is parallel to the displacement vector of the body generated by translation. 
     In FIG. 19 the machining plane is parallel to the plane in which the generating contour of the body generated by translation is located, i.e., the generating contour is transformed into the machining plane by parallel displacement. 
     In FIG. 20 machining of height lines is done by scanning line method. 
     In FIG. 21 a test Boolean linkage equation is tested. 
     In FIG. 22 a test of the current point with respect to the intersecting line of the basic body with the number of the page node is conducted. 
     In FIG. 23 a test of the linkage state based on the status of the succeeding left- and right-hand node and the status of the linkage operation is conducted. 
     In FIG. 24 a machining layer line is done by scanning line method. 
     In FIG. 25 global parameters for contour projection, such as solid angle of the primitive, location of the machining plane, etc., from the parameters of the primitive are calculated. 
     FIG. 26 relates to a body generated by translation. 
     In FIG. 27 the contour resulting from intersection of the machining plane by the body generated by rotation is calculated. 
     In FIG. 28 the output contour, which is the outcome of the intersection of the machining plane and the body generated by rotation, is a generalized conical section. 
     In FIG. 29 the output contour comprises one or more circles, because the normal vector of the machining plane and the axis of rotation of the body generated by rotation are parallel. 
     In FIG. 30 the output contour results from the intersection of the machining plane by the body generated by translation. 
     In FIG. 31 a normal location, i.e. a location of the body generated by translation that does not lead to any singularities of the equations is formed. 
     In FIG. 32 the normal vector of the machining plane is parallel to the displacement vector of the body generated by translation. 
     In FIG. 33 the machining plane is parallel to the plane in which the generating contour of the body generated by translation is located, i.e., the generating contour is transformed into the machining plane by parallel displacement. 
     While this invention has been shown and described in connection with the preferred embodiments, it is apparent that certain changes and modifications, in addition to those mentioned above, may be made from the basic features of the present invention. Accordingly, it is the intention of the Applicant to protect all variations and modifications within the true spirit and valid scope of the present invention.