METHOD OF SETTING DRAWING PARAMETERS IN AN XY PLOTTER

Abstract: When two vertexes (P1,P2) of a region to be constructed including a figure (F1') that is transformed such as moved, enlarged or contracted, are designated on a CRT screen (5a) the processor calculates the moving amounts of the position of origin of figure before and after the transformation and the magnification of figure transformation, and further calculates coordinate positions (LDX,LDY), (RUX,RUY), (MX,M Y) of the two vertexes and the centre (P3) of the region to be constructed. When it is determined that the region to be constructed is not similar to the plotter paper (100) based on the calculated ratio of a vertical length to lateral length of the region to be constructed and based on the calculated ratio of the verticval length to the lateral length of the plotter paper, the processor calculates a maximum construction magnification by dividing the product of the transformation magnification and the vertical or lateral length of the paper by the vertical or lateral distance between the two vertexes, and automatically determines the coordinate positions (OX,OY) of the left lower vertex of a similar rectangle so as to include the region to be constructed and such that the left lower vertex (P4) of the similar rectangle is corresponded to the origin (PPO) in the block coordinate system. The figure is constructed at a maximum magnification on a suitable place of the plotter paper by taking into consideration the moving amount of origin of the figure and the coordinate positions of vertexes of the similar rectangle.

Description: The present invention relates to a drawing parameter setting method capable of easily setting parameters which are used when figures produced by a CAD/CAM system or the like are drawn by an XY plotter. Conventionally, when a group of figures (drawing) produced by a CAD/CAM system or the like are drawn by an XY plotter, a rectangular drawing subject region (hereinafter referred to as CRT drawing) including a figure group F1″ (Figs. 7 and 8) drawn on the screen of a graphic display device is specified by manually inputting the lengths Xmax and Xmin thereof in positive and negative directions of the X axis and the lengths Ymax and Ymin thereof in positive and negative directions of the Y axis to an information processor of the CAD/CAM system through a tablet, a keyboard, and the like. The ratio (plotting scale) of the dimensions of the drawing which is to be drawn by the plotter (hereinafter referred to as plotter drawing) to the dimensions of the CRT drawing is also manually input through the keyboard. Further, to plot the CRT drawing at a suitable place on plotter paper with the former being correlated with the latter, a coordinate position (x0, y0) in the xy coordinate system of the XY plotter, which, for example, corresponds to a CRT drawing origin P″ represented by the origin (0, 0) of the XY coordinate system of the CRT screen, is manually input through the tablet or the like. Subsequently, a drawing command is input through the tablet, whereby the CRT drawing is plotted in a predetermined drawing area of the plotter paper 100 on a predetermined scale by the XY plotter under the control of the information processor so that the origin P″ of the CRT drawing coincides with the coordinate position (x0, y0) of the plotter coordinate system (Fig. 7). In Fig. 7, symbol F2″ denotes a figure group drawn on the plotter paper. When, instead of manually inputting the plotting scale, an automatic scale setting mode is selected, the information processor automatically sets a maximum scale for plotting the CRT drawing on the plotter paper 100 on the largest possible scale, in accordance with the size of the plotter paper and the dimensions of the CRT drawing, and the XY plotter reproduces the drawing on the maximum scale (Fig. 8). According to the above-described conventional methods, however, an operator is required to calculate the coordinate position (x0, y0) in the plotter coordinate system corresponding to the CRT drawing origin P″, and to manually input the calculated values to the CAD/CAM system. If the calculation or the manual inputting of the origin is erroneous, the CRT drawing cannot be plotted in the required area of the plotter paper 100, or even the whole of the CRT drawing cannot be drawn on the plotter paper. An object of the present invention is to provide a drawing parameter setting method capable of easily, rapidly and appropriately setting parameters which are used when figures produced by a CAD/CAM system or the like are drawn by an XY plotter. JP-A-62235634 discloses a printing device for an optional area of a display screen, whereby only the display contents of a designated area of a display screen may be printed. JP-A-61267126 on the other hand discloses a plotter controller employing a drawing parameter setting method according to the preamble of the attached claim 1, in order to print an image with a size suitable to the size of the printing paper. According to the present invention there is provided a drawing parameter setting method for an XY plotter, comprising the steps of: (a) displaying, on a graphic display screen for which a first two-dimensional coordinate system is set, a figure which is to be plotted by an XY plotter for which a second two-dimensional coordinate system is set; (b) automatically determining a plotting scale in accordance with a screen-related size and a longitudinal length and a lateral length of plotter paper; and (c) automatically determining at least one coordinate parameter value for correlating the first and second coordinate systems with each other, in accordance with the screen-related size and the longitudinal and lateral lengths of the plotter paper; the method being characterised by the steps of: (d) in said step (b) automatically determining said plotting scale in accordance with the longitudinal length and the lateral length of a first rectangular region as said screen-related size, said first rectangular region which includes said figure being manually setting on said graphic display screen; (e) in said step (c) automatically determining said at least one coordinate parameter value in accordance with the longitudinal and lateral lengths of said first rectangular region as said screen-related size; (f) for said step (d) calculating a first ratio Dc of one of the longitudinal length and the lateral length of the first rectangular region to the other; (g) for said step (d) calculating a second ratio Dp of one of the longitudinal length and the lateral length of the plotter paper to the other, said second ratio Dp corresponding to said first ratio Dc; (h) for said step (d) comparing the shape of the first rectangular region with that of the plotter paper, based on a comparison between the first and second ratios Dc and Dp, to ascertain whether or not they are geometrically similar; and (i) when the first rectangular region is not geometrically similar to the plotter paper, automatically determining on the graphic display screen a second rectangular region which contains therein the first rectangular region and is geometrically similar to the plotter paper, said second rectangular region being set such that a pair of opposed sides thereof, determined by the comparison in said step (h), coincide with a corresponding pair of opposed sides of the first rectangular region. As described above, according to the present invention, the coordinate parameter values for correlating the two coordinate systems set for the graphic display screen and the XY plotter, respectively, are automatically determined in accordance with the plotting scale which is automatically determined in accordance with the longitudinal and lateral lengths of the rectangular region on the graphic display screen including figures to be drawn on the plotter paper, and those of the plotter paper. Accordingly, it is enough to manually set substantially only the drawing region, and hence the drawing parameters for the XY plotter can be easily, quickly and accurately set, without the need of operator's calculation. Brief Description of the Drawings Fig. 1 is a schematic block diagram showing a CAD system to which a drawing parameter setting method according to one embodiment of the present invention is applied; Fig. 2 is a diagram showing a figure drawn on a CRT screen of the system of Fig. 1; Fig. 3 is a diagram showing a figure drawn on the CRT screen after a figure conversion; Fig. 4 is a diagram showing a correlation between a drawing subject region specified on the CRT screen and a plotter paper; Fig. 5 is a diagram showing drawing parameters; Fig. 6 is a flowchart of a drawing parameter setting process executed by the system of Fig. 1; Fig. 7 is a diagram showing a conventional plotting method; and Fig. 8 is a diagram showing another conventional plotting method. Referring to Fig. 1, a CAD system to which a drawing parameter setting method according to one embodiment of the present invention is applied comprises a processor (hereinafter referred to as CPU) 1, a ROM 2, a RAM 3, a keyboard 4, a graphic display device (hereinafter referred to as CRT) 5, a tablet 6, a mouse 7, and an XY plotter 8, as conventionally known, the elements 2 through 8 being connected to the CPU 1 through a bus 9. Drawing data, produced by using the tablet 6 and/or the mouse 7 or transferred from an external memory (not shown), is stored in the RAM 3 under the control of the CPU 1 which operates in accordance with a control program stored in the ROM 2. The operation of the above CAD system will be described with reference to Figs. 2 through 6. First, an operator operates the keyboard 4, the tablet 6, etc. to select a subject figure F1 to be drawn (generally, a group of figures), whereby the figure F1 is drawn on a CRT screen 5a, as shown in Fig. 2, in accordance with corresponding one of the drawing data stored in the RAM 3 and expressed in terms of an XY coordinate system, i.e., a two-dimensional Cartesian coordinate system (hereinafter referred to as CRT coordinate system) previously set for the CRT screen 5a. The CRT coordinate system is previously set such that, for example, the origin thereof coincides with the lower left corner of the CRT screen 5a. To plot the figure or a desired portion thereof in a required area of plotter paper 8a on a required scale, in other words, to permit a drawing subject region (described later) to be suitably positioned on the CRT screen 5a, the operator carries out movement, enlargement or reduction of the figure (figure conversion operation), by using the tablet 6 and/or the mouse 7, whereby the CPU 1 executes a process of figure movement, enlargement or reduction (figure conversion process) accordingly, as known in the art (step S1 in Fig. 6). Consequently, the figure F1 is moved, and/or enlarged or reduced, and the processed figure F1′ is drawn (Fig. 3). When, after completing the figure conversion, the operator operates the tablet 6 to pick a drawing parameter setting command (step S2), the CPU 1 calculates the amount of movement of the origin (e.g., one of the vertexes) of the figure F1 before and after the figure conversion process and the ratio Sc (figure conversion scale) of the dimensions of the figure F1′ after the figure conversion process to those of the figure F1 before the figure conversion process, because the position of the figure origin is varied on the CRT screen 5a due to a figure conversion involving figure movement or the dimensions of the figure are varied due to a figure conversion involving figure enlargement/reduction (step S3). In the case of a CAD system unable to automatically extract required characteristic points of a figure including the figure origin which are used in the calculation of the amount of movement of the figure origin and the figure conversion scale Sc, the operator may operate the tablet 6 or the like to pick the figure origin etc. When the operator then specifies (or inputs by picking), on the CRT screen, the positions of a lower left vertex P1 and an upper right vertex P2 (Fig. 4) determining the rectangular drawing subject region, by using the tablet 6, the CPU 1 calculates coordinate positions (LDX, LDY) and (RUX, RUY) in the CRT coordinate system respectively corresponding to the thus picked vertexes P1 and P2 (step S4). Subsequently, a coordinate position (MX, MY) in the CRT coordinate system corresponding to the middle point of the line connecting the vertexes P1 and P2, i.e., the center P3 of the rectangular drawing subject region, are calculated from the following equations (1) and (2) (step S5): MX = (RUX - LDX)/2 MY = (RUY - LDY)/2 Further, the ratio Dc of the longitudinal length (in the Y axis direction) of the rectangular drawing subject region to the lateral length (in the X axis direction) of the same region and the ratio Dp of the longitudinal length H of the plotter paper 8a to the lateral length W of same are calculated by the following equations (3) and (4), respectively: Dc = (RUY - LDY)/(RUX - LDX) Dp = H/W Next, the CPU 1 determines whether or not the ratio Dc is greater than the ratio Dp (step S6), in other words, it is determined whether the shape of the drawing subject region is elongated from top to bottom or from side to side, compared to the shape of the plotter paper. If the ratios Dc and Dp are equal, then the drawing subject region and the plotter paper 8a are similar in shape. When the shape of the drawing subject region is elongated from side to side (Dc < Dp), compared to the shape of the plotter paper, namely, when it is determined that the product of the longitudinal length of the drawing subject region and the plotting scale is smaller than the longitudinal length H of the plotter paper if a plotting scale is so selected that the product of the lateral length of the drawing subject region and the plotting scale coincides with the lateral length of the plotter paper 8a, and hence a maximum plotting scale S is restricted by the lateral length W of the plotter paper, the CPU 1 calculates the maximum plotting scale S by the following equation (5) (step S7): S = Sc·W/(RUX - LDX) To permit the whole of the drawing subject region to be plotted at a suitable place on the plotter paper 8a even when using the maximum plotting scale S, the CPU 1 computes, in accordance with the below-mentioned equations (6) and (9), a coordinate position (OX, OY) in the CRT coordinate system corresponding to a lower left vertex P4 of that rectangle which includes the whole of the drawing subject region, is similar to the shape of the plotter paper, and is defined by four vertexes P4 to P7 (hereinafter referred to as similar rectangle), at step S8. In Fig. 4, the lower left vertex of the plotter paper 8a is indicated at PP0(0, 0). This means that in this embodiment, a two-dimensional Cartesian coordinate system which is previously set for the XY plotter 8 (hereinafter referred to as plotter coordinate system) is set such that the origin thereof coincides with the lower left vertex PPO of the plotter paper 8a. The vertex P4 of the similar rectangle is correlated with the lower left vertex of the plotter paper 8a, i.e., with the origin of the plotter coordinate system. The coordinate position (OX, OY) of the vertex P4 and the amount of movement of a figure due to the aforesaid figure conversion serve as coordinate parameters for correlating the origins of the CRT coordinate system and plotter coordinate system with each other. When the shape of the drawing subject region is elongated from side to side (Dc < Dp) as compared to the shape of the plotter paper, the X-axis coordinate position OX of the lower left vertex P4 of the similar rectangle is brought into coincidence with the X-axis coordinate position LDX of the lower left vertex P1 of the drawing subject region. Namely, the CPU 1 calculates the X-axis coordinate position OX by the following equation (6): OX = LDX Next, the CPU 1 calculates the Y-axis coordinate position of the lower left vertex P4 of the similar rectangle in the CRT coordinate system, in accordance with equation (9) which is derived in the following manner. Since the similar rectangle and the plotter paper 8a are similar in shape, the following formula (7) is fulfilled: (MX - LDX):W/2 = Y′:H/2 where the value Y′ represents the distance along the Y axis between the center P3(MX, MY) of the drawing subject region and the lower left vertex P4 of the similar rectangle. By arranging the formula (7), the following equation (8) is derived: Y′ = (MX - LDX)·H/W From equations (4) and (8) and Fig. 5, the following equation (9) stands: OY = MY - Dp(MX - LDX) On the other hand, when it is determined at step S6 that the shape of the drawing subject region is elongated from top to bottom (Dc > Dp), compared to the shape of the plotter paper, namely, when it is determined that the product of the lateral length of the drawing subject region and the plotting scale is smaller than the lateral length W of the plotter paper if a plotting scale is so selected that the product of the longitudinal length of the drawing subject region and the plotting scale coincides with the longitudinal length H of the plotter paper 8a, and hence the maximum plotting scale S is restricted by the longitudinal length H of the plotter paper, the CPU 1 calculates the maximum plotting scale S by the equation S = Sc·H/(RUY - LDY) (step S9). Further, when Dc > Dp stands, the CPU 1 calculates the coordinate position OY by the equation OY = LDY (step S10), so that the Y-axis coordinate position OY of the lower left vertex P4 of the similar rectangle coincides with the Y-axis coordinate position LDY of the lower left vertex P1 of the drawing subject region. The CPU 1 then calculates the X-axis coordinate position OX of the vertex P4 of the similar rectangle by the equation OX = MX - (MY - LDY)/Dp, which stands due to the similarity in shape between the similar rectangle and the plotter paper 8a (step S10). When it is determined that the drawing subject region and the plotter paper 8a are of similar shape (Dc = Dp), the CPU 1 calculates the maximum plotting scale S by the equation S = Sc·W/(RUX - LDX) or the equation S = Sc·H(RUY - LDY), and then calculates the X- and Y-axis coordinate positions OX and OY of the vertex P4 of the similar rectangle, which is similar to the drawing subject region, although an illustration is omitted in Fig. 6. Alternatively, either one set of maximum plotting scale/coordinate position calculating steps, corresponding to the steps S7 and S8 or to the steps S9 and S10 alone may be executed. As described above, the drawing parameter setting process which includes an automatic setting of the amount of movement of the figure origin and the figure conversion scale, a manual setting of the drawing subject region, an automatic setting of the maximum plotting scale S, and an automatic setting of the coordinate position (OX, OY) of a vertex of the similar rectangle is quickly and properly carried out. When the operator operates the tablet 6 to pick a plotting mode after completion of the drawing parameter setting, namely, when the CPU 1 is supplied with a plotting command, the CPU 1 converts the drawing data represented by the CRT coordinate system into plotting data represented by the plotter coordinate system, based on the maximum plotting scale S, the amount of movement of the figure before and after the conversion process (from the figure F1 to F1′), and the coordinate position (OX, OY) of the vertex P4 of the similar rectangle corresponding to the origin of the plotter coordinate system, and controls the operation of the XY plotter 8 in accordance with the resultant plotting data. As a result, the figure F1′ drawn on the CRT screen is plotted on the plotter paper 8a on the maximum plotting scale S by the XY plotter 8 under the control of the CPU 1. Moreover, the plotting is effected such that the figure plotted by the plotter is similar to that drawn on the CRT screen and the four sides, i.e., right, left, upper and lower sides, of the similar rectangle coincide with the corresponding edges of the plotter paper, whereby the figure can be accurately positioned in a predetermined position region of the plotter paper. The present invention is not limited to the above embodiment. For example, in the above embodiment, the rectangular drawing subject region is set by specifying the lower left vertex P1 and the upper right vertex P2 thereof, but may alternatively be set by specifying the upper-left and lower-right vertexes or all four vertexes thereof. Further, the maximum plotting scale calculated in step S7 or S8 may be shown on the CRT screen 5a and/or the plotter paper 8a.

Claims: A drawing parameter setting method for an XY plotter, comprising the steps of: (a) displaying, on a graphic display screen (5a) for which a first two-dimensional coordinate system (X,Y) is set, a figure (F1′) which is to be plotted by an XY plotter for which a second two-dimensional coordinate system (X,Y) is set; (b) automatically determining a plotting scale S in accordance with a screen-related size and a longitudinal length H and a lateral length W of plotter paper (8a); and (c) automatically determining at least one coordinate parameter value for correlating the first and second coordinate systems with each other, in accordance with the screen-related size and the longitudinal and lateral lengths H,W of the plotter paper (8a); the method being characterised by the steps of: (d) in said step (b) automatically determining said plotting scale S in accordance with the longitudinal length and the lateral length of a first rectangular region (P1,P2,P3) as said screen-related size, said first rectangular region (P1,P2,P3) which includes said figure (F1′) being manually set on said graphic display screen (5a); (e) in said step (c) automatically determining said at least one coordinate parameter value in accordance with the longitudinal and lateral lengths of said first rectangular region (P1,P2,P3) as said screen-related size; (f) for said step (d) calculating a first ratio Dc of one of the longitudinal length and the lateral length of the first rectangular region (P1,P2,P3) to the other; (g) for said step (d) calculating a second ratio Dp of one of the longitudinal length H and the lateral length W of the plotter paper (8a) to the other, said second ratio Dp corresponding to said first ratio Dc; (h) for said step (d) comparing the shape of the first rectangular region (P1,P2,P3) with that of the plotter paper (8a), based on a comparison between the first and second ratios Dc and Dp, to ascertain whether or not they are geometrically similar; and (i) when the first rectangular region (P1,P2,P3) is not geometrically similar to the plotter paper (8a), automatically determining on the graphic display screen (5a) a second rectangular region (P4,P5,P6,P7) which contains therein the first rectangular region (P1,P2,P3) and is geometrically similar to the plotter paper (8a), said second rectangular region (P4,P5,P6,P7) being set such that a pair of opposed sides (P4,P7 and P5,P6) thereof, determined by the comparison in said step (h), coincide with a corresponding pair of opposed sides of the first rectangular region (P1,P2,P3). A drawing parameter setting method according to claim 1, wherein in said step (b), the plotting scales is automatically determined in accordance with a length of the first-mentioned rectangular region (P1,P2,P3) along a direction in which another pair of opposed sides of the second rectangular region (P4,P5,P6,P7) extends and a length of the plotter paper (8a) along the same direction, when it is determined that the first-mentioned rectangular region (P1,P2,P3) and the plotter paper (8a) are not geometrically similar. A drawing parameter setting method according to claim 1 or 2, wherein said step (c), is based on a coordinate position of one vertex of the second rectangular region (P4,P5,P6,P7) in the first two-dimensional coordinate system, serving as said coordinate parameter value and being automatically determined such that said one vertex of the second rectangular region (P4,P5,P6,P7) is correlated with a corresponding one of vertexes of the plotter paper (8a). A drawing parameter setting method according to any preceding claim, wherein figure conversion including at least one of on-screen movement, enlargement, and reduction of the figure drawn on the graphic display screen is carried out prior to the execution of said step (a). A drawing parameter setting method according to claim 4, wherein said figure conversion includes a figure movement process, and an amount of movement of the figure before and after the figure conversion is automatically determined as said at least one coordinate parameter value. A drawing parameter setting method according to claim 4 or 5, wherein in said step (b), a figure conversion scale is calculated in accordance with dimensions of the figure before and after the figure conversion, and said plotting scale is automatically determined based on said figure conversion scale. A drawing parameter setting method according to any preceding claim, wherein in said step (d), said rectangular region is specified by two vertexes (P1,P2) defining the rectangular region.

Inventors: HAYANAGI SHIZUAKI FANUC DAI- V, HOSONO TAKESHI ROOM - FANUC MA, SEKI MASAKI, SUZUKI KOJI FANUC DAI- VIRA-KA, HAYANAGI, SHIZUAKI FANUC DAI-3 VIRA-KARAMATSU, HOSONO, TAKESHI ROOM 8-307 FANUC MANSHONHARIMOMI, SEKI, MASAKI, SUZUKI, KOJI FANUC DAI-3 VIRA-KARAMATSU
Applicants: FANUC LTD, FANUC LTD.
Application year: 1989
Main classification: G06F3
IPC codes: G06F3, B43L13, G06K15