Abstract
A novel approach is proposed for converting NC files of G01/G02/G03 codes into NURBS curves. The NC points are first acquired from an NC file composed of lines and arcs. A segmentation algorithm based on the angles and lengths evaluated from adjacent points is then used to subdivide the entire group of points into segments. An error-bounded constrained curve fitting algorithm is implemented to fit each segment of points into a curve, maintaining the accuracy, smoothness and boundary continuity between the curves. The chord errors between the NC points and the fitted curves are controlled, which ensures the accurate recovery of NC paths. Also, a knot insertion algorithm is proposed to determine the appropriate number of control points automatically, allowing effective fitting of all segments. Several examples are presented to demonstrate the feasibility of the proposed approach.
Similar content being viewed by others
References
Piegl L, Tiller W (1997) The NURBS Book. Springer
Hoschek J (1988) Spline approximation of offset curves. Comput Aided Geom Des 5:33–40
Rogers DF, Fog NG (1988) Constrained B-spline curve and surface fitting. CAD 21(10):641–648
Sarkar B, Menq CH (1991) Parameter optimization in approximating curves and surfaces to measurement data. Comput Aided Geom Des 8:267–290
Wang W, Pottmann H, Liu Y (2004) Fitting B-spline curves to point clouds by squared distance minimization. HKU CS Tech Report TR-2004-11
Ma W, Kruth JP (1995) Parameterization of randomly measured points for least squares fitting of B-spline curves and surfaces. CAD 27(9):663–675
Szobonya L, Renner G (2002) Construction of curves and surfaces based on point clouds. Proc. First Hungarian Conference on Computer Graphics and Geometry, Budapest 57–62
Yang H, Wang W, Sun J (2004) Control point adjustment for B-spline curve approximation. CAD 36:639–652
Park H, Kim K, Lee SC (2000) A method for approximate NURBS compatibility based on multiple curve refitting. CAD 32:237–252
Alhanaty M, Bercovier M (2001) Curve and surface fitting and design by optimal control methods. CAD 33:167–182
Benko P, Kos G, Varady T, Andor L, Martin R (2002) Constrained fitting in reverse engineering. Comput Aided Geom Des 19:173–205
Ueng WD, Lai JY, Tsai YC (2007) Unconstrained and constrained curve fitting for reverse engineering. Int J Adv Manuf Technol, on-line first
Leon SJ (1994) Linear Algebra with Applications, Fourth Edition. Prentice Hall, New York
Press WH, Flannery BP, Teukolsky SA, Vetterling WT (1992) Numerical Recipes in C: The Art of Scientific Computing. Cambridge, New York
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Lin, KY., Ueng, WD. & Lai, JY. CNC codes conversion from linear and circular paths to NURBS curves. Int J Adv Manuf Technol 39, 760–773 (2008). https://doi.org/10.1007/s00170-007-1271-x
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00170-007-1271-x