## 4 Experiment and Discussion  
The proposed method is tested using three T-spline surfaces as shown in Figures 7-9. The proposed method is developed in the C++ programming language, which consists of watershed-based feature recognition, T-spline local refinement, and an optimized multi-rectangle toolpath generation algorithm. In the case study of the paper, \(b_{r}\) is set to be 0.5 for fewer control points insertion, and the iso-scallop strategy is employed for toolpath generation of each sub-region, chordal tolerance and scallop height are set to be 0.1 mm respectively. Figure 6: Optimized multi-rectangle algorithm, \(tl\) denotes the total length of toolpath, and \(rn\) denotes the reversing number of toolpath. The first test surface demonstrates the basic processing of our proposed method. The surface has one convex feature as shown in Figure 7a, \(2 DCM\) is displayed in Figure 7b with 20 by 20 sampling, in Figure 7c, the convex feature is recognized using watershed technology and colored by yellow points, the PolyBoundingBox is also constructed in Figure 7c, Figure 7d presents the T-spline surface after local refinement, and the convex feature is defined by a set of faces colored in red. For comparison, a toolpath is generated by using the iso-parametric method, multi-rectangle method and our proposed method as shown in Figure 7e-g, and the result is given in Figure 7h. The proposed method can reduce the toolpath by about 21.2% in contrast to the iso-parametric method, and is almost the same in comparison with multi-rectangles method. However, our proposed method has a toolpath with a lower reversing number that can reduce the number of accelerations and decelerations for machining. The second and third test surfaces are much more complicated than the first one. The second one is a non-rectangle surface without holes, and has one convex feature and one concave feature. The third one is a non-rectangle surface with one hole, and has four convex features. In Figures 8 and 9 are presented (a) the original T-spline surface; (b) a two-dimensional curvature map of the surface shaded by root mean square curvature; (c) the watershed result of the surface and PolyBoundingBox construction for convex and concave sub-regions; (d) T-spline surface after local refinement, with the convex sub-region shaded in red, the concave sub-region shaded in green, and other sub-regions shaded in blue; (e) toolpath generation for the surface using the iso-parametric method; (f) toolpath  
Figure 7: Demonstration and comparison of watershed-based toolpath generation of T-spline surface 1.  
generation for the surface using the multi-rectangles method; (g) toolpath generation for the surface using our proposed method; (h) the comparison results of toolpath length and reversing number for three toolpath generation methods. The proposed method can decrease toolpath length significantly relative to the iso-parametric method, and the toolpath length is almost the same in comparison with the multi-rectangle method. However, the toolpath reversing number of our proposed method is less than the multi-rectangle method, which can save machining costs and improve the stability of machine tool. The boundaries of sub-regions can be defined mathematically based on T-spline local refinement, and the continuity near the sub-regions is guaranteed with the help of T-spline properties. Machining time is one of the key metrics for freeform surface finishing. Machining simulation is carried out to demonstrate the advantage of our proposed method. NX manufacturing is a powerful software for machine tool simulation, and we have carried out the cutting simulation and listed the machining time in Table 1. The virtual machine is SIM01 Mill 3 ax Fanuc (millimeter), the feed speed is 1000 mm/min, the acceleration and deceleration of the cutting tool is controlled by the NCK (Numerical Control Kernel) of Siemens. Figure 8: Demonstration and comparison of watershed-based toolpath generation of T-spline surface 2.