Abstract:
When a profile (A) has been defined, a part program in accordance with the definition is stored in advance. When a figure element (C 1 ) constituting the profile has been revised to be another figure element (C 1  &#39;) figure elements (straight lines S 1  and S 2 ) defined utilizing the figure element (circular arc C 1 ) are also changed to reflect the results of the revision in order to be converted into other figure elements (straight lines S 1  &#39; and S 2  &#39;), thereby revising the profile to a profile (B).

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to a method of revising a profile, and more particularly, to a profile revising method for revising a profile generated by joining, in order, figure elements specified by figure definition statements in an automatic programming language. 
     In an automatic programming system for creating numerical control (NC) data using an automatic programming language such as APT (automatic programming tools) or FAPT. 
     A part program based on the automatic programming language is created by defining points, straight lines and circular arcs using simple symbols (this is referred to as &#34;figure definition&#34;), and then defining a tool path using the defined points, straight lines and circular arcs (referred to as &#34;motion statement definition&#34;). The part program based on the automatic programming language is subsequently converted into NC data comprising NC data (EIA codes or ISO codes) in a format capable of being executed by an NC unit. 
     For example, in the creation of a part program for moving a tool along a part profile A comprising straight lines and a circular arcs shown in FIG. 6(a), figure definition is performed by defining a point P 1 , straight lines S 1 , S 2  and S 3  and a circle Cl (see FIG. 6(b)), which are necessary for defining a part profile, as follows using a keyboard or tablet: 
     
         C.sub.1 =x.sub.3, y.sub.3, r.sub.1                         ( 1) 
    
     
         P.sub.1 =x.sub.1, y.sub.1                                  ( 2) 
    
     
         P.sub.2 =x.sub.2, y.sub.2                                  ( 3) 
    
     
         S.sub.1 =P.sub.1,C.sub.1, L                                (4) 
    
     
         S.sub.2 =P.sub.2, C.sub.1, R                               (5) 
    
     
         S.sub.3 =P.sub.1, P.sub.2                                  ( 6) 
    
     Thereafter, the figure elements (which are displayed on a CRT screen) are picked in order, e.g., 
     
         S.sub.1 →C.sub.1 →S.sub.2 →S.sub.3 
    
     to define the profile A, (FIG. 6(a)), after which machining starting and end points, etc., of the part profile A are designated by a motion statement definition to define a tool path along which a tool is moved. 
     In the foregoing, 
     (1) signifies a circle of center (x 3 ,y 3 ) and radius r 1  ; 
     (6) signifies a straight line passing through points P 1 , P 2  ; 
     (4) signifies a left-side tangent line (straight line) of two tangent lines passing through point P 1  and contacting the circle C 1  ; and 
     (5) signifies a right-side tangent line (straight line) of two tangent lines passing through point P 2  and contacting the circle C 1 . The character L is a qualifier meaning &#34;left&#34;, and the character R is a qualifier meaning &#34;right&#34;. There are two methods of figure definition. A first method entails defining points, straight lines and circles using absolute numeric data. A point is defined as 
     
         P=x, y 
    
     using the coordinates (x,y) of the point (see FIG. 7(a), a straight line is defined as 
     
         S=P.sub.1, P.sub.2 or S=x.sub.1, y.sub.1, x.sub.2, y.sub.2 using two points (x.sub.1,y.sub.1), (x.sub.2,y.sub.2) through which the straight line passes (see FIG. 7(b)), and a circle is defined as 
    
     
         C=x, y, r 
    
     using the coordinates (x,y) of the center of the circle and the radius r of the circle (see FIG. 7(c)). 
     The second method entails defining points, straight lines and circles using other elements (points, straight lines and circles) that have already been defined. For example, point P 1  is defined as follows with reference to FIG. 7(d): 
     
         P.sub.1 =S, C, L 
    
     straight line S 1  is defined as follows with reference to FIG. 7(e): 
     
         S.sub.1 =C.sub.1, C.sub.2, A 
    
     (the upper straight line tangent to two circles C 1  and C 2 , where A is the qualifier meaning &#34;upper&#34;), and circle C is defined as follows with reference to FIG. 7(f): 
     
         C=S.sub.1, S.sub.2, S.sub.3 
    
     (a circle tangent to three straight lines). The foregoing method in which elements already defined are used to define other elements is only one example, there being many other methods of definition available. 
     When figure definition is performed in the prior art, the arrangement is such that a figure is defined by a first definition statement or, alternatively, an already defined figure is used to define another figure by a second definition statement. A figure defined by a second definition statement is re-expressed internally by the first definition statement, which uses coordinate data. Therefore, the second definition statement is erased. Consequently, in a case where it is desired to modify the part profile, as shown in FIG. 8, by changing the radius of the circular arc C 1  of the profile A (see FIG. 6(a)), the figure is defined by the following part program: 
     
         C.sub.1 =x.sub.3, y.sub.3, r.sub.1 
    
     
         P.sub.1 =x.sub.1, y.sub.1 
    
     
         P.sub.2 =x.sub.2, y.sub.2 
    
     
         S.sub.1 =P.sub.1, C.sub.1, L 
    
     
         S.sub.2 =P.sub.2, C.sub.1, R 
    
     
         S.sub.3 =P.sub.1, P.sub.2 
    
     
         S.sub.1 
    
     
         C.sub.1 
    
     
         S.sub.2 
    
     
         S.sub.3 
    
     
         PEND 
    
     The prior art is such that the profile must be specified by redefining each figure element from the beginning and picking the figure elements in order along the profile. As a result, revising the already defined profile is a troublesome task. 
     Accordingly, an object of the present invention is to provide a profile revising method through which a profile can be revised merely by solely modifying the figure definition statement of a figure element relating to a modification. 
     SUMMARY OF THE INVENTION 
     When a profile has been defined, a figure definition statement (part program) in accordance with the definition is stored in advance. When a predetermined figure element constituting the profile has been revised, the figure definition statement of the revised figure element in the part program is revised. A new profile is generated based on the new part program resulting from the revision. In this way another figure element defined by utilizing the revised figure element is made to reflect the revised result to revise the profile into another profile. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of an apparatus which can employ the present invention; 
     FIG. 2 is a portion describing the menu chart; 
     FIG. 3 is a flowchart of processing according to the present invention; 
     FIGS. 4(a) through 5 are diagrams describing an embodiment of the present invention; and 
     FIG. 6(a) through 8 are diagrams describing an example of the prior art. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 is a block diagram of an apparatus for practicing the method of the present invention. 
     Numeral 101 denotes a ROM for storing a loading program and the like. Numeral 102 is a processor for executing automatic programming processing, and 103 is a RAM for storing a system program read in from a floppy FL, as well as for storing various parameters and processing results. Numeral 104 denotes an NC data memory for storing the finally created NC data having an executable format, 105 is a keyboard, 106 is a display unit (CRT), 107 is a disc controller, and 108 is a tablet device having a tablet surface 108a to which a menu chart 108b having menu items is affixed. Prescribed menu items are picked by a tablet cursor 108c. A graphic cursor GCS on a display screen is moved by moving the cursor 108a on the tablet surface. FL represents a floppy disc. 
     The CRT 106 displays a profile A (the dashed line) which prevails prior to a revision, the profile being composed of straight lines S 1 , S 2  and S 3  and a circular arc C 1 . The CRT 106 also displays a profile B which prevails after a revision, this profile being composed of straight lies S 1  &#39;, S 2  &#39;, and S 3  and a circular arc C 1  &#39;. 
     FIG. 2 is a diagram for describing the principal parts of the menu chart 108b. Numeral 1 is a &#34;POINT/POINT GROUP DEFINITION&#34; section, 2 is a &#34;STRAIGHT LINE DEFINITION&#34; section, 3 is a &#34;CIRCLE DEFINITION&#34; section, 4 is a &#34;SPECIAL SHAPE DEFINITION&#34; section and 5 is a &#34;SHAPE DEFINITION&#34; section. The &#34;SHAPE DEFINITION&#34; section 5 includes a &#34;SHAPE MODIFICATION&#34; item 5a. 
     The profile revising method of the present invention will now be described in accordance with the flowchart of FIG. 3 and the diagrams of FIGS. 4 and 5 for describing the processing. It should be noted that the system program for creating the NC part program, parameters and the like have already been stored in the RAM 103 from the floppy disc FL. 
     The figure elements which are the straight lines S 1 , S 2 , S 3  and the circular arc C 1  shown in FIG. 4(a) are defined by directly entering coordinates using the tablet 108 and keyboard 105 (figure definition by the first definition statement) or by citing already defined figure elements displayed on the CRT 106 (figure definition by the second definition statement). As described above with regard to the prior art in relation to FIG. 6, a part program is created by figure definition and profile definition in the following manner: 
     
         ______________________________________C.sub.1 = x.sub.3, y.sub.3, r.sub.1P.sub.1 = x.sub.1, y.sub.1P.sub.2 = x.sub.2, y.sub.2S.sub.1 = P.sub.1, C.sub.1, LS.sub.2 = P.sub.2, C.sub.1, RS.sub.3 = P.sub.1, P.sub.2         . . .  (The above is the figure                definition portion.)S.sub.1C.sub.1S.sub.2S.sub.3         . . .  (The above is the                profile definition                portion.)PEND          . . .  (This represents program                end.)______________________________________ 
    
     In accordance with the present invention, the part program defined above is stored in the RAM 103 without being erased. The entirety of the second definition statement of the part program is re-expressed by the first definition statement and is similarly stored in the RAM 103. A profile is generated based on the part program of the first definition statement, and the profile is displayed on the CRT (step 201). 
     If the &#34;SHAPE MODIFICATION&#34; item 5a is picked from the tablet menu 108b under these conditions, the processor 102 causes the CRT 106 to display the prompt &#34;SELECT ELEMENT TO BE MODIFIED&#34; (step 202). 
     If the graphic cursor a is positioned on the circular arc C 1 , which is the element to be modified, and this element is picked, the processor 102 causes the color of circular arc Cl to change to another color and causes the CRT 106 to display the prompt &#34;DESIGNATE ELEMENT TO BE SUBSTITUTED&#34;. 
     In order to define the &#34;element to be substituted&#34;, the operator picks the &#34;CIRCLE DEFINITION&#34; item 3a from the tablet menu 108b and then inputs the coordinates (x 3  &#39;, y 3  &#39;) of the center of the circle as well as the radius r 3  &#39; of the circle, whereupon the processor 102 causes the CRT 106 to display a circle C 1  &#39; specified by the input data (step 204; see FIG. 4(b)). 
     Thereafter, the &#34;element to be substituted&#34; is designated by picking the circle C 1  &#39; using the graphic cursor a, whereupon the processor 102 converts the circle definition statement 
     
         C.sub.1 =x.sub.3, y.sub.3, r.sub.3 
    
     in the abovementioned part program into the following definition statement (step 205): 
     
         C.sub.1 =x.sub.3 &#39;, y.sub.3 &#39;, r.sub.3 &#39; 
    
     Next, the processor 102 generates the profile, following its modification, by the new part program and displays it on the CRT 106 (see step 4(c); step 206). In this case, the straight lines S 1 , and S 2 , defined as being tangent to the circle C 1  before its modification, are modified into straight lines S.sub., and S 2  &#39; tangent to the circle C l  &#39; after its modification. In a case where the definition is to the effect that the straight lines S 1 , and S 2  are &#34;tangent to circle C 1  &#34; has not been made, that is, a case where the figure definition statement is not one in which the straight lines S 1 , and S 2  utilize the circle C 1 , the straight lines S 1 , and S 2  do not change even if circle C 1  is modified, as shown in FIG. 5. 
     In accordance with the present invention, the arrangement is such that when a figure element defined by a first figure definition statement is modified, a figure element of a second definition statement utilizing the above mentioned figure element also is revised, and the new profile is generated. Accordingly, a profile can be revised in a simple manner merely by solely modifying the first figure definition statement, without requiring that the profile be defined anew from the beginning.