Abstract:
A predetermined figure element (C 2 ) already defined is designated, and a figure definition statement of the designated figure element (C 2 ) is revised to produce a figure element (C 2  &#39;). When an error occurs in the figure definition statement of another figure element (S 1 ) owing to the revision of the above-mentioned figure definition statement, the figure definition statement (M) in which the error has occurred is displayed on a display screen (106) to make revision possible, namely the another figure element (S 1 ) specified by the figure definition statement in which the error has occurred and a figure element (C 3 ) defined using the another figure element (S 1 ) are displayed in colors that differ from each other, and the figure definition statement in which the error occurred is revised.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of Invention 
     This invention relates to a figure element revising method and, more particularly, to a figure element revising method for displaying and revising a group of figure elements including defined figure elements and figure elements defined using the defined figure elements. 
     2. Description of the Related Art 
     In an automatic programming system for creating NC data using an automatic programming language such as APT (automatic programming tools) or FAPT, 
     (a) 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;), and 
     (b) 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 figure definition statement based on the automatic programming language, figure definition is performed by defining a point P 1  and circles C 1 , C 2  as follows using a keyboard or tablet: 
     
         C.sub.1 =x.sub.1, y.sub.1, r.sub.1                         ( 1) 
    
     
         C.sub.2 =x.sub.2, y.sub.2, r.sub.2                         ( 2) 
    
     
         P.sub.1 =x.sub.3,y.sub.3                                   ( 3) 
    
     as shown in FIG. 8. A straight line S 1  and a circle C 3  are then defined as follows using the defined figure elements: 
     
         S.sub.1 =C.sub.1, C.sub.2, B, A                            (4) 
    
     
         C.sub.3 =P.sub.1, S.sub.1                                  (b 5) 
    
     In the foregoing, 
     equation (1) signifies a circle C 1  of center (x 1 ,y 1 ) and radius r 1  ; 
     equation (2) signifies a circle C 2  of center (x 2 ,y 2 ) and radius r 2  ; 
     equation (3) signifies a point whose coordinates are x 3 ,y 3 ); 
     equation (4) signifies a straight line (tangent) S 1  that is tangent to the lower side of circle C 1  and the upper side of circle C 2  ; and 
     equation (5) signifies a circle C 3  tangent to the straight line S 1  and having he point P 1  as its center. The alphabetic character A in (4) is a qualifier meaning &#34;above&#34;, and the alphabetic character B is a qualifier meaning &#34;below&#34;. 
     There are two methods of figure definition, as will be understood from the foregoing. A first definition 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. 10(a)]; a straight line is defined as 
     
         S=x.sub.1, y.sub.1, x.sub.2, y.sub.2 
    
     using coordinate points (x 1 ,y 1 ), (x 2 ,y 2 ) of two points P 1 , P 2  through which the straight line passes [see FIG. 10(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. 10(c)]. A figure definition statement based on the first definition method shall be referred to as a first definition statement. 
     The second definition method entails defining straight lines and circles using other points, straight lines and circles that have already been defined. For example, point P 1  [see FIG. 10(d)] is defined as follows: 
     
         P.sub.1 =S,C, L 
    
     (the alphabetic character L is a qualifier meaning &#34;left&#34;); the straight lines S 1 , S 2  [see FIG. 10(e)] are defined as follows: 
     
         S.sub.1 =C.sub.1, C.sub.2, A, A 
    
     
         S.sub.2 =C.sub.1, C.sub.2, B, B 
    
     (the alphabetic character A is a qualifier meaning &#34;above&#34;, and the alphabetic character B is a qualifier meaning &#34;below); and the circle C [see FIG. 10(f)] is defined as follows, by way of example: 
     
         C=S.sub.1 S.sub.2, S.sub.3, R, A, L 
    
     (the alphabetic character R is a qualifier meaning &#34;right&#34;). A figure definition statement based on the second definition method shall be referred to as a second definition statement. 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, the arrangement is such that a figure element is defined by the first definition statement, and another figure element is defined by the second definition statement based on the figure element in accordance with the first definition statement. 
     There are cases where it is desired to modify the center (x 2 ,y 2 ) and radius r 2  of the circle C 2 , which is an example of an already defined figure element (FIG. 8), to (x 2  &#39;,y 2  &#39;) and r 2  &#39;, respectively, to arrive at the circle indicated by the broken line in FIG. 9. When the definition statement of circle C 2  is modified to 
     
         C.sub.2 =x.sub.2 &#39;, y.sub.2 &#39;,r.sub.2&#39; 
    
     in such case, the straight line S 1  defined as being tangent to the lower side of circle C 1  and the upper side of circle C 2  fails to exist and an error is generated. When the error occurs, automatic programming cannot resume until the error is removed. Consequently, in the prior art, it is necessary for the operator to manually call a figure definition statement revision screen, search for all error locations from the figure definition statement, perform redefinition, display the redefined figure element and verify the same. This is a troublesome operation. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the invention is to provide a figure element revising method in which it is possible to easily and rapidly eliminate any error that might be generated, by revision of a figure element, in a figure definition statement which utilizes the revised figure element. 
     Another object of the invention is to provide a figure element revising method whereby a figure definition statement in which an error has occurred can be easily and rapidly revised into another correct figure definition statement. 
     A further object of the invention is to provide a figure element revising method whereby a figure definition statement in which an error has occurred and a figure element based on this figure definition statement can be easily visually recognize. 
     A further object of the invention is to provide a figure element revising method in which it is unnecessary to change over to a revision screen each time an error occurs. 
     In accordance with the present invention, the foregoing objects are attained by a first step of displaying an already defined figure element, designating a predetermined figure element and revising a figure definition statement of the designated figure element, a second step of checking whether an error has occurred in another figure element statement due to revision of the first-mentioned definition statement, a third step of displaying the figure definition statement in which the error has occurred on a display screen, and displaying, in colors that differ from each other, the figure element prior to revision specified by the figure definition statement in which the error has occurred, and another figure element defined using this figure element prior to revision, and a fourth step of revising the figure definition statement in which the error has occurred. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of an apparatus for practicing the present invention; 
     FIG. 2 is a chart describing the principal portion of a menu chart; 
     FIG. 3 is a flowchart illustrating the figure element revision processing according to the present invention; 
     FIGS. 4 through 7 are diagrams describing an embodiment of the present invention; and 
     FIGS. 8 through 9 and 10(a)-10(f) are diagrams describing examples of the prior art. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 is a block diagram of an apparatus for practicing the present invention. 
     Numeral 101 denotes a ROM storing a loading program and the like, 102 a processor for executing automatic programming processing, and 103 a RAM for storing a system program read in from a floppy FL, as well as various parameters and results of processing. Numeral 104 denotes a NC data memory for storing the finally created NC data having an executable format, 105 a keyboard, 106 a display unit (CRT), 107 a disc controller, and 108 a tablet device having a tablet surface 108a to which a menu chart 108b having menu items is affixed. Prescribed menu items are picked or selected by a tablet cursor 108c. A graphic cursor on a display screen is moved by moving the cursor 108c on the tablet surface 108a. FL represents a floppy disc. 
     FIG. 2 is a view for describing the principal parts of the menu chart 108b. Numeral 1 is a &#34;POINT/PATTERN 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 FIGURE DEFINITION&#34; section and 5 is a &#34;FIGURE EDITING&#34; section. The &#34;FIGURE EDITING&#34; section 5 includes an &#34;ELEMENT REVISION&#34; item 5a and an &#34;EXECUTE item 5b as illustrated in FIG. 1. 
     FIG. 3 is a flowchart of figure element revision processing according to the invention, and FIGS. 4 through 7 are views for describing figure element revision processing. The figure element revising method of the invention will now be described in accordance with FIGS. 3 through 7. 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 circles C 1 , C 2 , C 3 , straight line S 1  and point P 1  shown in FIG. 4 are defined by the first definition statement based on a direct coordinate input, or by the second definition statement while citing figure elements displayed on the CRT 106, using the tablet 108 and keyboard 105. As for the figure definition statements, it is assumed that figure definition is performed as follows, just as described above in relation to FIG. 8: 
     
         C.sub.1 =x.sub.1, y.sub.1, r.sub.1 
    
     
         C.sub.2 =x.sub.2, y.sub.2, r.sub.2 
    
     
         P.sub.1 =x.sub.3, y.sub.3 
    
     Each of the foregoing is a first definition statement. 
     
         S.sub.1 =C.sub.1, C.sub.2, B, A 
    
     
         C.sub.3 =P.sub.1, S.sub.1 
    
     Each of the foregoing is a second definition statement. 
     In the present invention, the figure definition statements are stored in the RAM 103 just as defined above, the entirety of the second definition statement is re-expressed by the first definition statement and is similarly stored in the RAM 103, and each figure element is displayed on the CRT 106 based on the first definition statement (FIG. 3, step 201). 
     Under these conditions, assume that the circle C 2  (FIG. 4) among the group of figure elements displayed on the CRT 106 is re-defined as shown by the one-dot chain line in FIG. 6. In such case, the &#34;ELEMENT REVISION&#34; item 5a is picked from the menu chart 108b. In response to the selection of &#34;ELEMENT REVISION&#34;, the processor 102 displays the prompt &#34;SELECT ELEMENT&#34; on the CRT 106 and causes the graphic cursor GCS to be displayed on the CRT in movable fashion (FIG. 3, step 202). 
     When graphic cursor GCS is positioned on the circle C 2 , which is the element to be revised, in order to pick the same (FIG. 3, step 203; FIG. 4), the processor 102 obtains the figure elements related to the element namely circle C 2 , which is the selected element, the figure element (straight line S 1  in the example) defined using the circle C 2 , and the figure element (circle C 3  in the example) defined using the figure element S 1 , and causes these figure elements to be displayed in different colors (FIG. 3, step 204; FIG. 5). For example, if all of the figure elements prior to revision are displayed in green, the circle C 2  may be displayed in red after it is selected, and the straight line S 1  and circle C 3  may be displayed in yellow. 
     The data necessary for element revision, namely the definition statement &#34;C 2  =x 2 , y 2 , r 2  &#34; is displayed on the CRT 106 to make possible revision of the selected element (FIG. 3, step 205). 
     Next, the operator modifies the definition statement of circle C 2  to &#34;C 2  =x 2  &#39;, y 2  &#39;, r 2  &#39;&#34; picks the &#34;EXECUTE&#34; item 5b from the menu chart 108b to execute the revision. When this is done, the processor 102 changes the circle C 2  (FIG. 5) to the circle C 2  (the one-dot chain line in FIG. 6) and causes this to be displayed (FIG. 3, step 206). 
     At the same time, the processor 102 performs a check to determine whether an error has been generated in the definition statement of a figure element related to the circle C 2 , namely whether existence of a figure element related to the circle C 2  is possible (FIG. 3, step 207). In this example, the definition statement of the straight line S 1 , which is a figure element related to the circle C 2 , is &#34;S 1  =C 1 , C 2 , B, A&#34; (a straight line tangent to circle C 1  from below and tangent to circle C 2  from above). Consequently, it is impossible for the straight line S 1  to exist. The processor 102 therefore decides that the definition of the straight line S 1  is impossible and generates an error (referred to as a &#34;definition error&#34;). 
     When a definition error is generated, the processor 102 causes the element (i.e., straight line S 1 ) specified by the figure definition statement in which the definition error has occurred, and the element (i.e., circle C 3 ) defined utilizing this element S 1 , to be displayed in mutually different colors on the CRT 106. For example, if the displayed color of the figure elements is green for both circles C 1  and C 2 , then the straight line S 1  will be displayed in red and the circle C 3  in yellow. Further, the processor 102 causes the data necessary for revision of the straight line S 1  and circle C 3 , namely the following prompt and definition statements: 
     &#34;ERROR; REVISE FOLLOWING DEFINITION STATEMENTS: 
     S 1  =C 1 , C 2 , B, A 
     C 3  =P 1 , S 1  &#34; 
     to be displayed on the CRT 106 to make possible revision of the definition statements of straight line S 1  and circle C 3  (FIG. 3, step 208; FIG. 6). 
     The operator then for example revises the definition statement of straight line S 1  in which the definition error has occurred to &#34;S 1  =C 1 , C 2 , A, A&#34; (a straight line tangent to circle C 1  from above and tangent to circle C 2  from above), and picks the &#34;EXECUTE&#34; item 5b from the tablet menu chart 108 (step 209). When this is done, the processor 102 checks to determine whether a definition error has been generated (FIG. 3, step 207). If no definition error has been generated, the straight line S 1  displayed on the CRT 106 is revised to S 1 , the circle C 3  is revised to circle C 3  &#39;, and the displayed colors are returned to the original color green (see FIG. 7) to make possible entry of the next figure element (FIG. 3, step 210). 
     Thus, in accordance with the present invention, a revision can be performed rapidly and with ease even if an error is generated, in a figure definition statement which utilizes the revised figure element.