Inverse Construction Methods of Heterogeneous NURBS Object Based on Additive Manufacturing

: According to the requirement of heterogeneous object modeling in additive manufacturing (AM), the Non-Uniform Rational B-Spline (NURBS) method has been applied to the digital representation of heterogeneous object in this paper. By putting forward the NURBS material data structure and establishing heterogeneous NURBS object model, the accurate mathematical unified representation of analytical and free heterogeneous objects have been realized. With the inverse modeling of heterogeneous NURBS objects, the geometry and material distribution can be better designed to meet the actual needs. Radical Basis Function (RBF) method based on global surface reconstruction and the tensor product surface interpolation method are combined to RBF-NURBS inverse construction method. The geometric and/or material information of regular mesh points is obtained by RBF interpolation of scattered data, and the heterogeneous NURBS surface or object model is obtained by tensor product interpolation. The examples have shown that the heterogeneous objects fitting to scattered data points can be generated effectively by the inverse construction methods in this paper and 3D CAD models for additive manufacturing can be provided.


Introduction
Heterogeneous object refers to a solid component consisting of two or more primary materials (or pore spaces) distributed continuously or discontinuously within an object [1]. Additive Manufacturing (AM) technology [2][3][4], as a digital manufacturing technology, makes the solid products by stacking the materials layer by layer in order to provide a new way for the rapid and accurate manufacturing of entities. AM can not only make single material products, but also realize the manufacture of heterogeneous material parts. The process of AM is based on the 3D CAD model, which determines the final structure, material, and performance of the product. Building the 3D model of the product is the first step of the AM process and all the subsequent work. Complex entity model has a high place in playing the advantages of AM. Therefore, the research of heterogeneous object is focused on the modeling of solid components. Only when the geometry and material information of heterogeneous material parts are expressed in a complete digital way, it is possible to realize the design, analysis, and integrated manufacturing of heterogeneous material parts by computer-aided means. In recent years, a variety of heterogeneous object representation methods were presented. The typical modeling methods are as follows. "RM set" and "RM object" design methods were proposed by Kumar et al. [5], representation of multidirectional complex materials based on control features was proposed by Ozbolat [6], B-spline tensor product way to construct heterogeneous object model was presented by Qian et al. [7], Yang et al. [8], the representation by Sharma et al. [9] was supported by Medial Axis Transform (MAT), which defines and represents the material variation from inside to outside for heterogeneous objects, and so on. All kinds of modeling methods are unique and affective because of their different modeling basis and modeling characteristics. However, the above methods of constructing heterogeneous objects are relatively not complicated, and all of them are "positive" construction methods. In fact, in CAD practice, it is often required to interpolate or fit a given set of data to "inverse" the creation of entities [10][11][12]. Inverse construction can effectively shorten the product design and development cycle, and reduce the cost and risk of new product development. It is helpful for the series design of products and preparation for AM. In this paper, a new heterogeneous object modeling method is combined by NURBS to realize the inverse construction of heterogeneous objects.
NURBS is the acronym of Non-Uniform Rational B-Spline and NURBS method has become the main modeling method in the field of homogeneous solid. The expression of tensor product [10,13] is used in the expression method of heterogeneous entity based on NURBS. In the inverse construction problem, the expression is used to parameterize the data points with initial geometry and material information, to obtain the control vertices of the interpolation heterogeneous curve, surface, or entity, and solve the "inverse" construction problem of the fitting of heterogeneous object.
In the method of heterogeneous inverse construction, the known discrete points are all heterogeneous points, that is, they contain both geometric and material information. The goal is to fit the geometric and material information based on the NURBS material data structure, and to get the heterogeneous NURBS surfaces and objects. It is easy to classify and deal with the geometric information of heterogeneous points. If the geometric distribution of discrete points is regular, that is, the discrete points are distributed in a uniform rectangular grid, the heterogeneous NURBS objects are constructed by B-spline interpolation of tensor product in this paper. If the geometric distribution of discrete points is irregular, that is, scattered, RBF-NURBS inverse construction method is presented in this paper. The general idea is to get the geometry and/or material information of regular mesh points by RBF interpolation, and then get the heterogeneous NURBS surface or solid model by tensor product interpolation.

Data Structure of Heterogeneous NURBS Object
In the modeling research of heterogeneous NURBS objects, the first problem is how to intuitively represent the geometry, topology, and material information of the solids at the same time, that is, what kind of data structure is used to effectively store and operate the relevant data. NURBS material data structure based on Kumar method [5] is presented to simplify the mathematical representation of heterogeneous NURBS objects. Since each control vertex corresponds to a weight factor in the heterogeneous NURBS object, data points are defined in homogeneous coordinate space T = E 3ω × M rω × R, where, E 3ω and M rω are weighted geometric space and weighted material space respectively, R is real space. Each point in the space is represented by homogeneous coordinates as follows: where, d is the coordinate of the point in Euclidean space of P ω , that is, the geometric coordinate of the point; m is the material component information of the point, each component a j of m = (a 1 , a 2 , . . . , a r ) represents the component of the J material, and the sum of all components is equal to 1; ω is the weight factor of the point P ω , that is, the weight factor corresponding to the corresponding NURBS control vertex.
Euclidean space is expanded in NURBS material data structure. The mathematical essence of the internal information of heterogeneous objects is a subset of the product space of geometry and weighted materials. Therefore, the geometric information and material information of heterogeneous objects can be described completely and accurately, if the geometric coordinates, material coordinates or homogeneous coordinates are given for each point inside the objects. Based on the above data structure, the NURBS method can be applied to the representation of heterogeneous objects to achieve the mathematical accurate unified representation of analytical and free heterogeneous objects, which lays the foundation for the inverse construction of heterogeneous objects.

Inverse Interpolation for Heterogeneous Data Points in Regular Grid
Given a set of regular distributed discrete data points with geometric and material coordinates, a heterogeneous NURBS curve, surface or solid interpolated in these data points will be produced by the inverse construction method. In fact, B-spline curve (surface, object) is a special NURBS curve (surface, object) when the weight factors are equal to the positive real number (usually 1), and the inverse construction method of B-spline is easier to be realized by computer programming, so B-spline algorithm is extended for regular heterogeneous mesh points in the inverse construction method to construct heterogeneous object. In fact, a heterogeneous object will be constructed to interpolate given heterogeneous data points (or heterogeneous B-spline curves, heterogeneous B-spline surfaces), with the requirement that the corners of the object in all directions to coincide with the corners of the data points in geometry. In this construction process, the equations will be solved in three stages (or two stages, one stage). Given heterogeneous data points Q i, j, k (i = 0, 1, . . . , l; j = 0, 1, . . . , m; k = 0, 1, . . ., n), heterogeneous B-spline objects B (u, v, w) will be constructed to interpolate in these data points, where Q i, j, k and P a, b, c are defined by NURBS material data structure. N a, p (u), N b, q (v) and N c, r (w) are B-spline basis functions which defined on the aperiodic non-uniform node vectors. P a, b, c are the control points of the heterogeneous B-spline objects.
During the construction, the parameter values ũ i ,ṽ j ,w k corresponding to the data points Q i, j, k are determined first. In this paper, the parameter values corresponding to each direction on the isoparametric surfaces are determined by the method of normal accumulating chord length parameterization. Fixed k, the parameter valuesũ i, k (i = 0, 1, . . . , l) andṽ j, k (j = 0, 1, . . . , m) corresponding to the data points in the direction u and direction v on the isoparametric surfaces w are calculated by the inverse interpolation construction method of B-spline surface. Thenũ 1 i andṽ 1 j will be calculated by taking the average value of all k = 0, 1, . . ., n. Similarly, the parameter valuesũ i (i = 0, 1, . . . , l),ṽ j (j = 0, 1, . . ., m) andw k (k = 0, 1, . . ., n) will be obtained which are corresponding to the data values in the final direction u, v and w.
Secondly, the node vectors U, V and W are determined according to the requirements of endpoints interpolation.
Finally, the control points of the interpolation object are constructed by three-stage curve interpolation method. Because the interpolation object passes through a given data point, and then according to the characteristics of tensor product entity expression, it has the following equation (in order to express simply, the degree sign is omitted at the subscript of B-spline basis function).
By solving Eqs. (1)-(3), the middle control points P * c, i, j , P * * b, c, i and the final interpolation surface control points P a, b, c are obtained.
If the given initial condition is not data points, but a group of B-spline curves or B-spline surfaces, it is necessary to unify the degrees and node vectors by upgrading and nodes refining [14], then the parameters corresponding to the data points and the node vectors in other directions are determined, and finally the unknown control points are calculated by solving Eqs. (2) or (3).
An example of inverse construction of heterogeneous B-spline object is shown in Fig. 1. In Fig. 1a, three layers of data points with material values are given (in this paper, the material values are represented by colors). The material values of data points in each layer are different, but the data points in each layer are geometrically distributed in a relatively uniform rectangular grid. It is required to inverse construct heterogeneous B-spline object that meet the following two conditions. First, the geometry and material values of data points should be interpolated by the heterogeneous object. Secondly, the distribution of materials between different layers of the heterogeneous object should be uniform. Figs. 1b and 1c are the wireframe picture and rendering picture of heterogeneous B-spline object that meet the requirements through the inverse construction algorithm in this section.

Inverse Construction Method for Heterogeneous Scattered Data Points
In the inverse construction of heterogeneous objects, if the given scattered data points are irregularly distributed in space, a large-scale linear equation system including all control points of the surface (or volume) needs to be established for solution in the B-spline surface (or volume) inverse construction algorithm. At the same time, some problems often appear such as unstable numerical calculation, unsmooth interpolation results, too many control vertices and so on.
The surface reconstruction method based on Radial Basis Function (RBF) is a global surface reconstruction method. It can effectively solve the problem of data point fitting with irregular and uneven geometric distribution. The complex and smooth surfaces with arbitrary topological structure can be reconstructed by multiple harmonic radial basis functions. The fitting methods of various irregular scattered data points are deeply studied by Franke [15] by comparing the accuracy, visual effect, sensitivity to parameters, execution time, storage requirements and the simplicity of computer implementation of various methods. The approximation effect of surface fitting algorithm based on RBF is pointed out to be the best one by Franke in his paper [15]. However, when radial basis function is used to interpolate the scattered data, the result is also obtained by solving the linear equations. The problem of numerical instability is presented, if large number of data points are calculated by this interpolation method. Based on the above analysis, RBF-NURBS inverse construction method is represented, which combines RBF and NURBS to fit the scattered heterogeneous points. The algorithm can be divided into two categories according to the final needs of users: heterogeneous surface interpolation and heterogeneous object interpolation. For the interpolation of heterogeneous surface, the scattered data points with geometric and material information are processed by RBF inverse construction method from irregular geometric distribution to regular geometric distribution. Then the heterogeneous NURBS surface with material information is obtained by the B-spline interpolation method of tensor product. For the interpolation of heterogeneous object, the scattered data points are first layered according to certain rules. The heterogeneous NURBS surfaces are obtained by the RBF-NURBS inverse construction algorithm on each layer. Finally, the heterogeneous object whose geometric distribution and material components are fitted to given data points is obtained by B-spline inverse interpolation algorithm. Because the key of heterogeneous object interpolation is surface interpolation, the application of RBF-NURBS inverse construction method of heterogeneous surface is introduced in detail in this paper.

RBF Interpolation Method for Heterogeneous Scattered Data Points
For the inverse construction of heterogeneous surfaces, geometric information and material information of the initial scattered points are both given. The inverse construction method proposed in this paper not only needs to fit the geometric information, but also needs to get the material information of the fitting surface. So, the geometric information and material information are interpolated respectively by RBF algorithm with the same parameter node value of the scatter points for the center of the radical basis function. 1, 2, . . . , n), where G k is the geometric coordinate of the point Q k ; M k is the material coordinate of the point Q k which represents the material component of the point; ω = 1 is taken in the NURBS material data structure. The following function should be constructed for the fit problem,

Given heterogeneous scattered data points
which meets the interpolation conditions where φ ( · ) is the radial basis function, w j is the weight coefficient, (u k , v k ) is the parameter node value corresponding to the scattered point Q k = {G k , M k }, which is the center of the radial basis function. When geometric information or material information is performed by RBF interpolation method, the geometric component G k or the material component M k of Q k is taken respectively.

RBF-NURBS Inverse Construction Method
In this paper, the RBF-NURBS inverse construction method is proposed, which combines the RBF and NURBS methods, and solves the surface fitting problem of scattered heterogeneous data points. The general idea of the algorithm is to divide the scattered data points into several areas, and then carry out the RBF interpolation operation for the geometric information and material information of the scattered points in each area, and get the geometric and material values of the rectangular grid points through calculation. Finally, the points forming the topological rectangular array are taken as the input points of the B-spline inverse construction method to get the heterogeneous surface.
The specific process of RBF-NURBS inverse construction method is shown as follows: Step 1: The projection plane is selected, the scattered data points are projected, and the corresponding parameters of the data points are calculated.
Given scattered data points Q k = (G k , M k ) (k = 1, 2, . . ., n). According to the spatial distribution of data points, a plane is selected as the projection plane. The orthogonal coordinate system of parameters is established on the projection plane, and the scattered data points G k are projected to the projection plane. Let (U k , V k ) be the uv parameter coordinate of the projection point of G k . Let be the definition area of the surface. In practice, a coordinate plane can be taken as the projection plane. For example, let plane xOy be the projection plane, and then let U k = x k , V k = y k . If the number of initial scattered data points is large, the projection area D can be divided into M × N small areas first.
Step 2: RBF interpolation method is applied.
For each region D m,n (m = 1, 2, . . . , M; n = 1, 2, . . ., N), the center of the radial basis function is u m, n; k , v m, n; k that falls on the region, and the geometric information G k and material information M k of the corresponding heterogeneous scattered data points are taken as data points. The RBF interpolation operation is performed by formulas (4) In the parametric coordinate system, the projection area of scattered data points is divided into several small rectangular grids evenly, and the boundary of the area D XY m, n (m = 1, 2, . . ., M; n = 1, 2, . . ., N) should be taken as the grid dividing line. Let u i , v j (i = 1, 2, . . . , I; j = 1, 2, . . ., J) be the parameter coordinate at the rectangular grid point. According to the RBF function obtained in the previous step, the geometric coordinates and material coordinates of small rectangular grid points are calculated in different areas D m, n , that is, f G m, n u m, n; i , v m, n; j , f M m, n u m, n; i , v m,n; j are calculated. If the geometric or material coordinates of the corner points of the adjacent areas are different, the geometric coordinates and material coordinates of the small rectangular grid points are obtained by taking the average value.
Step 4: The heterogeneous surface is constructed by tensor product interpolation.
The points f G m, n u m, n; i , v m, n; j and f M m, n u m, n; i , v m, n; j , which are distributed in a uniform rectangular grid, are regarded as data points. The heterogeneous B-spline surface S (u, v) is constructed by the tensor product interpolation method in the previous section, which is fitting to the initial heterogeneous data points. Firstly, the heterogeneous NURBS surface S 0 (u, v) representing the automobile hood is generated by the direct construction method [10], as shown in Fig. 4. Next, 256 and 1681 data points are randomly picked up as initial scattered data points on the engine hood surfaces, as shown in Figs. 5a and 6a, respectively, and RBF-NURBS inverse construction operations are performed. In the second step of RBF interpolation, Gauss function is used as radial basis function in this example. In the third step, the lines parallel to the axis u and the axis v are used to divide the projection area D in the parametric coordinate system which are The values at these points are calculated respectively by geometric RBF function and material RBF function, and the 121 heterogeneous points shown in Figs. 5b and 6b are obtained. The heterogeneous points are basically topologically uniform distribution in geometry, and can be used as interpolation data points in the fourth step. The heterogeneous surfaces S 1 (u, v) and S 2 (u, v) are constructed by tensor product interpolation in the fourth step with the wireframe pictures shown in Figs. 5c and 6c, and rendering pictures shown Figs. 5d and 6d, which are the heterogeneous surfaces fitted to Figs. 5a and 6a.
A lot of experiments about the influence of noises to the algorithm are taken. Noises are randomly added to geometric and material coordinates of 1681 scattered data points in Fig. 6a. The scattered points with noises are shown in Fig. 7a, and the heterogeneous surface S 3 (u, v), shown in Fig. 7d, is generated by RBF-NURBS inverse construction method. It is shown that the influence of noise can be avoided to a certain extent and the algorithm can robust to noise to generate the required heterogeneous surface. In this paper, the error of the final fitting surface S (u, v) is calculated by the following formula: The geometric error is the average distance between all scattered data points to the inverse heterogeneous surface. The material information is normalized first, and then the material error is calculated. All errors of the three fitting surfaces are listed in Tab. 1. It can be seen from Figs. 5, 6, and Tab. 1 that heterogeneous surfaces fitting to scattered data points can be generated by RBF-NURBS inverse construction method and the fitting errors decreases with the increase of initial scattered data points. The geometry and material information of the fitting surfaces are determined by the distribution of scattered data points. Therefore, the larger the number of scattered data points is, the denser the distribution is, the more ideal heterogeneous surfaces can be obtained. At the same time, as shown in Fig. 7 and Tab. 1, when noises are randomly added to the original data points, the algorithm still converges and the fitting surface can be generated, although the errors increase a little bit. All examples prove the feasibility of RBF-NURBS inverse construction method.

Conclusion
In this paper, B-spline inverse interpolation construction method and RBF-NURBS method have been presented for heterogeneous NURBS object effective design, which allow additive manufacture design easier. As a benefit of this method, the fitting process is fast and stable which overcomes the disadvantages of solving huge equations and unstable numerical calculation of traditional homogeneous solid inverse methods. Another benefit is that it can produce smoothing interpolation results and meet the designers' fitting requirement.
The NURBS material data structure has been proposed, and the NURBS method has been applied to the modeling of heterogeneous object to realize the accurate and unified mathematical representation of simple analytical and complex free heterogeneous solid. On this basis, the construction method of heterogeneous object from the perspective of inverse fitting has been given. If the given heterogeneous data points are distributed in a uniform rectangular grid, the tensor product interpolation method is proposed to generate the heterogeneous B-spline curves, surfaces and objects; if the geometric distribution of the given heterogeneous data points is irregular and scattered, the RBF-NURBS inverse construction method is presented, which combines the RBF and the tensor product interpolation methods. Combined with the advantages of these two methods, the fitting problem of scattered heterogeneous data points has been well solved by RBF-NURBS method. Future research will focus on the slicing heterogeneous NURBS object for the additive manufacturing.

Funding Statement:
The author(s) received no specific funding for this study.

Conflicts of Interest:
The authors declare that they have no conflicts of interest to report regarding the present study.