## 2 Segment NURBS into Bezier Curves Based on Closed-Loop Chord Error Constraint  
### Definition of NURBS Curve and Knot Insertion  
This paper uses cubic NURBS curves to describe the planar machining path. The rational basis function representation of the NURBS curve equation is expressed as follows [3]:  
\[\left\{ \begin{array}{l}C(u)=\sum\limits_{i=0}^{n}P_{i}R_{i,k}(u)\\ R_{i,k}(u)=\frac{\omega_{i}N_{i,k}(u)}{\sum\limits_{j=0}^{n}\omega_{i}N_{i,k}( u)}\end{array} \right. \tag{1}\]  
In the equation, the \(k\)-th rational basis function is denoted as \(R_{i,k}(u)\) and has properties similar to those of the \(k\)-th normalized B-spline basis function \(N_{i,k}(u)\), such as normality, local support, and differentiability. \(\omega_{i}\) is the weight factor, and the control points are represented by \(P_{i}\). Connecting them in order with line segments forms the control polygon. \[\left\{\begin{array}{l}N_{i,0}(u)=\left\{ \begin{array}{cc}1,&u_{i}\leq u \leq u_{i+1}\\ 0,&\text{otherwise}\\ N_{i,k}(u)=\frac{u-u_{i}}{u_{i+k}-u_{i}}N_{i,k-1}(u)+\frac{u_{i+k+1}-u}{u_{i+ k+1}-u_{i+1}}N_{i+1,k-1}(u)\\ i=0,1,\ldots,n\end{array} \right. \tag{2}\]  
The nonuniform knots vector \(U\) is given as follows:  
\[U=\left[ \begin{array}{c}0,0,\ldots 0,u_{k+1},\ldots,u_{n-k-1},\underbrace{1,1, \ldots,1}_{k+1}\end{array} \right] \tag{3}\]  
Although the cubic NURBS curves described above can solve the issue of smoothness in the path, the currently adopted curvature-based speed limiting technology belongs to open-loop bow chord error control, which cannot guarantee real-time compliance with chord error requirements throughout the entire machining process. To address this issue, this paper proposes a closed-loop chord error control technology for planar NURBS curves to improve machining quality. Firstly, the knot insertion technique is used to segment the original NURBS curves based on curvature, dividing the curves into multiple segments of cubic rational Bezier curves. Then, the parameter points where the curvature is zero are solved for each curve segment, and a projection algorithm is used to project the curves onto the coordinate axes. The precise chord error is obtained by differentiating the analytic cubic rational Bezier formula and obtaining the extreme points. In order to obtain an analytical set of segmented Bezier curves, it is necessary to introduce the technique of knot insertion, which is a crucial technique in the fundamental geometric properties of spline curves. When new knots are inserted into the knot vector interval of the original spline curve, the equality relationship between the number of control points and knot s results in an increase in the corresponding number of new control points. Therefore, the node insertion technique achieves the following. Modification of Local Properties: By inserting nodes, the local properties of the original spline can be altered, allowing for the control of local shapes and enhancing local characteristics. This, in turn, increases the flexibility of the spline; and Generation of Local Beziers: When inserted knots generate new control points according to a certain rule, the original spline can be constructed into new local Beziers without altering the shape of the original spline. Thisproperty is advantageous for locally segmenting the spline into Bezier segments, making the control of segmented Bezier curves simpler, more convenient, and more efficient. Therefore, the introduction of node insertion technology not only enhances the local characteristics of the original spline but also facilitates the segmentation and control of the spline, leading to improved efficiency. This paper leverages the characteristics of node insertion to generate additional control points. When new knots are inserted into the node vector interval of the original spline curve, the equation relationship between the number of control points and the number of nodes leads to an increase in the corresponding number of new control points.