1. Field of the Invention
The present invention relates to computer-aided design (CAD) methods, and in particular, to a CAD method for realizing a CAD apparatus capable of automatically correcting a dimension-line data in accordance with an editing process in a CAD drawing.
2. Description of the Related Art
CAD apparatuses store data on shapes of mechanical parts or other components and create drawings, such as part drawings, on the basis of the stored data. In the drawings (e.g., part drawings) created by the CAD apparatuses, dimension lines are drawn in some cases. For drawing a dimension line, automatically drawing the dimension line by specifying a graphic element in a drawing is widely used. When the graphic element in the drawing is edited, the dimension-line data relating to the graphic element is required to be corrected. Since the task of correction is complicated, it is desirable for a CAD apparatus to have a capability of automatically correcting the dimension-line data in accordance with a process of editing the graphic element for operability.
One approach to the capability is disclosed in Japanese Unexamined Patent Application Publication No. 5-189505. The technique disclosed in this published patent application covers automatic correction of a dimension line regarding only a section within a single graphic element.
It is an object of the present invention to provide a CAD method for realizing a CAD apparatus that is capable of automatically correcting a dimension line for a dimension between different graphic elements in accordance with an editing process in an appropriate manner.
According to a first aspect of the present invention, a CAD method allows a computer to execute a graphic-element identifying step of identifying a specified graphic element, a coordinates acquiring step of acquiring specified coordinate values, a coordinates storing step of storing the acquired coordinate values in association with the identified graphic element, and a dimension-line creating step of creating data of a dimension line on the basis of two sets of the stored coordinate values.
In the CAD method, the association of the acquired coordinate values with the identified graphic element may be an association in which a point among points constituting the identified graphic element replaces the acquired coordinate values.
According to a second aspect of the present invention, a computer-readable storage medium that stores a CAD program that allows a computer to execute a graphic-element identifying step of identifying a specified graphic element, a coordinates acquiring step of acquiring specified coordinate values, a coordinates storing step of storing the acquired coordinate values in association with the identified graphic element, and a dimension-line creating step of creating data of a dimension line on the basis of two sets of the stored coordinate values.
In the storage medium, the association of the acquired coordinate values with the identified graphic element may be an association in which a point among points constituting the identified graphic element replaces the acquired coordinate values.
According to a third aspect of the present invention, a CAD apparatus capable of connecting to a peripheral device includes a graphic-element identifying means for identifying a specified graphic element, a coordinates acquiring means for acquiring specified coordinate values, a coordinates storing means for storing the acquired coordinate values in association with the identified graphic element, and a dimension-line creating means for creating data of a dimension line on the basis of two sets of the stored coordinate values.
In the CAD apparatus, the association of the acquired coordinate values with the identified graphic element may be an association in which a point among points constituting the identified graphic element replaces the acquired coordinate values.
Therefore, according to the embodiment, as the data regarding the position at which the dimension line is created corresponding to the graphic element to which the dimension line is attached, the coordinate values specified by the user are stored in association with the graphic element, and the specified coordinate values are edited with the editing process of the graphic element. As a result, automatically correcting a dimension-line data can be performed. Even for a dimension line between different graphic elements, the dimension-line data can be properly created so as to correspond with an edited graphic element.
Embodiments are described below with reference to the attached drawings. The explanation for the embodiments below assumes a process flow of creating a dimension line in a prepared part drawing and then editing a graphic element.
After the graphic element is specified, the user specifies a position at which he or she wants to attach the dimension line in the specified graphic element. Since precisely specifying the position at which the dimension line is to be created is difficult, the user specifies a point, the dimension-line creation instructing unit 4 acquires the coordinate values of the specified point (step S4), and, on the basis of the coordinate values, the dimension-line creating unit 6 determines an actual position at which the dimension line is to be actually created.
The graphic element and the position at which the dimension line is to be created can be separately specified by the user, as described above, and they may be simultaneously specified by the user. For example, after a graphic element that is nearest to the coordinate values of a point specified by the user is considered to be specified, the coordinate values can be used as specification data regarding the position at which the dimension line is to be created corresponding to the specified graphic element. Since each dimension line represents the relationship between two points, the user usually specifies two places at which the dimension line is to be created. With respect to the graphic element, the user can specify two different graphic elements or the same graphic element.
The dimension-line creating unit 6 receives the graphic-element ID and the specified coordinate values from the dimension-line creation instructing unit 4. The dimension-line creating unit 6 determines the actual position at which the dimension line is to be actually created by using a predetermined method and creates data regarding the dimension line (step S6). The method for creating dimension-line data and the method for adjusting the length of a leader line and the place for writing a dimension value are of any method known to those skilled in the art, so the explanation thereof is omitted here. The dimension-line data is stored in the auxiliary storage device 18 by the dimension-line data managing unit 8 (step S8) and managed. A first example of a data format of dimension-line data is illustrated in
The created dimension-line data is added to the drawing data. The drawing-data managing unit 14 updates the drawing data, stores the updated drawing data in which the dimension-line data has been added in the auxiliary storage device 18 (step S10), and manages the drawing data. The drawing-data managing unit 14 redisplays drawing on the basis of the drawing data in which the dimension-line data has been added on the display device 20 (step S12).
If the dimension-line data associated with the graphic element having the identified graphic-element ID is present (Yes in step S26), the graphic-element editing unit 12 receives the specified coordinate values associated with the graphic element from the dimension-line data managing unit 8 and combines a point that lies at the coordinate values with the graphic element (step S30), and edits the graphic element with which the point has been combined (step S32). The combination can be realized by any method. For example, the relative relationship between the specified coordinates and the graphic element can be maintained by setting a reference point in the graphic element and representing the specified coordinate values as an offset with respect to the reference point.
After the graphic element is edited, the point element is separated from the graphic element with which the point has been combined, and the specified coordinate values are reset to the coordinate values of the separated point element (step S34). The dimension-line creating unit 6 determines a position at which a new dimension line is to be created by using a predetermined method (step S36). If the position at which the current dimension line is created is different from the position of the new dimension line, the dimension-line creating unit 6 determines that the current dimension-line data is required to be changed. If there is a necessity to change the current dimension-line data (Yes in step S38), the dimension-line creating unit 6 deletes the current dimension-line data relating to the graphic element before being edited (step S40), and the new dimension-line data relating to the graphic element after being edited is created (step S42). The dimension-line data managing unit 8 updates the dimension-line data and stores the updated dimension-line data in the auxiliary storage device 18 (step S44). The drawing-data managing unit 14 updates the drawing data and stores the updated drawing data in which the edited graphic element has been reflected in the auxiliary storage device 18 (step S46), and redisplays drawing on the basis of the drawing data on the display device 20 (step S48).
A concrete case is described below.
The relation between a position indicated by point P1 specified by the user and an actual position at which the first end point of the dimension line is actually created in circle A is formed by determining the direction of point P1 as seen from the center of circle A, which is a target for setting the dimension line, (e.g., right, left, top, or bottom direction) and setting a point on the circumference of circle A that is farthest from the center in the determined direction as the first end point of the dimension line. The relationship between a position indicated by point P2 and an actual position at which the second end point of the dimension line is actually created in circle B is formed in a similar manner. As a result, the dimension line is created as shown in
Where the dimension-line ID of the newly created dimension line is size001, the graphic-element ID of circle A is circle001, the graphic-element ID of circle B is circle002, the coordinates of P1 are (x1, y1), and the coordinates of P2 are (x2, y2), the dimension-line data that is stored in the auxiliary storage device 18 by the dimension-line data managing unit 8 is illustrated in
After this, circle A is edited. When the user specifies circle A, the graphic-element edit instructing unit 10 identifies a graphic-element ID of circle001, and the graphic-element editing unit 12 inquires of the dimension-line data managing unit 8 whether a dimension-line data associated with the graphic element having the identified graphic-element ID circle001 is present. The dimension-line data managing unit 8 finds the dimension-line data with the dimension-line ID size001 and returns the coordinates (x1, y1) associated with the graphic-element ID circle001. The graphic-element editing unit 12 combines point P1 with circle A, and performs an editing process described below while maintaining the relative position between point P1 and the reference point in circle A. A case in which circle A is transferred is illustrated in
Therefore, according to the embodiment, as the data regarding the position at which the dimension line is created corresponding to the graphic element to which the dimension line is attached, the coordinate values specified by the user are stored in association with the graphic element, and the specified coordinate values are edited with the editing process of the graphic element. As a result, automatically correcting a dimension line can be performed. Even for a dimension line between different graphic elements, the dimension-line data can be properly created so as to correspond with an edited graphic element.
After the graphic element is specified, the user specifies a position at which he or she wants to attach the dimension line in the specified graphic element. Since precisely specifying the position at which the dimension line is to be created is difficult, the user specifies a point, and the coordinate values of the specified point are acquired by the dimension-line creation instructing unit 4 (step S54). Among points constituting the graphic element (hereinafter referred to as constituent points), a constituent point that is nearest to the coordinate values replaces the acquired coordinate values (step S56). On the basis of the point, the actual position at which the dimension line is to be created is determined.
The graphic element and the position at which the dimension line is to be created can be separately specified by the user, as described above, and they may be simultaneously specified by the user. For example, after a graphic element that is nearest to the coordinate values of a point specified by the user is considered to be specified, the coordinate values can be used as specification data regarding the position at which the dimension line is to be created corresponding to the specified graphic element. Since each dimension line represents the relationship between two points, the user usually specifies two places at which the dimension line is to be created. With respect to the graphic element, the user can specify two different graphic elements or the same graphic element.
The dimension-line creating unit 6 receives the graphic-element ID and position data regarding the constituent point replacing the specified coordinates from the dimension-line creation instructing unit 4. The position data regarding the constituent point is represented by relative coordinates in the graphic element. In other words, the position data regarding the constituent point is represented by an offset with respect to a reference point in the graphic element. The dimension-line creating unit 6 determines the actual position at which the dimension line is to be actually created by using a predetermined method and creates data regarding the dimension line (step S58). The method for creating the dimension-line data and the method for adjusting the length of a leader line and the place for writing a dimension value are of any method known to those skilled in the art, so the explanation thereof is omitted here. The dimension-line data is stored in the auxiliary storage device 18 by the dimension-line data managing unit 8 (step S60) and managed. A second example of a data format of dimension-line data is illustrated in
The created dimension-line data is added to the drawing data. The drawing-data managing unit 14 updates the drawing data, stores the updated drawing data in which the dimension-line data has been added in the auxiliary storage device 18 (step S62), and manages the drawing data. The drawing-data managing unit 14 redisplays drawing on the basis of the drawing data in which the dimension-line data has been added on the display device 20 (step S64).
The dimension-line creating unit 6 receives the dimension-line data from the dimension-line data managing unit 8 (step S78) and determines a new position at which the dimension line is to be added (step S82) by using a predetermined method. If the current position of the dimension line is different from the new position, the dimension-line creating unit 6 determines that the current dimension-line data is required to be changed. If there is a necessity to change the current dimension-line data (Yes in step S84), the dimension-line creating unit 6 deletes the current dimension-line data (step S86) and creates the new dimension-line data (step S88). The dimension-line data managing unit 8 receives the dimension-line data from the dimension-line creating unit 6, updates the data, and stores the updated data in the auxiliary storage device 18 (step S90). After necessary changes are executed on all the dimension-line data (Yes in step S80), the drawing-data managing unit 14 updates the drawing data and stores the updated drawing data in which the edited graphic element has been reflected in the auxiliary storage device 18 (step S92), and redisplays drawing on the basis of the drawing data on the display device 20 (step S94).
In some cases, by a partial deletion of the graphic element, the constituent point replacing the specified coordinates is lost. In such cases, the old dimension-line data is deleted, and the new dimension-line data is not created. Alternatively, in such cases, the old dimension line may be highlighted to call the attention of the user to that the dimension-line data will be lost. If there are multiple dimension-line data that will be lost, all the dimension-line data may be deleted collectively in response to an instruction from the user.
A concrete case is described below. In this case, a three-dimensional drawing is targeted.
After this, a right plane in
In the embodiment, the position at which the dimension line is to be created is stored by storing the constituent point in the graphic element replacing the coordinates of the point specified by the user, instead of storing the coordinates of the point specified by the user as they are. Therefore, the information relating to the creation of the dimension line is automatically edited with the editing process of the graphic element, so that editing the specified coordinates every time the graphic element is edited is not necessary. Additionally, the user can easily grasp a case in which the constituent point replacing the specified coordinates is lost by the partial deletion of the graphic element.
The CAD apparatus according to the embodiments can be realized as not only hardware but also software in a computer. For example, the CAD apparatus can be realized by creating a program that allows the computer to perform the functions of the dimension-line creation instructing unit 4, the dimension-line creating unit 6, the dimension-line data managing unit 8, the graphic-element edit instructing unit 10, the graphic-element editing unit 12, and the drawing-data managing unit 14, which are shown in
As shown in
Number | Date | Country | Kind |
---|---|---|---|
2005-338749 | Nov 2005 | JP | national |