PICTURE ELEMENT CORRECTION METHOD

Abstract: To correct a picture element, a picture element (C2) to be corrected is designated and the designated picture element (C2) is drawn with a line of a different kind and a different color from other picture elements while the picture elements (S1, C1) used for defining the designated picture element (C2) are drawn with lines of different kinds and different colors. A message (M) containing a radius necessary for definition statement of the picture elements (S1, C1) and for defining the picture element (C2) is displayed on a display, and correction of the picture element is conducted by referring to this display.

Description: 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 figure elements defined using figure elements that have already been defined. It is known from US-A-4,618,924 that in programming a machine tool, a representation of a workpiece can be computer generated by combining a plurality of basic or primitive shapes. In an automatic programming system for creating NC data using an automatic programming language such as APT 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 "figure definition"), and then defining a tool path using the defined points, straight lines and circular arcs (referred to as "motion statement definition"), 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. Fig. 6 is a view for describing figure definition statements. Figure definition of circles C₁, C₂, C₃, C₄ and straight lines S₁, S₂ is performed as follows using a keyboard or tablet: C₁ = x₁, y₁, r₁ S₁ = P(x₂,y₂), P(x₃,y₃) C₂ = S₁, C₁, r₄, B, I, R C₃ = x₅, y₅, r₅ C₄ = S₁, C₁, C₂, B, I, O, L S₂ = C₂, C₃, A, A In the foregoing, (1) signifies a circle C₁ of center (x₁,y₁) and radius r₁; (2) signifies a straight line S₁ passing through two points (x₂,y₂), (x₃,y₃); (3) signifies a circle C₂ of radius r₄ tangent to the straight line S₁ from below, internally tangent to the circle C₁ and located on the right side; (4) signifies a circle C₃ of center (x₅,y₅) and radius r₅; (5) signifies a circle C₄ tangent to the straight line S₁ from below, internally tangent to the circle C₁, externally tangent to the circle C₂ and located on the left side; and (6) signifies a straight line (tangent) S₂ tangent to the circle C₂ from above and to the circle C₃ from above. The alphabetic character A represents a qualifier meaning "above", B a qualifier meaning "below", R a qualifier meaning "right", L a qualifier meaning "L", I a qualifier meaning "internally tangent", and O a qualifier meaning "externally tangent". As described in the example of the figure definition statement of the prior-art set forth above, there are two methods of figure definition. 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. 6(a)]; a straight line is defined as S = P(x₁,y₁), P(x₂,y₂) using the two points (x₁,y₁), (x₂,y₂) 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)]. A figure definition statement based on the first definition method shall be referred to as a first definition statement hereinafter. 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₁ [see Fig. 7(d)] is defined as follows: P₁ = S, C, L The straight lines S₁ [see Fig. 7(e)] is defined as follows, by way of example: S₁ = C₁, C₂, A, A (A is a qualifier meaning "above"); and the circle C [see Fig. 7(f)] is as follows, by way of example: C = S₁, S₂, S₃, R, A, L A figure definition statement based on the second definition method shall be referred to as a second definition statement hereinafter. Second definition statements are of various types and are not limited to the foregoing example. 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 using the figure element in accordance with the first definition statement. There are cases where it is desired to modify a figure element (Fig. 6), such as the circle C₂, defined using an already defined figure element. In such case, the definition statement of circle C₂ is C₂ = S₁, C₁, r₄, B, I, R Since definition is performed utilizing the figure elements S₁, C₁ based on the first definition statement, the figure elements S₁, C₁ and the radius r₄ must be revised in order to make the modification. However, the figure definition statement of each figure element is not displayed on the display screen, and there is no correspondence between the symbols (P i , S i , C i ) of the figures used by the figure definition statements and the figure elements painted on the display screen. Consequently, searching for figure elements and data utilized in the definition of the figure element desired to be modified is a troublesome operation, and making the revision is very difficult. Accordingly, an object of the present invention is to provide a figure element revising method through which figure elements and data necessary for making a revision can be distinguished merely by designating the figure element desired to be modified, as a result of which revision of the figure element can be performed quickly and easily. There is known from EP-A-0217048 a method for editing a graphic object in an interactive draw graphic system, wherein the operator is allowed to select one of two editing modes which results in a graphic object being either redefined or remaining as is when a graphical editing action is applied only to a portion of the object. According to the present invention there is provided a method of creating NC data in the form of a part program defining a tool path by means of figure elements displayed on a screen, comprising a figure element revising method for revising a figure element defined by a figure element definition statement in automatic programming language, characterised by:displaying a group of already defined figure elements including a figure element to be revised and at least one other figure element which is or are used as a basis for defining the figure element to be revised; designating the figure element to be revised, thereby changing a color and/or line type of said figure element to be revised to display said figure element in a first mode; changing a color and/or line type of the or each other figure element which is used as a basis for defining said figure element to be revised, to display said the or each other figure element in a second mode; displaying a figure definition statement of said the or each other figure element on a display screen, together with data which has to be changed regarding the figure element to be revised; and revising the figure element to be revised upon referring to the resulting display. It is to be appreciated that it is already known in the prior art to emphasise particular characters, by altering their colour, displayed on the display unit of a numerical controller. Thus see DE-A-3245610. For a better understanding of the present invention and to show how it may be put into effect reference will now be made, by way of example, to the accompanying drawings in which: Fig. 1 is a block diagram of an apparatus for practising the present invention; Fig. 2 is a view for describing the principal portion of a menu chart; Fig. 3 is a flowchart of figure revision processing according to the invention; Figs. 4 and 5 show examples of conversational displays in figure revision processing according to the present invention; and Fig. 6 and 7 are views for describing an example of the prior art. Fig. 1 is a block diagram of an automatic programming 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 an 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 by a tablet cursor 108c. A graphic cursor on a display screen is moved by moving the cursor 108a on the tablet surface. FL represents a floppy disc. Fig. 2 is a view for describing the principal parts of the menu chart 108b. Numeral 1 is a "POINT/POINT GROUP DEFINITION" section, 2 a "STRAIGHT LINE DEFINITION" section, 3 a "CIRCLE DEFINITION" section, 4 a "SPECIAL FIGURE DEFINITION" section and 5 a "FIGURE EDITING" section. The "FIGURE EDITING" section 5 includes an "ELEMENT CORRECTION" item 5a. Fig. 3 is a flowchart of figure element revision processing according to the invention. The figure element revising method of the invention will now be described in accordance with this flowchart. 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₁, C₂ and straight line S₁ shown in Fig. 4 are defined by performing a direct coordinate input, or by 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: C₁ = x₁, y₁, r₁ S₁ = P(x₂,y₂), P(x₃,y₃) C₂ = S₁, C₁, 20, B, I, R The defined figure elements are stored in the RAM 103 and displayed in the form of, say, yellow lines, on the CRT 106. Under these conditions, assume that the circle C₂ among the group of figure elements displayed on the CRT 106 is to be modified. In such case, the "ELEMENT CORRECTION" item 5a is picked from the table menu chart 108b. In response to selection of "ELEMENT CORRECTION" the processor displays the prompt "SELECT ELEMENT" on the CRT 106 and causes the graphic cursor GCS to be displayed on the CRT (step 201). When graphic cursor GCS is positioned on the circle C2, which is the element-to be revised, in order to pick the same (step 202), the processor 102 causes the selected element, namely circle C₂, to be displayed in the form of a line type and color [e.g., a white, bold, solid line (Fig. 5)] different from those of the other figure elements (step 203) and then determines whether there is a figure element utilized in the definition of circle C₂ (step 204). If a utilized figure element (referred to as a "referential element") exists, the first referential element (straight line S₁ in the example) is displayed in the form of a different line type and color (e.g., a broken red line), and the second referential element (circle C₁ is the example), which is used in the definition of circle C₂, is displayed in the form of a different line and color (e.g., a solid red line (step 205). It should be noted that elements can be displayed upon changing only their color or line type to distinguish them. A message M which includes the data necessary for element revision, namely the definition statements of the first referential element (straight line S₁) and second referential element (circle C₁) as well as such data as the radius used in the definition of the circle C₂, is displayed on the CRT 106 (step 206). Thereafter, the operator makes the revision (step 207) upon referring to the figures and the message M displayed on the CRT 106. For example, if the radius of circle C₂ is to be revised from 20 to 35, the "20" of "R=20" (Fig. 5) is replaced by "35" by a prescribed operation at keyboard 105, and then the execute key is pressed. When this is done, the figure of the circle C₂ changes from a circle of radius 20 to a circle of radius 35, the color of the entire figure returns to yellow and the figure definition statement also changes to C₂ = S₁, C₁, 35, B, I, R In accordance with the present invention, a predetermined figure element is designated, the color and/or the type of line of the designated figure element are changed to display the element in a first mode, the color and/or the type of line of a referential element used in the definition of the designated figure element is changed to display the figure element in a second mode, and the referential element definition statement and data, such as a radius needed to define the designated figure element, are displayed on a display screen to perform the revision. As a result, revision of the figure element can be performed quickly and easily and, hence, the NC data obtained using the defined figure element can also be created quickly and easily.

Claims: A method of creating NC data in the form of a part program defining a tool path by means of figure elements (S₁C₁C₂) displayed on a screen comprising a figure element revising method for revising a figure element (C₂) defined by a figure element definition statement in automatic programming language, characterised by: displaying a group of already defined figure elements including a figure element (C₂) to be revised and at least one other figure element (S₁, C₁) which is or are used as a basis for defining the figure element (C₂) to be revised; designating the figure element (C₂) to be revised, thereby changing a color and/or line type of said figure element (C₂) to be revised to display said figure element (C₂) in a first mode; changing a color and/or line type of the or each other figure element (S₁,C₁) which is used as a basis for defining said figure element (C₂) to be revised, to display said the or each other figure element (S₁,C₁) in a second mode; displaying a figure definition statement of said the or each other figure element (S₁,C₁) on a display, screen together with data which has to be changed regarding the figure element (C₂) to be revised; and revising the figure element (C₂) to be revised upon referring to the resulting display. A method according to claim 1, characterised by displaying other data, which are used in definition of said figure elements (C₂) to be revised, in addition to the figure definition statement of the figure element (C₂) to be revised.

Inventors: KAJITANI AKIRA FANUC DAI- VIRA, SEKI MASAKI, TAKEGAHARA TAKASHI, KAJITANI, AKIRA FANUC DAI-3 VIRA-KARAMATSU, SEKI, MASAKI, TAKEGAHARA, TAKASHI
Applicants: FANUC LTD, FANUC LTD.
Application year: 1988
Main classification: G05B19
IPC codes: G05B19