## 2 Related Work  
### T-Spline and MSR  
T-spline is the latest geometric modeling technology for freeform surface that can address the important limitations of NURBS. T-spline is a superset of NURBS, so the advantages and algorithm based on NURBS can be extended to T-spline naturally. In addition to this, T-spline allows control points to terminate at partial row (or column), hence T-spline can model a complicated freeform surface as a single, gap-free geometry without introducing redundant control points. Beyond that, trimming and merging the NURBS can be represented by a single watertight T-spline surface due to the capability of truly local refinement. As a result of the outstanding characteristics of the T-spline surface, T-spline provides the ability to divide a freeform surface into a set of gap-free sub-regions that can be described using the concept of Manufacturing-Suitable Region (MSR) proposed in our previous research work [7]. MSR is composed of a set of faces that is effective to describe the sub-regions of T-spline surface for manufacturing. MSR has the following significant features:  
* Every MSR specifies a set of sub-regions that is convenient for toolpath generation in the region. * Geometric and manufacturing properties are similar maximally inside each MSR, and minimally between each of MSRs. * The continuity between each of MSRs is guaranteed by the properties of T-spline. MSR consists of a set of faces that are the basic elements of T-spline surface. T-spline surface is defined based on a control grid called T-mesh, and defined mathematically using the following equation [8]:  
\[S(s,t)=\sum\limits_{i=1}^{n}P_{i}B_{i}(s,t)=\frac{\sum\limits_{i=1}^{n}\left(x_ {i},y_{i},z_{i}\right)B_{i}(s,t)}{\sum\limits_{i=1}^{n}w_{i}B_{i}(s,t)} \tag{1}\]  
where \(P_{i}\) = (\(x_{i}\), \(y_{i}\), \(z_{i}\), \(w_{i}\)) are the control points in homogeneous coordinate system, and \(B_{i}\)(s,\(t\)) are the T-spline blending functions given by the following:  
\[B_{i}(s,t)=N_{i}(s)\cdot N_{i}(t) \tag{2}\]  
\(N_{i}\)(s) and \(N_{i}\)(t) are B-spline basis functions calculated iteratively as follows:  
\[ \begin{array}{c}N_{i,0}(t)=\left\{\begin{array}{c}1,t\in[t_{i},t_{i+1}]\\ 0,otherwise\end{array}\right.\\ N_{i,k}(t)=\frac{t-t_{i}}{t_{i+k}-t_{i}}N_{i,k-1}(t)+\frac{t_{i+k+1}-t}{t_{i+ k+1}-t_{i+1}}N_{i+1,k-1}(t)\end{array}  \tag{3}\]  
In our research, \(k\) is set to 3 in Equation (3) for calculation of the bi-cubic T-spline surface. For each control point \(\mathbf{P}_{i}\) of T-spline surface, its influence domain is constructed by its two knot vectors determined using ray intersection method [9]. An overlap operation can be executed between the influence domain of the control point and every face of T-spline surface. The influence point has contribution for face calculation when the overlap is existent. A set of influence points for each face are initialized after the overlap operation is accomplished for all control points, and T-spline surface can be evaluated face-by-face. Hence, toolpath can be generated for each MSR independently, which is beneficial for region-based toolpath generation. Figure 1a presents knot vectors calculation for control point \(\mathbf{p}_{1}\) in (\(s_{4}\),\(t_{3}\)), five knot vectors are required for cubic T-spline in each parametric direction, and the knot vectors for \(\mathbf{p}_{1}\) are [\(s_{2}\),\(s_{3}\),\(s_{4}\),\(s_{6}\),\(s_{7}\)] and [\(t_{1}\),\(t_{2}\),\(t_{3}\),\(t_{5}\),\(t_{6}\)]. Figure 1b shows the influence domain of control point \(\mathbf{p}_{1}\) that is filled with shaded area, and the faces marked by red label have overlap with the influence domain of \(\mathbf{p}_{1}\). Figure 1c gives the influence points marked by solid circle that have non negative contribution for the shaded face.