Abstract
The calculation method of cutter location (CL) points only considers the geometric errors, but cannot consider the requirements of the corner transition algorithm in CNC, which results in the smoothing algorithm in the CNC not playing a maximum role or even failing. To solve this problem, a calculation method of the CL points considering corner transition speed in CNC is proposed. Firstly, the key geometric parameters of the CL points that affect the corner speed are analyzed. Secondly, according to the analysis results, the objective function is established to connect the CL points calculation in CAM and the corner transition speed in CNC. By solving the objective function, the calculation method of the CL points is developed. Finally, the effectiveness of this method is verified by experiment. Comparing with the commonly used iso-chord height method, the proposed method can increase the speed at the corner of the CL points and reduce the acceleration and jerk at the same time. By the proposed method, the tracking accuracy, trajectory accuracy, and machining efficiency can be significantly improved. The proposed method can be integrated into CAM software to generate high quality CL points.
Introduction
There are many factors that affect the machining efficiency and quality of sculptured surface parts. These factors exist in all aspects of the data flow of the machining process, 1 including the tool paths and the CL points generated by CAM, 2 the setpoints interpolated by the CNC system, the dynamic errors caused by servo control, the static/quasi-static errors of mechanical structures, the deformation and chatter during cutting, etc. Among all these factors, the CL points generated by CAM are located upstream of the data flow. Therefore, generating high-quality CL points is the first step to achieving high machining accuracy and efficiency. 3
The CL points are generated through preprocessing in CAM. First, the machined surface is discretized into the tool paths. Then, the CL points are generated by discretizing the tool paths. Classical tool path generation methods include iso-parametric, iso-planar, and iso-scallop methods etc. The iso-parametric method4–9 is aimed at parametric surfaces. This method keeps one parameter of the surface constant, while the other parameter changes incrementally at regular intervals. The iso-planar method10–13 uses the intersection line obtained by the equidistant section plane and the machined surface section as the tool path. The distance between the planes is mainly determined by the scallop height requirements. The iso-scallop method14–17 sets an initial tool path on the surface. The adjacent tool path is calculated by keeping the scallop height between adjacent tool paths as a constant value. It can be seen from above research that the tool paths generated by these methods were all constrained by the scallop height to ensure the geometric accuracy of the part surface.
Under the scallop height constraint, the machining efficiency can be improved by optimizing the tool path direction. Marciniak 18 and Kruth and Klewais 19 studied the relationship between the tool path direction and machining efficiency, which was substantially improved by changing the toolpath. Kim and Sarma 20 proposed a time optimal tool path generation method. Chiou and Lee 21 proposed a machine potential field approach to generate five-axis machining tool paths. Giri et al. 22 find that when the initial tool path is along the direction of maximum curvature, the machining time is significantly reduced.
Besides improving machining efficiency, considering the tool path direction can bring more benefits. Yao et al. 3 proposed a tool path regeneration method, and the results showed that the average error of their generation method was significantly reduced. Meng Lim and Menq 23 proposed a cutting-path-adaptive-feed rate tool path generation method with the constraints of surface geometric accuracy and tool deformation, which can simultaneously improve productivity and product quality for sculpted surface production. Lu et al. 24 developed a method of tool path generation for the twin-tools milling process of gas turbine blades. By the method, the deformation of a blade caused by cutting force is obviously reduced compared with a conventional machining process with a single tool. The direction of the tool path affects the feed rate of each axis, which is the main parameter that affects the tracking error and contour error. Considering the influence of the tool path direction on the tracking error and the contour error, Lu et al. 25 established a contour error-oriented tool path generation method. The results showed that the contour error of the generated toolpath under the optimal cutting direction was much smaller than the contour error in other cases.
To sum up, as the upstream of the data flow, the tool path generated by CAM no longer only considers geometric accuracy, but increasingly considers the downstream of the data flow such as cutting process and machine tool performance.
After the tool paths are determined, the CL points are generated by discretizing the tool path according to the geometric errors such as chord height error. By discretizing, the tool path are widely represented as the form of continuous short line segments. 26 This form of the tool path is only C0 continuous which causes the sudden change of speed and mechanical vibration and prolongs the machining time. In order to solve these problems, the continuous short line segments tool paths are usually smoothed by the CNC systems.
The common tool path smoothing algorithms include global smoothing and local smoothing. 26 The global smoothing algorithm uses quartic Bezier curve,27,28 quintic B-spline curve, 29 Akima curve 30 etc. to fit all CL points. However, global smoothing has a large number of fitting points, resulting in a large amount of calculation. Instead, local smoothing is more widely used in practice, because it works on the corner of two adjacent line segments. Bi et al. 31 used cubic Bezier curves to smooth the corners of adjacent line segments, and the method was effective in increasing the feed rate and producing smoother velocity and acceleration profiles. Shi et al. 32 used the PH curve to smooth the rounded corners and solved the problem of discontinuous tangent and curvature at the corners. Tulsyan and Altintas 33 inserted a quintic spline at the junction of two line segments to achieve C3 continuity. Huang et al. 34 proposed a real-time G2 continuous local smoothing method by replacing the corners of the CL points and tool orientation paths with cubic B-splines. Lin et al. 35 proposed a local corner smoothing method considering kinematics and real-time constraints while considering axial jerks during corner smoothing and the tangential pull of the tool blade to ensure the surface quality of the part.
However, because the generation method of CL points only considers geometric errors such as chord height error, this method is still in a state of separation from the downstream data flow at present. Furthermore, in the current state of separation of CAM and CNC, the generation of CL points in CAM does not consider the requirements of the downstream CNC smoothing processing, which results in smooth processing in CNC not playing a maximum role or even failing.
The smoothing of CL points is completely done in CNC by the corner transition algorithm. In CNC, the transition algorithms increase the corner speed according to the inserted transition curve and the geometric parameters of adjacent line segments. So, the smoothing effect is not only related to the fitted curve, but also the geometric parameters of the CL points. It is supposed that the machining efficiency and the machining quality should be further improved as long as the requirements of the CNC corner transition on the geometric parameters of the CL points are integrated into the CAM.
Consequently, the purpose of this study is to establish the calculation method of CL points considering the CNC corner transition algorithm. Firstly, the key geometric parameters of CL points that affect the corner speed are analyzed; secondly, a CL points calculation method considering corner transition speed is established; finally, the effectiveness of this method is experimentally verified. Meanwhile, this method is compared with the commonly used iso-chord height CL points generation method. This study contributes to eliminating the separation state between CAM CL points generation and CNC local smoothing. By establishing the connection between the CAM and CNC, it is expected to further improve the machining efficiency and machining quality.
Key geometric parameters of CL points affecting corner speed
In the CNC local smoothing process, the adjacent short line segments are processed by using corner transition algorithms such as the direct transition, the straight line segment transition, the arc transition and the spline curve transition. After local smoothing, it is expected that the corner speed at the corner of adjacent short line segments will increase, so as to avoid the violent fluctuation of speed and improve the machining efficiency. Considering that the corner speed is not only related to the transition algorithm but also related to the geometric parameters of the CL points, this section analyzes the key geometric parameters of CL points that affect the corner speed to provide a foundation for the calculation method of the CL points in Section 3.
(1)Direct transition. As shown in Figure 1, the direct transition is that the tool tip turns when it reaches the corner point. The maximum speed at the corner is equation (1).

Direct transition.
where
In equation (1), the maximum allowable corner acceleration and the interpolation period are fixed values. So, when the corner α decreases, the maximum speed at the corner increases.
(2)Straight line segment transition. As shown in Figure 2, the straight line segment transition is performed by connecting two transition points on two adjacent line segments by a straight line. This method needs to meet the maximum allowable trajectory error

Straight line segment transition.
where
At the same time, in order to ensure that the next line segment has enough transfer length, the length of line segments
The corner speed must satisfy equation (4):
In order to meet the maximum corner acceleration limit of the machine tool, it is necessary to meet equation (5):
According to equations (4) and (5), equation (6) can be obtained:
According to equation (6), when the CA α decreases, the speed value at the corner increase; at the same time, according to equation (3), when the Length of the Line Segment (LLS) increases, the LLS
(3)Arc transition. The arc transition is the most common transition method. As shown in Figure 3, the maximum allowable trajectory error

Arc transition.
where R is the arc radius.
At the same time, the line segments
If the short line segment is not long enough, the arc radius R is as equation (9).
Then equation (10) can be obtained when the maximum corner acceleration of the machine tool is met.
When the chord height does not exceed the maximum limit value, equation (11) can be obtained.
Since it is necessary to ensure that there are at least two interpolation points on the arc, equation (12) is obtained:
Thus, the corner speed takes the minimum value of equations (10)–(12), as in equation (13):
From equation (13), when the CA α decreases, R increases, so the speed at the corner increases; when the LLS increases, R increases, and consequently, the speed at the corner increases.
(4)Spline transition. The spline transition is a more advanced transition method in CNC system. The calculation spline transition is more complicated, including Ferguson spline, Bezier spline, NURBS spline, and PH spline. This method is similar to the arc transition, which is related to the maximum curvature of the transition curve. Its curvature and corner speed are calculated as equations (14) and (15).
where
It can be seen from equations (14) and (15) that when the CA α decreases,
To sum up, no matter which corner transition method is used, a relatively small CA and a relatively large LLS help to increase the speed at the corner. Based on the above analysis, the objective function to recalculate the CL point is constructed in Section 3 based on the LLS and CA to improve the speed at the corner.
Construction of objective function and calculation method of CL points
According to the analysis results in Section 2, increasing the LLS of the tool path as much as possible and reducing the CA of the adjacent short line segment can increase the speed at the corner. However, since the LLS and the CA are related to each other, when the LLS increases, the CA will increase; conversely, when the LLS decreases, the CA will decrease. Thus, increasing the LLS of the tool path and reducing the CA of the adjacent short line segment are contradictory. This section reconciles the two contradictions to achieve the goal of increasing the LLS and reducing the CA of the adjacent short line segment. On this basis, the calculation method of the CL points will be established.
Construction of objective function
According to the above analysis, the following conditions need to be satisfied for the objective function construction. (1) When CA is as small as possible and LLS is as large as possible, the corner speed can be increased. (2) CA and LLS are in contradiction. Therefore, the equations are constructed to reconcile the two contradictions.
To achieve the reconciliation of the two contradictory goals, the following objective function is proposed as shown in equation (16).
where
The length l of the line segment connecting the adjacent CL points is used as the numerator of the first term on the right side of the equation, and the CA α of the adjacent short line segment is used the denominator of the second term on the right side. When l increases, the left side of the equation increases; as α decreases, the left side of the equation also increases. It can be seen from equation (16) that when
Calculation method of CL points
The CAD/CAM system uses NURBS parametric curves to express the sculptured surface parts. The ISO uses NURBS as the only mathematical method for defining the geometry of industrial products. Similarly, the curve obtained in CAM system from the CAD system is a NURBS curve. Based on this, the calculated curves in the following process are all NURBS curves.
Since the calculation of the CL points needs to meet the constraint of the chord height, the calculation method of the chord height of the NURBS curve is established in this section. This method will be used in the subsequent solution process of the CL points. A k-th degree NURBS curve is defined as equation (17).
where
where di is the control point, ω i is the weight, k is the degree of the NURBS curve, and Ni,k(u) is the k-order B-spline basis function calculated from the knot vector U = [u0, u1,…un + k + 1].
A NURBS curve is uniquely determined by its control points, the corresponding weights, and the knot vector.
Figure 4 shows the chord height of the NURBS curve, which is solved as equation (18).

Chord height of the NURBS curve.
where E is chord height, L is the chord length of AB, θ is
It can be seen from equation (18) that E can be solved by solving L and r. In Figure 4, points A and B are points on the NURBS curve, so point A is represented as
And the solution of r is as equation (20).
where
Let
The first and second derivatives of the NURBS curve can be obtained according to equations (22) and (23).
The radius of curvature r can be obtained by substituting equations (22) and (23) into equation (20).
Then the solution procedure of the CL points is as follows:
(1)Determination of the chord height E and the first CL point. The chord height E depends on the machining accuracy. As shown in Figure 5, the starting point of the curve is taken as the first CL point.
(2)Solution of the second CL point. As shown in Figure 5(a), the solution of the second CL point needs to consider the constraint of the chord height E. The solution method of the second point is as follows:

Solution of CL points: (a) Solution of the secondCL point; (b) Solution of the remaining CL points.
According to equation (17), the second CL point can be obtained by solving the knot vector of the second point. Assuming that the knot vector of the first point Us = 0 and the knot vector of the second point Ue = 1, bringing Ue = 1 into equation (17), the chord height e at this time can be solved according to equation (18). If the chord height e is less than or equal to E, Ue will be output; if e is greater than E, Ue = (Us + Ue)/2, the previous process will be repeated until e is less than or equal to E. Then bringing the obtained knot vector into equation (17), the corresponding second CL point can be got.
(3)The solution of the remaining CL points. Taking the solution of the third point as an example, from this point, the solution of the CL points must not only meet the constraint of the chord height E, but also ensure that the LLS is as long as possible and the CA is as small as possible. Figure 5 shows the schematic diagram of the solution from the third CL point to the last one.
Firstly, the feasible region of the third CL point is determined as the green region in Figure 5(b). The range of this feasible region is equation (24):
where
It can be seen from the above procedure that the third CL point is a certain point on the curve in the green region in Figure 5(b). By the above objective equation (16), the optimal position of this point in the feasible region will be solved. Each CL point in the feasible region corresponds to a group of l and α. Through bringing each group of l and α into equation (16) respectively, the value of
In the same way, the calculation method of the remaining CL points is the same as this point. Until the end point of the curve is reached, the solution of the CL points is completed. The flow chart of the CL point calculation is shown in Figure 6.

Flow chart of CL points calculation.
Generation of finishing CL points of lower baseline of S-shaped edge strip
The S-shaped piece (ISO10791-7) is a standard piece used to test high-end CNC machine tools. The lower baseline is a flat curve, usually machined by both XY axes, with a distinct curvature variation characteristic. Its S-shaped edge strip has the characteristics of variable curvature. In engineering practice, the G-code of S specimen is in the form of continuous small linear segments, and the interpolation process requires a large number of transitions for the linear segments. Therefore, the lower baseline of the S-shaped edge strip was selected as the experimental verification object.
According to the ISO standard, the lower baseline curve of the S-shaped edge strip was established using the NURBS curve. Based on the NURBS curve, the CL points are generated by both the traditional iso-chord height method and the proposed method for comparison. In the following sections, the CL points generated by the traditional iso-chord height method and the proposed method are called CL points 1 and CL points 2, respectively. The maximum chord height of both CL points 1 and CL points 2 was limited to 0.01 mm. The CL points 1 and the CL points 2 are shown in Figure 7. It shows that the CL points generated by both methods do not deviate from the trajectory, but present obvious differences at some positions.

CL points generated by the two method.
The LLS and CA of the CL points generated by the two methods are shown in Figure 8(a) and (b). Among them, the LLS of CL points 2 is smaller than that of CL points 1 where the trajectory curvature is large, and the overall corner of CL points 2 is smaller than that of CL points 1. The results show that the LLS and CA of the CL points generated by the proposed method have changed compared with the iso-chord height method. This is the result after considering the CNC corner transition speed.

Comparison of the LLS and CA: (a) Comparison of the LLS ; (b) Comparison of the CA.
Experimental testing of S-shaped edge strip motion parameters
The KMC400 U five-axis vertical milling machining center equipped with the GNC62 CNC system was employed for experimental verification. According to the GNC62 CNC system format, the CL points data were converted into the NC codes.
The two NC code files were entered into the GNC62 CNC system, using the G40 code to turn off the tool compensation function, with the S-curve Acceleration and Deceleration control on CNC system. By running the machine tool, the interpolation setpoints and linear encoder data can be collected by the command G237 A3 D576 C2 and G238 in NC code. G237 indicates the start of data collection, A3 means that the data of the X and Y axes are collected, D576 indicates that the data to be collected is the Setpoints Position (SP) and Linear Encoder Feedback Position (LEFP), C2 means that the sampling period is 2 ms, and G238 indicates the end of data collection.
The relationship between the X-axis arc length and setpoints speed of CL points 1 and 2 can be obtained by processing the collected interpolation setpoints data, as shown in Figure 9(a). The experimental feed rate was set to 5000 mm/min. It can be seen from the figure that the setpoints speed curve of CL points 2 is smoother than that of CL points 1. In the arc lengths of 140 to 190 mm and 440 to 490 mm, the setpoints speed of CL points 2 increases significantly, and the curve fluctuation decreases. According to the relationship between cutting force and speed, faster speed will inevitably cause an increase in cutting force.

Comparison of setpoints speed, acceleration, jerk, and tracking error: (a) Comparison of setpoints speed;(b) Comparison of setpoints acceleration; (c) Comparison of setpoints jerk; (d) Comparison of setpoints tracking error.
Figure 9(b) shows the comparison of the X-axis setpoints acceleration of CL points 1 and CL points 2. It can be seen from this figure that the acceleration of CL points 2 decreases in the area where the speed increases. Likewise, Figure 9(c) shows the setpoints jerk of CL points 1 and CL points 2. It can be seen from this figure that the jerk is also reduced in the same area. Acceleration and acceleration become smaller, and the vibration generated by the machine will be reduced accordingly.
The tracking error can be obtained through the collected LEFP data and SP data. Figure 9(d) shows the comparison of the tracking errors of the X-axis of CL points 1 and CL points 2. It can be seen from the figure that the method proposed can significantly reduce the tracking error overall. In the blue box of the figure, the tracking error of CL points 2 can be reduced by 4–12 μm compared to CL points 1.
Figure 10 compares the trajectory at SP and LEFP. The tracking errors of the X and Y axis are magnified by a factor of 500 for better observation of the difference between the trajectories. It can be found that the deviation between the trajectory at SP and the trajectory at LEFP of CL points 2 is significantly smaller than that of CL points 1. In addition, the trajectory at LEFP of CL points 2 is smoother compared with that of CL points 1. It means that the method proposed can facilitate the reduction the trajectory deviation and suppression of the vibration during machining.

Comparison of trajectory at SP and the trajectory at LEFP. (a) CL points 1 and (b) CL points 1.
The frequency domain information of the data collected by linear encoder can be obtained through the FFT. Figure 11 shows the frequency spectrum of LEFP during the processing of CL points 1 and CL points 2. It can be seen from the figure that the vibration is obviously weakened when the CL points are generated by the proposed method, which helps to improve the machining accuracy.

Frequency spectrum of LEFP.
Moreover, the machining time of CL points 1 and CL points 2 are calculated for comparison of the machining efficiency. The machining time of CL points 1 is 8.748 s, while that of CL points 2 is 8.162 s. The machining time of CL points 2 is 7.18% less than that of CL points 1.
Conclusions
For the CL points used for continuous small linear interpolation methods, the Calculation Method of Cutter Location Points Considering Corner Transition Speed in CNC is proposed, and the conclusions are as follows:
A calculation method of CL points considering the transition speed of the corner transition algorithm in CNC is proposed. This method can generate more optimal CL points.
The proposed CL points calculation method can increase the setpoints speed at the corner, while reducing the setpoints acceleration and jerk. Furthermore, by the proposed method, the tracking accuracy, trajectory accuracy, and machining efficiency can be significantly improved. Taking the S-shaped trajectory as an example, the CL points generated by the proposed method make the tracking error reduce by 4–12 μm, and make the machining efficiency improve by 7.18%.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work is financially supported by the project of National Natural Science Funds of China (Grant No. 52175483).
