Algorithms for Space Mapping Method on Spline Spaces over Modiﬁed Hierarchical T-Meshes

: The space-mapping method provides a novel method for dimension formulae explanation and basis construction for the spline space over hierarchical T-meshes. By the space-mapping method, we provide a unique basis construction framework that incorporates basis modiﬁcation of the spline space over modiﬁed hierarchical T-meshes. The subdivision rules on the modiﬁed hierarchical T-meshes are given to prevent the redundant edges that exist on hierarchical T-meshes. In the basis construction framework, we describe the spline-modiﬁcation mechanism over the modiﬁed hierarchical T-mesh when the cells of the corresponding crossing vertex relationship graph (CVR graph) are adjusted. We provide the framework’s algorithms for basis construction and modiﬁcation. Moreover, we discuss the application of the splines that are constructed by the framework to surface reconstruction with adaptive reﬁnement. In comparison to splines over hierarchical T-meshes, the modiﬁed hierarchical T-meshes have fewer cells subdivided when achieving similar accuracy.


Introduction
Multivariate splines over tensor-product spaces are one of the most popular tools for the representation of free-form surfaces in computer-aided design (CAD) [1]. More recently, these splines have also been applied for the discretization of partial differential equations in isogeometric analysis (IGA) [2], which uses the same class of functions to describe an object's geometry and to represent the fields describing physical phenomena to bridge the gap between CAD and computer-aided engineering (CAE). However, the disadvantage of using tensor product splines is that when a knot is inserted, the resulting knot line crosses the whole domain, thus eliminating the possibility of performing local refinement. Because refining the entire mesh leads to a large number of superfluous control points or coefficients, locally refinable multivariate splines have become a popular research topic for design and analysis. In recent years, several locally refinable splines have been widely used in practical problems, such as T-splines, hierarchical B-splines (HB-splines) and truncated hierarchical B-splines (THB-splines), Locally refined B-splines (LR-splines) and polynomial splines over hierarchical T-meshes (PHT-splines) are attractive. We will give a literature review of these splines as follows.
T-splines have overcome the difficulty of local refinement by producing surfaces from control meshes that allow T-junctions [3,4]. T-splines' potential in IGA has been reported in [5,6]. To ensure linear independence, which is a crucial need for using Tsplines in analysis, additional constraints are proposed in [7,8]. Late developments have led to the development of a novel type of spline known as analysis-suitable++ T-splines (AS++ T-splines), which incorporate analysis-suitable T-splines (AS T-splines) as a special instance [9].
HB-splines offer a traditional method for obtaining local refinement in geometric modeling [10]. It has been stated that HB-splines can be applied in geometric modeling and isogeometric analysis [11][12][13][14]. As a modification of HB-splines, THB-splines have been proposed for defining locally supported basis functions that hold the partition of unity property [15,16]. THB-splines have been an excellent choice for use in a variety of applications, including isogeometric analysis, computer-aided design, and geometric modeling [16][17][18][19].
Locally refined splines (LR splines) can span the complete piecewise polynomial space on the LR mesh and form a nonnegative partition of unity [20]. The LR mesh breaks the tensor-product mesh structure. LR splines in 2D can be constructed in a hierarchical manner [21], and additional properties of LR splines have been discussed in more detail in [22].
PHT splines, which are the bicubic splines over hierarchical T-meshes with C 1 continuity, produce nested spline spaces by using a modification mechanism [23]. Works on PHT splines discuss the splines from the perspective of spline spaces, provide the dimension formula [23] and offer the basis construction framework of PHT-splines [24]. Therefore, PHT splines ensure properties such as nonnegativity, partition of unity, linear independence, and completeness. With regard to these excellent properties, PHT splines have been effective in a variety of applications, including the reconstruction of surface models [24][25][26], the adaptive finite element method for solving elliptic equations [27], and the isogeometric analysis of elastic problem solving [28][29][30]. Additionally, the PHT splines have been modified as modified PHT splines (MPHT-splines) [30,31]. The construction of PHT splines is made easier by a succinct topological interpretation of the dimensional formula. To do this, [32] introduces the proper crossing vertex relationship graph (CVR graph) and provides a concise topological explanation for the dimension formula of PHT splines. By the CVR graph, the biquadratic and bicubic polynomial basis functions of splines over hierarchical T-meshes have been constructed in [33,34], respectively, and they performed well in the application for geometric modeling and IGA. Unfortunately, the level difference for the hierarchical T-meshes in [33,34] cannot be greater than one. To overcome this restriction, a novel bijective mapping between the biquadratic polynomial spline spaces over the hierarchical T-mesh and the piecewise constant space over the corresponding CVR graph has been proposed in [35]. The bijective mapping offers a succinct topological explanation for the dimension formula of the biquadratic polynomial spline spaces over hierarchical T-meshes and provides a new manner for the basis construction of the biquadratic polynomial spline spaces over hierarchical T-meshes. The basis functions, which are constructed by the space mapping method, are linearly independent, form a partition of unity, and are suitable for CAD [35].
In PHT spline theory, one of the most significant operations is known as the local refinement of PHT spline. Splines that are defined on hierarchical T-meshes allow for the possibility of local refinement. This is because hierarchical T-meshes have a naturally level structure. However, for biquadratic polynomial spline spaces over hierarchical T-meshes, there are numerous redundant edges on the hierarchical T-meshes. In this paper, we give some subdivision rules on the modified hierarchical T-meshes, which are split in half in the mesh-refining process. This is done to prevent the redundant edges that exist on hierarchical T-meshes. In [35], we have used the space mapping method to give the basis construction of the biquadratic polynomial spline space over hierarchical T-meshes. However, for each level space over the hierarchical T-mesh, all of the basis functions need to be reconstructed when their partially supported cells are subdivided. This takes a significant amount of time. In this paper, we provide a unique basis construction framework that incorporates basis modification of the biquadratic polynomial spline space over modified hierarchical T-meshes. This framework is developed by utilizing the work that we have done in [35].
We organize the remainder of the paper as follows. In Section 2, we review some essential conceptions related to hierarchical T-meshes, modified hierarchical T-meshes and spline spaces. In Section 3, we describe the space-mapping method for spline spaces over modified hierarchical T-meshes. For the spline spaces over the modified hierarchical T-meshes, we give the basis construction framework that allows modification in Section 4, and the corresponding algorithms are also provided. We give the numerical examples to fit several open surface models in Section 5. In Section 6, our paper closes with some concluding remarks.

Preliminaries
In this section, we will recall some preliminary knowledge that is useful for our method, such as notations on T-meshes, modified hierarchical T-meshes, and spline space over T-meshes, and so on.

T-Meshes
For the T-mesh T , the definitions of vertices, edges, and cells are the same as that in [23]. We use Figure 1 to illustrate the corresponding notations as follows.
Mathematics 2022, 1, 0 3 of 26 over modified hierarchical T-meshes. For the spline spaces over the modified hierarchical T-meshes, we give the basis construction framework that allows modification in Section 4, and the corresponding algorithms are also provided. We give the numerical examples to fit several open surface models in Section 5. In Section 6, our paper closes with some concluding remarks.

Preliminaries
In this section, we will recall some preliminary knowledge that is useful for our method, such as notations on T-meshes, modified hierarchical T-meshes, and spline space over T-meshes, and so on.

T-Meshes
For the T-mesh T , the definitions of vertices, edges, and cells are the same as that in [23]. We use Figure 1 to illustrate the corresponding notations as follows. We refer to a grid point in T as a vertex of T . A vertex is referred to as a boundary vertex if it occupies the boundary grid line of T ; otherwise, it is referred to as an interior vertex. For example, the blue square vertices denote boundary vertices, the green square vertices, and the green triangular vertices denote interior vertices. For the interior vertices, if the valence of an interior vertex is four, it is referred to as a crossing vertex; if the valence of an interior vertex is three, it is referred to as a T-junction. For example, the green square vertices denote crossing vertices, and the green triangular vertices denote T-junctions.
We refer to the line segment that connects two adjacent vertices on one grid line as an edge of T . An edge is referred to as a boundary edge if it occupies on the boundary of T ; otherwise, it is referred to as an interior edge. For example, b 0 b 1 denotes a boundary edge, b 1 v 0 denotes an interior edge. We refer to the edge as an l-edge if it is the longest possible line segment and its endpoints are either boundary vertices or T-junctions. For example, b 1 v 0 and b 0 b 2 denote l-edges. We refer to the interior l-edge as a T-l edge [36] if its two endpoints are both T-junctions; for example, the red segment v 2 v 3 denotes a T-l-edge. Additionally, we refer to an edge as a c-edge if it is the longest possible line segment and its inner vertices are all T-junctions; for example, v 1 b 3 denotes a c-edge.
We refer to each rectangular grid element as a cell of T . A cell is referred to as an interior cell if all its edges are interior edges; otherwise, it is referred to as a boundary cell. For example, the gray cell denotes an interior cell, and the yellow cell denotes a boundary cell.

Modified Hierarchical T-Meshes
The modified hierarchical T-meshes can be defined in a recursive manner [31], which is similar to the hierarchical T-meshes in [24]. T k denotes the mesh at level k, F k denotes We refer to a grid point in T as a vertex of T . A vertex is referred to as a boundary vertex if it occupies the boundary grid line of T ; otherwise, it is referred to as an interior vertex. For example, the blue square vertices denote boundary vertices, the green square vertices, and the green triangular vertices denote interior vertices. For the interior vertices, if the valence of an interior vertex is four, it is referred to as a crossing vertex; if the valence of an interior vertex is three, it is referred to as a T-junction. For example, the green square vertices denote crossing vertices, and the green triangular vertices denote T-junctions.
We refer to the line segment that connects two adjacent vertices on one grid line as an edge of T . An edge is referred to as a boundary edge if it occupies on the boundary of T ; otherwise, it is referred to as an interior edge. For example, b 0 b 1 denotes a boundary edge, b 1 v 0 denotes an interior edge. We refer to the edge as an l-edge if it is the longest possible line segment and its endpoints are either boundary vertices or T-junctions. For example, b 1 v 0 and b 0 b 2 denote l-edges. We refer to the interior l-edge as a T-l edge [36] if its two endpoints are both T-junctions; for example, the red segment v 2 v 3 denotes a T-l-edge. Additionally, we refer to an edge as a c-edge if it is the longest possible line segment and its inner vertices are all T-junctions; for example, v 1 b 3 denotes a c-edge.
We refer to each rectangular grid element as a cell of T . A cell is referred to as an interior cell if all its edges are interior edges; otherwise, it is referred to as a boundary cell. For example, the gray cell denotes an interior cell, and the yellow cell denotes a boundary cell.

Modified Hierarchical T-Meshes
The modified hierarchical T-meshes can be defined in a recursive manner [31], which is similar to the hierarchical T-meshes in [24]. T k denotes the mesh at level k, F k denotes the set consist of all the cells at level k, and the set consists of the cells that are chosen to be subdivided, denoted as Θ k , and Θ k ⊂ F k .

1.
Start with a tensor product mesh T 0 .

2.
Recursive steps: Subdivide each cell in Θ k into 2 × 2 equal subcells or two equal subcells to obtain a new T-mesh T k+1 , k = 0, 1, . . . , N. F k+1 denotes the set that consists of all current cells that emerge at level k + 1 after subdivision.

3.
T = T N+1 . Figure 2 illustrates the refinement process of a modified hierarchical T-mesh dynamically.

Spline Spaces over T-Meshes
Given a T-mesh T , all of the cells in T are denoted as F , and the region occupied by the cells in T is denoted as Ω. The spline spaces can be defined as [23] S(m, n, α, β, Here, P mn denotes the polynomial space with bi-degree (m, n), and C α,β denotes the space consisting of all of the bivariate functions. These functions are α order-continuous in the x-direction and β order-continuous in the y-direction on Ω. Obviously, S(m, n, α, β, T ) should be a linear space.
In [32], the spline spaces over T with homogeneous boundary conditions corresponding to S(m, n, α, β, T ) have been defined as As the extended T-mesh [32] will play an important role in our study, we repeat the definition of the extended T-mesh as follows.

Definition 1.
For the T-mesh T associated with S(m, n, α, β, T ), the extended T-mesh can be generated in the following manner.

1.
Add m edges to the horizontal boundaries in an average manner; add n edges to the vertical boundaries in an average manner.

2.
Connect the boundary vertices on T to the outer layer edges.
We denote the extended T-mesh of T associated with S(m, n, α, β, T ) as T ε for convenience. Figure 3 shows a T-mesh T , and its extended T-mesh T ε that associates with S(2, 2, 1, 1, T ). Ref. [32] gives Theorem 1 to illustrate that the spline space S(m, n, α, β, T ) is related to S(m, n, α, β, T ε ) closely.
In this paper, we will discuss the subdivision rules and the basis modification framework of S(m, n, α, β, T ε ) instead of S(m, n, α, β, T ), and then use Theorem 1 to obtain the corresponding results of S(m, n, α, β, T ).

The Space Mapping Method over the Modified Hierarchical T-Meshes
The space mapping method has been proposed in [35], which gives the conclusion that the biquadratic polynomial spline spaces over the hierarchical T-mesh is isomorphic to the piecewise constant space over the corresponding CVR graph. The bijective mapping in [35] has been used to provide a basis construction method for biquadratic polynomial spline spaces over hierarchical T-meshes. In this part, we discuss the space-mapping method over the modified hierarchical T-meshes as follows.

CVR Graph of Modified Hierarchical T-Meshes
Because the CVR graph [32,35] is critical in the space-mapping method, it can be defined in a similar manner to that of modified hierarchical T-meshes as follows.
Definition 2 ([32,35]). Given a modified hierarchical T-mesh T , the CVR graph of T can be constructed in the following manner.

1.
Retain the crossing vertices and the line segments with two endpoints that are crossing vertices.

2.
Remove the other edges and vertices from T .
We denote the CVR graph of T as G for convenience. Figure 4 shows an example of a CVR graph. The hierarchical T-mesh can be generated by adding some T-l edges to a modified hierarchical T-mesh, and a T-l edge on hierarchical T-mesh decays to a point on the corresponding CVR graph. Similar to [35], the notations of modified hierarchical T-meshes and the corresponding CVR graph can be defined in Table 1.  Table 1. Some notations for modified hierarchical T-meshes and the corresponding CVR graphs [35].

Notations Abbreviations Definitions
Modified hierarchical T-meshes: CVR graph of modified hierarchical T-meshes: g-cell -Each cell of the CVR graph. P-g-cell P GC Each g-cell that corresponds to a P-cell in T . T-g-cell T GC Each g-cell that corresponds to a T-connection-domain in T .
For example, in Figure 4a, θ 0 , θ 4 , θ 9 we denote P-cells. The P-g cell φ 0 in Figure 4b corresponds to θ 0 in Figure 4a, the P-g-cell φ 2 in Figure 4b corresponds to θ 4 in Figure 4a, and the P-g-cell φ 4 in Figure 4b corresponds to θ 9 in Figure 4a. θ 1 , θ 2 , θ 3 , θ 5 , θ 6 , θ 7 , and θ 8 in Figure 4a denote T-cells. The T-connection that consists of θ 1 , θ 2 , and θ 3 is denoted as T C 0 , the minimal domain that occupies on T C 0 is the T-connection domain of T C 0 , in Figure 4a. The domain surrounded by the red line is denoted as the T-rectangle domain of T C 0 , which is denoted as T RD 0 . θ 4 denotes the one-neighbor cell of T C 0 , the level of T C 0 is also the level of θ 4 , and the T-g-cell φ 1 in Figure 4b corresponds to the T-connection domain of T C 0 . The T-connection that consists of θ 5 , θ 6 , θ 7 , and θ 8 is denoted as T C 1 , and the minimal domain that occupies T C 1 is the T-connection domain of T C 1 . In Figure 4a, the domain surrounded by the blue square is denoted as the T-rectangle domain of T C 1 . θ 9 denotes the one-neighbor cell of T C 1 , the level of T C 1 is also the level of θ 9 , and the T-g-cell φ 3 in Figure 4b corresponds to the T-connection domain of T C 1 .

The Isomorphic Property
In [36,37], the dimensions of T-l edges are proposed as follows.
In particular, for the S(2, 2, 1, and the trivial l-edges [36,37] can be defined as follows.

Definition 3 ([35]).
If there exists only one crossing vertex on the T-l edge E ∈ T , E is defined as a trivial l-edge associated with S(2, 2, 1, 1, T ).
For the hierarchical T-mesh T , G denotes the CVR graph of T , there exists a bijective mapping between S(2, 2, 1, 1, T ) and S(0, 0, −1, −1, G ), and the two spaces are isomorphic [35]: For a modified hierarchical T-mesh, Θ k denotes the subdivided cells whose levels are k first, for each cell θ ∈ Θ k , there are three different subdivision types that tend to choose [31].

•
If θ is subdivided into two equal, vertically adjacent subcells, the subdivision type of θ is denoted as V. • If θ is subdivided into two equal, horizontally adjacent subcells, the subdivision type of θ is denoted as H. • If θ is subdivided into 2 × 2 equal subcells, the subdivision type of θ is denoted as C.
To avoid the trivial l-edges, we can consider our subdivision rules on a modified hierarchical T-mesh as follows.

Mesh Refinement Rules
Because the subdivision scheme for modified hierarchical T-meshes can avoid the trivial l-edges that appear in hierarchical T-meshes, in this section we give our mesh refinement rules for modified hierarchical T-meshes.
To make use of the subdivision scheme of the modified hierarchical T-meshes, we use Figure 5 to illustrate the mesh refinement rules on a part of modified hierarchical T-mesh T k . In Figure 5a, for θ 0 ∈ Θ k , θ i , i = 1, . . . , 4 are the cells around θ 0 . The refinement rules on θ 0 can be discussed as follows. • If θ 2 ∈ Θ k and the subdivision type of θ 2 is C or V, then the subdivision type of θ 0 is V. Figure 5b shows the refinement example. • If θ i ∈ Θ k and the subdivision type of θ i is C or V, i = 2, 4, then the subdivision type of θ 0 is V.
• If θ 1 ∈ Θ k and θ 2 ∈ Θ k , the subdivision type of θ 1 is C or H, the subdivision type of θ 2 is C or V, and then the subdivision type of θ 0 is C.
If the position of θ i , i = 1, 2, 3, 4 is changed, the refinement rules on θ 0 can be obtained similarly.
As a modified hierarchical T-mesh can be converted to a hierarchical T-mesh by adding corresponding trivial l-edges, we give Lemma 1 to illustrate the effection of trivial l-edges on the CVR graph.

Lemma 1.
Assume that T is a hierarchical T-mesh, G denotes the CVR graph of T , the trivial l-edges of T corresponds to the vertex that is on the hanging edges of G .
Proof of Lemma 1. We use proof by contradiction to prove this lemma. Suppose that E is an arbitrary trivial l-edge in T , E corresponds to the vertex V in G , the edge which V occupies on is denoted as L. We assume that L is not the hanging edge of G , and then v occupies the edge of a g-cell of G . Then, there are at least two crossing vertices on E. As E is a trivial l-edge of T , for the spline space S(2, 2, 1, 1, T ), E only contains one interior crossing vertex, this contradicts the assumption. Thus, L is a hanging edge of G . The lemma is proven.
For each trivial l-edge E ∈ T , as dim W[E] = 0, E is useless for S(2, 2, 1, 1, T ), from Lemma 1, E corresponds to a vertex on the hanging edge of G . We can conclude similarly as in Equation (6) via the relationship between the CVR graph of the hierarchical T-mesh and the CVR graph of its corresponding modified hierarchical T-mesh. Our study continues here, and we can give the proof as follows.
From Theorem 3, we conclude that the trivial l-edges do not contribute anything useful to the mapping; hence, the bijective mapping can be described similar to that of [35] in the following manner.
For convenience, we denote S(2, 2, 1, 1, T ) as S 2 (T ) in the following part of this paper.

The Mapping
Definition 4 ([35]). Given f (x, y) ∈ S 2 (T ), and D : A mapping functional φ can be defined as Here, b 1,1 | D denotes the piecewise constant function with value b 1,1 on D.
Given f (x, y) ∈ S 2 (T ), Sup( f ) denotes the support of f (x, y), we recall the notations and abbreviations in Table 1 as follows: P C denotes a P-cell of Sup( f ), P D denotes the P-domain of P C, P GC denotes the P-g cell that corresponds to P C in G , T C denotes a T-connection of Sup( f ), T RD denotes the T-rectangle domain of T C, and T GC denotes the T-g cell corresponding to T C in G . The mapping between S 2 (T ) and S 0 (G ) can be defined in the following manner.

Definition 5 ([35]
). The mapping between S 2 (T ) and S 0 (G ) can be defined as φ( f (x, y)| P C : P D) → g(x, y)| P GC φ( f (x, y)| T C : T RD) → g(x, y)| T GC , where f (x, y) ∈ S 2 (T ), f (x, y)| P C denotes the representation of f (x, y) on P C, g(x, y) ∈ S 0 (G ), and g(x, y)| P GC denotes the representation of g(x, y) on P GC, and P GC corresponds to P C, f (x, y)| T C denotes the representation of f (x, y) on the one-neighbor cell of T C, and g(x, y)| T GC denotes the representation of g(x, y) on T GC, and T GC corresponds to T C.
To illustrate the mapping, we give an example from S 2 (T ) to S 0 (G ) as follows.
Example 1. We present the mapping example for both P-g cells and T-g cells separately because the CVR graph only contains the two types of cells.
For p(x, y) ∈ S 2 (T ) in Figure 6a, the B-ordinates on the cells belong to the support of p(x, y) is shown in Figure 6b. In Figure 6c, p(x, y) occupies on θ i is denoted as p(x, y) i , i = 0, 1, . . . , 4, respectively. β 0 is a P-cell in T , P D denotes the P-domain of θ 0 . The T-connection T C is constituted of θ 1 , θ 2 , and θ 3 . T RD denotes the T-rectangle domain of T C. As the P-g cell β 0 in Figure 6d corresponds to the P-cell θ 0 in Figure 6c, from Definition 5, we obtain φ(p 0 (x, y) : P D) → 1| β 0 .
As the T-g cell β 1 in Figure 6d corresponds to the T-connection domain of T C in Figure 6c and θ 4 is the one-neighbor cell of T C, from Definition 5, we obtain φ(p 4 (x, y) : T RD) → 0| β 1 .
Similarly, we can obtain the mapping results for the other cells on the support of p(x, y). Figure 6d shows the whole mapping result.

The Inverse Mapping (Basis Function Construction Process)
From Theorem 3, we can construct the basis function by the basis construction process in [35]. T k denotes the modified hierarchical T-mesh at level k, and G k denotes the CVR graph of T k . We describe the construction process of a basis function b k+1 j (x, y) ∈ S 2 (T k+1 ) as follows. The inverse mapping is the process for constructing b k+1 j , the tools for evaluating B-ordinates of each basis function of S 2 (T k+1 ) are T-structures; we recall T-structures in [35] as follows. In Figure 7, the c-edge v 0 v m and the cells θ 0 , . . . , θ n constitute a T-structure, which is denoted as T . v 0 v m denotes the mid-edge of T . v 0 , . . . , v m denote the interior vertices of T . v 0 and v m denote the endpoints of T . θ 0 denotes the mother cell of T . θ 5 , . . . , θ n denote the subcells of T . θ 0 denotes the mother cell of T , and the level of T is also the level of θ 0 . Additionally, T should be a horizontal T-structure.
For the modified hierarchical T-mesh T k+1 , a T-structure, which is denoted as T , consists of one c-edge E c and all the cells that have at least one common vertex with E c . The interior structure of T is shown in Figure 7. If there is one common interior vertex of a horizontal T-structure T h and the other vertical T-structure T v , we call T h and T v connected.
A T-structure branch, which is denoted as T SB, consists of the union that every two T-structures are connected. The level of T SB is the minimal level of all the T-structures in T SB.
From the notations of T-structures and T-structure branches above, several algorithms in [35] are given to evaluate the B-ordinates for the T-cells of the T-connections, we recall the algorithms as follows. Algorithm 1 illustrates the pattern to order the T-structures in a T-structure branch, Algorithm 2 describes the detailed procedures for using T-structures to calculate the Bordinates of a T-connection. By Algorithms 1 and 2, we can give Algorithm 3 to calculate the B-ordinates for a basis function b k+1 (x, y) ∈ S 2 (T k+1 ). This is different from the method of searching the domain that supports a basis function in [35]. We can choose the support of a basis function b k (x, y) ∈ S 2 (T k ) as the domain that is supports b k+1 (x, y) directly.

Algorithm 1:
Ordering the T-structures for each T-structure-Branch of T k+1 [35].
Output: Each θ ∈ Sup(b k+1 (x, y)) with B-ordinates 1 Extract the basis cell θ of b k+1 (x, y); 2 Obtain the basis function b k (x, y) ∈ S 2 (T k ), whose basis cell covers θ; 3 Obtain E := Sup(b k (x, y)); 4 Initialize the weights on each domain center of T k+1 via Equation (12); 5 Extract {T C 0 , . . . , T C n } ∪ {P C 0 , . . . , P C l } that covers E; 6 Extract each T-structure branch T SB i corresponding to T C i , i = 0, . . . , n; 7 Using Algorithm 1 to sort the T-structures in T SB i , i = 0, . . . , n; 8 Descending sort T SB i , i = 0, . . . , n; 9 Using Algorithm 2 to evaluate the B-ordinates of b k+1 (x, y) corresponds to T SB i ; 10 Using C 1 continuous conditions to evaluate the rest B-ordinates on the cells in E; 11 if At least one B-ordinates of θ ∈ E is nonzero then 12 Save the B-ordinates on θ; 13 Sup(b k+1 (x, y)) ← θ; Figure 8 shows the construction process for b k+1 j (x, y) ∈ S(2, 2, 1, 1, T k+1 ). The basis construction process can be summarized as follows.
As the basis cell of each basis function at level k + 1 is a part of the basis cell that belongs to a basis function at level k, the support of b k+1 (x, y) is covered by a basis function b k (x, y) ∈ S 2 (T k ), we adopt the support of b k (x, y) as E. 3. B-ordinates Calculation.
(a) Obtain the T-structure-branches corresponding to E.
Obviously, E is referred to as the union of two different types of components: P-cells and T-connections. The center B-ordinate for each P-cell are obtained by Equation (12) directly. Assume there are n T-connections in E, and they are T C 0 , T C 1 , . . . , T C n , the T-structure-branch that covers T C i is denoted as T SB i , i = 0, . . . , n.
Order the T-structure branches. The center B-ordinate for each cell belongs to E can be evaluated by this T-structure branches as follows. First, we sort the T-structures in each Tstructure branch by Algorithm 1, and then sort all of the T-structure branches in descending level order. (c) Evaluate the B-ordinates of b k+1 (x, y) via T-structures. First, we adopt Algorithm 3 for calculating the center B-ordinates on T-cells of each T-connection, and then we evaluate the B-ordinates on the rest edges that are not obtained via the C 1 continuous conditions.
If there exists nonzero B-ordinates in θ ∈ E, then save the B-ordinates on θ into Sup(b k+1 (x, y)).
We give an example to show the process for calculating the B-ordinates for a basis function b k+1 (x, y) ∈ S 2 (T k+1 ). We illustrate the above process as follows.

2.
Obtain the domain E covers Sup(b k+1 (x, y)). We focus our attention on the part of the mesh that is shown in Figure 9b because the support of the basis function on the cells in Figure 9b covers Sup(b k+1 (x, y)). 3.
(a) Obtain the T-structure branches corresponding to E. In Figure 10, there are three T-structure branches: T C 0 , T C 1 , andT C 2 . T C 0 is constituted of θ 0 , θ 1 , and θ 2 . T C 1 is constituted of θ 3 , θ 4 , and θ 5 . T C 1 is constituted of θ 6 , θ 7 , and θ 8 . T C i corresponds to the T-structure branch T SB i , i = 0, 1, 2. T SB 0 , which is the blue structure in Figure 10, is constituted of T 0 (the c-edge v 0 v 2 and cells adjacent to v 0 v 2 ) and T 1 (the c-edge v 1 v 3 and cells adjacent to v 1 v 3 ); T SB 1 , which is the yellow structure in Figure  10, is constituted of T 2 (the c-edge v 0 v 5 and cells adjacent to v 0 v 5 ), and T 3 (the c-edge v 4 v 6 and cells adjacent to v 4 v 6 ). T SB 2 , which is the green structure in Figure 10 Evalute the B-ordinates of b k+1 (x, y) via T-structures. Figure 11 shows the process of using the T-structure-branches that are ordered in Figure 3b to calculate B-ordinates of b k+1 (x, y). Figure 12 shows the rest B-ordinates obtained by the C 1 continuous conditions.

4.
Save the B-ordinates of Sup(b k+1 (x, y)). The support of b k+1 (x, y) is the cells without the top left cell.   For the basis function whose basis cell is a P-cell, we give the construction method above.

Basis Construction Framework with Modifications
In fact, there are two types of basis cells for the basis functions of S 2 (T k+1 ). One corresponds to a P-cell on T k+1 ; we can construct such basis functions by the method in Section 3.5. The other corresponds to a T-connection on T k+1 , and we discuss the modification process of such basis function in this section. In addition, we introduce the whole basis construction framework with modifications in this section.

Basis Modification Method
First, we define basis modification as follows.
Definition 6. Given a basis function b k i (x, y) at level k, the set consists of the cells of Θ k that belongs to Sup(b k i (x, y)) as Θ k i . For each cell θ of Θ k i , modify b k i (x, y) from level k to level k + 1, the modified basis function can be denoted as The modification process can be described as 1. using 9 B-ordinates to represent b k i (x, y) over θ; 2.
adopting de Casteljau's algorithm for generating new B-ordinates on θ according to the different subdivision types; and 3.
modifying the B-ordinates that are associated withb k i (x, y) by Algorithm 4. 12 Reset all of the weights on domain-centres (without basis-centre of b k i (x, y)) of Ξ k i to zero; 13 Calculate the rest B-ordinates ofb k i (x, y) via T-structure branches; 14 Reset the support ofb k i (x, y) ∈ S 2 (T k+1 ) on T k+1 ;

Algorithm 4: Modification ofb
To demonstrate the basis modification in Definition 6, we provide the following example.
Example 3. Figure 13a shows a basis function b k i (x, y) ∈ S 2 (T k ), the B-ordinates on b k i (x, y) are shown in Figure 13b. First, refine the cells of Θ k i according to the different subdivision type, Figure 14 shows the refined mesh. Subdivide the B-ordinates according to the different subdivision types. The B-ordinates subdivision result is also shown in Figure 14.
In Figure 15a, the crossing vertex, which is denoted as the blue square, is subdivided. As the crossing vertex is a corner vertex of a connection, and the four edges are either the edges or the c-edges of T k , we can reserve the 16 B-ordinates around the crossing vertex. The subdivision will not influence the B-ordinates on the domain points whose B-ordinates are zero, we can reserve the B-ordinates (B-ordinates in the gray domain) on the crossing vertices in Figure 15a. Then, we need to calculate the B-ordinates on the black dots in Figure 15a. Additionally, we reset the weights on the domain centres in Figure 15b. At last, we can calculate the rest of the B-ordinates on the yellow domain in Figure 15c via Algorithm 3, the modified basis function is shown in Figure 15d. From above, we modify a basis function b  Algorithm 4 gives the process for basis modification from S 2 (T k ) to S 2 (T k+1 ), without loss of generality. If there are more than one basis cells at level k + 1 appearing in a basis function of S 2 (T k ), the modification will display similarly.

Basis Construction Framework
From the above, we give the basis construction and modification framework by Algorithm 5.

Input:
The set B k that is constituted of all the basis functions of S 2 (T k ); Θ k 1 ; Output: The set B k+1 that is constituted of all the basis functions of S 2 (T k+1 ) 2 ; Obtain T k+1 by refinement the cells of Θ k according to the different subdivision type; 3 CV R k+1 ← All the basis cells on T k+1 ; 4 B k ← All the basis functions of S 2 (T k ); In this section, we present the algorithm for basis modification and discuss the framework for basis construction with modification.

Fitting Open Meshes
Surface fitting is an essential method in the field of CAD. In this section, we use several triangular surface models to show the potential of splines generated by our method.
Given the open surface model M in 3D space, M is constituted of a series of triangles, the vertices on M are denoted as V 0 , V 1 , . . . , V N , we parameterize M by using the parametrization method in [38]. The parameter mesh is a triangle mesh. The parameter value corresponding to V i is denoted as V i (x i , y i ), i = 0, . . . , N, and the parameter domain 1]. Additionally, the triangle on the parameterized mesh is denoted as ∆.

Calculation of Control Points
Different from the least square optimization method in [24,31], we adopt the domain centres for calculating the control points as follows.
Given the basis functions b j (x, y), j = 1, . . . , m, let [x i m , x i m +1 ] × [y i m , y i m +1 ] be the domain corresponding to basis cell of b j (x, y), j = 1, . . . , m, and (x m , y m ) = ( We calculate the control points by solving the following linear system S(x k , y k ) = V k , k = 1, 2, . . . , m.

Process of Fitting
With the method of calculating control points, we run the loop of steps 2, steps 3, and steps 4, until the error reaches the given tolerance ε.

2.
For the old basis functions, we retain their control points; for the new basis functions of S 2 (T k ), calculate their control points via Section 5.1. The result modified spline space is denoted as S(x, y).
We use mesh-refinement rules in Section 3.3 to denote the cells in Θ k . We subdivide the mesh and modify the basis functions via Algorithm 5. k ← k + 1.

Conclusions
In this paper, we provide a unique basis construction framework that incorporates basis modification of the spline space over modified hierarchical T-meshes. The subdivision rules on the modified hierarchical T-meshes are also given to prevent the redundant edges that exist on hierarchical T-meshes. Algorithms within the framework make the construction of basis functions easy to operate. In the basis construction framework, the splines over the modified hierarchical T-mesh are modified to accommodate the insertion of the cells on the corresponding CVR graph. The modification process is driven as follows: for each cell belongs to Θ k , it is subdivided into four subcells or two subcells on T k+1 . For each basis function at level k, if some of the corresponding CVR cells are subdivided, the basis function will be modified as a basis function of level k + 1. If a basis cell is generated by the subdivision process, we will reconstruct the corresponding basis function. Moreover, the application of the above splines in surface reconstruction with adaptive refinement is discussed in detail. In comparison to splines over hierarchical T-meshes, modified hierarchical T-meshes have fewer cells subdivided when achieving similar accuracy.

Data Availability Statement:
No new data were created or analyzed in this study. Data sharing is not applicable to this article.