This application claims priority to Japanese Patent Application No. 2006-212753 filed on Aug. 4, 2006, which is incorporated herein by reference in its entirety.
1. Field of the Invention
The present invention relates to a program and method for generating an approximate curve as smooth as an original curve from point group data approximating the original curve shape by minute line segments.
2. Description of the Related Art
Curved surfaces of an object such as a mold are machined by means of drive shafts of a machine etc. controlled by an NC (numerical control) apparatus to which is input an NC program, which is generated on the basis of point group data generated by means of an apparatus for CAD/CAM, etc. With regard to this process, there is a method developed to generate a smooth approximate curve from point group data approximated by minute line segments, in which interpolation is performed along the approximate curve to process the curved surface in order to maintain the accuracy and the quality of a work surface and shorten a working time.
The point group data approximated by minute line segments to the original curve shape, such as transfer command data provided to each drive shaft of a machine, can be generated as follows by means of an apparatus for CAD/CAM, etc.
First, an offset shape Ko expanded outward by the radius of a tool used in an apparatus for the CAM in processing for a target shape Kj generated by an apparatus for CAD etc. is formed from approximate data of, for example, a polygon Kp obtained by combining minute planes as shown in
Furthermore, the sectional line of the approximate offset shape Kp is approximated by further minute line segments (L) along the travel path of the tool when the process is performed in the apparatus for CAM etc., such that a command mode directed by the NC apparatus can be attained, and is represented by point group data (pi etc.).
However, for the following reason, there may arise a case where some of the point group data (pi etc.) indicating the approximate sectional line L fail to represent an ideal offset shape Ko obtained by expanding the shape by the radius of the tool, as shown in
For example, such a case arises when one plane of a polygon Kp having an approximate offset shape is large, and exceeds a maximum distance of the thinning range specified when data are thinned into finally generated point group data.
In a further example situation, when the curved surface data for similar shapes are smoothly connected on the surface boundary line formed in the middle of the curved surface data of both shapes, a part of the point group data remaining after not being thinned when the point group data are finally generated is not located in an ideal offset shape Ko, due to the data being at a specific position on the shape data or the data belonging to another group.
Furthermore, the above-mentioned case may arise when an apparatus generates point group data without thinning when an allowance is considered only when a polygon Kp in an approximate offset shape is generated when final point group data (pi etc.) are generated from an ideal offset shape Ko, and the approximation is performed by the subsequent minute line segments.
Therefore, in the conventional method in which it is assumed that any piece of point group data Pi is located within an allowance evenly from an ideal offset shape Ko, the displacement from the ideal offset shape Ko changes depending on the position, and an approximate curve and a correction curve for interpolation can be generated such that a specified allowance can be exceeded in some cases. Therefore, the curvature and smoothness of the ideal offset shape Ko are lost, and as a result a streak or a distortion may be generated on a worked surface.
Especially, although a specified allowance is reduced to raise the position accuracy and the density of the point group data is increased to correspond to the work of higher accuracy, the amount of data of the polygon Kp indicating the approximate offset shape increases by a power of two or more. Therefore, the apparatus for the CAM etc. cannot accommodate this, and there may arise a case where each surface of the polygon Kp cannot be as minute as expected. In this case, the point group data close to the ideal offset shape Ko cannot be generated as expected although the processing time consumed by the apparatus for CAM and the amount of generated data increases while only the rate of the point group data located on each plane of the polygon Kp increases, thereby failing to achieve efficiency.
The approximate curve generation method according to the present invention is a method of generating an approximate curve as smooth as the original curve from the point group data as transfer command data in an NC program used in an NC apparatus for controlling transfer of each drive axis of a machine, the point group data being obtained by approximating a curve shape as the original transfer shape by minute line segments. The method includes: an approximate polygon shape range determining step of sectioning the point group data for each line segment of the approximate polygon shape which is generated when the point group data approximating the curve shape are obtained, and sorting the point group data close to a section boundary as valid point group data, and the point group data inside the valid point group data as invalid point group data; and an approximate curve generating step of regarding only the valid point group data, and generating an approximate curve passing through or close to the regarded valid point group data as an approximate curve to be finally obtained.
The embodiments of the present invention are described below with reference to the flowcharts of
An example purpose of the embodiments of the present invention described below is to provide an approximate curve generation method of generating a curve closer to an ideal offset shape Ko by generating an approximate curve and a correction curve after selecting in advance only actually valid point group data when generating the approximate curve, for which the transfer target positions of a drive axis are actually interpolated, or the correction curve for use in the process of generating the approximate curve.
In the approximate polygon shape range determining step S11, input point group data are sequentially sectioned by determining whether or not, in the point group data approximating the original curve shape, the adjacent data . . . , Pi−1, P1, Pi+1, . . . are located together on the line segment having an approximate polygonal shape generated when the point group data are obtained, the point group data close to the section boundary are sorted as valid point group data, and the point group data inside the valid point group data are sorted as invalid point group data.
In the approximate curve generating step S12, only the valid point group data sorted in the approximate polygon shape range determining step S11 are regarded, and an approximate curve passing through or close to the valid point group data is generated in a spline curve interpolation method, a least square method approximation method, etc. as in the conventional art.
Finally, a determination is made as to whether or not the section determination is completed on all input point group data. If data remain to be section-determined, processing returns to the approximate polygon shape range determining step S11, and the determination is repeated again. If all input point group data are completely section-determined, the series of processes terminates (S13).
First, in the approximate polygon shape range determining step S11, a determination is made as to whether or not there exist, in the point group data approximated to the original curve shape, the adjacent data . . . , Pi−1, Pi, Pi+1, . . . located together on the line segment having an approximate polygonal shape generated when the point group data are obtained, thereby sequentially sectioning the input point group data, and then the point group data close to the section boundary are sorted as valid point group data, and the point group data inside the valid point group data are sorted as invalid point group data.
For example, in the example shown in
Next, in the step S21 of selecting point group data to be a correction curve, only the valid point group data sorted in the approximate polygon shape range determining step S11 are regarded, and the regarded valid point group data and a specified number of pieces of valid point group data before and after the regarded data are sequentially selected as point group data to be a correction curve.
For example, in the example shown in
In the correction curve generating step S22, from the point group data to be a correction curve selected in the step S21 of selecting point group data to be a correction curve, a smooth correction curve Cr passing through or close to the point group data to be a correction curve is sequentially generated.
In the point group data correcting step S23, the valid point group data sorted in the approximate polygon shape range determining step S11 and each piece of invalid point group data surrounded by the valid point group data is moved toward the correction curve Cr generated in the correction curve generating step S22, and the respective corrected point group data are generated.
For example, in the section in the approximate polygon shape range from Pi−3 to Pi shown in
Then, in the approximate curve generating step S12, only the corrected point group data generated in the point group data correcting step S23 are regarded, and an approximate curve passing through or close to the corrected point group data is generated in a manner similar to the conventional art.
Finally, a determination is made as to whether or not the section determination is completely performed on all input point group data. If data remain to be section-determined, processing is returned to the approximate polygon shape range determining step S11, and the determination is repeated again. If all input point group data are completely section-determined, the series of processes terminates (S13).
As described above with reference to
First, in the approximate polygon shape range determining step S11, the first two pieces of point group data Pi and Pk (k=i+1) in the adjacent approximate point group data Pi, Pi+1, . . . , Pi+n are regarded in sequential order (step S111).
A determination is made as to whether or not there remain any approximate point group data that have not yet been section-determined (step S112). If there are no such approximate point group data, then the range Pi, . . . , Pk being regarded is set as one section, and the point group data around the section boundary are sorted as valid point group data, and the point group data inside the valid point group data are sequentially sorted as invalid point group data, thereby terminating the process (step S113).
If there still remain approximate point group data not yet having been section-determined, then the range of the approximate point group data being regarded is expanded, and the approximate point group data Pi and Pk (k=k+1) are regarded (step S114).
Then, a determination is made as to whether or not all surrounded approximate point group data Pi+1, . . . , Pk−1 are located within a specified allowance from the line segment Li: Pi to Pk connecting the two pieces of regarded approximate point group data (step S115). If all surrounded approximate point group data Pi+1, . . . , Pk−1 are located within the allowance ε, then control is returned to step S112 to expand the range of the regarded approximate point group data.
On the other hand, if any of the surrounded approximate point group data are not located within the allowance ε, then the range Pi to Pk−1 of the approximate point group data previously regarded is set as a section as existing on one approximate polygonal shape, and the point group data close to the section boundary are sequentially sorted as valid point group data and the point group data inside the valid point group data are sorted as invalid point group data (step S116).
When one section is determined, the next approximate piece of point group data Pi (i=k−1) and Pk are defined as candidates for the next section ranges (step S117). Then, control is returned to step S112, and all remaining approximate point group data are similarly processed.
As described above with reference to
Described below is an example of a processing method of sorting the sectioned approximate point group data string Pi, Pi+1, . . . , Pi+n (n≧1) into invalid point group data Pii and valid point group data Pei.
As shown in
As described above with reference to
In the point group data correcting step S23 in the flowchart shown in
As shown in
As described above with reference to
In addition, in the point group data correcting step S23 in the flowchart shown in
As shown in
As described above with reference to
In the approximate curve generation method according to the above-mentioned embodiments of the present invention, an approximate curve and a correction curve are generated from only the point group data Pi or corrected point group data sufficiently close to the ideal offset shape Ko, and thereby an approximate curve closer to the curvature and the smoothness of the ideal offset shape Ko can be generated. Also, by using the approximate curve generation method according to the above-mentioned embodiments of the present invention, a smooth approximate curve closer to the curve shape on the original ideal offset shape Ko can be generated without increasing a load imposed on an apparatus for the CAD/CAM or the amount of data to accommodate more accurate work.
Although the method described above is to generate an approximate curve as smooth as the original curve from the point group data approximated by minute line segments from an original curve shape, the approximate polygon shape range determining step according to the present invention can be expanded to a process step by dividing point group data approximated from an original curved surface shape for each plane of approximate polygon shape generated when the point group data are obtained, and sorting the point group data around the section boundary as valid point group data and the point group data inside the valid point group data as invalid point group data. The expansion provides an advantage of the present invention by generating a smooth approximate curve as the original sectional curve from the point group data indicating a curved surface shape approximated by minute line segments.
Number | Date | Country | Kind |
---|---|---|---|
2006-212753 | Aug 2006 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
3806713 | Ryberg | Apr 1974 | A |
4423481 | Reid-Green et al. | Dec 1983 | A |
5115479 | Murayama | May 1992 | A |
5140236 | Kawamura et al. | Aug 1992 | A |
5410645 | Ooka et al. | Apr 1995 | A |
5726896 | Jia et al. | Mar 1998 | A |
5936864 | Otsuki et al. | Aug 1999 | A |
5966469 | Moon et al. | Oct 1999 | A |
6167325 | Kamiguchi et al. | Dec 2000 | A |
6401004 | Yamazaki et al. | Jun 2002 | B1 |
6675061 | Hirai et al. | Jan 2004 | B2 |
6728595 | Hamamura et al. | Apr 2004 | B2 |
6823234 | Otsuki et al. | Nov 2004 | B2 |
20070085850 | Hong et al. | Apr 2007 | A1 |
20070091094 | Hong et al. | Apr 2007 | A1 |
Number | Date | Country |
---|---|---|
2113305 | Apr 1990 | JP |
10240328 | Sep 1998 | JP |
2003337607 | Nov 2003 | JP |
2004078516 | Mar 2004 | JP |
Number | Date | Country | |
---|---|---|---|
20080033699 A1 | Feb 2008 | US |