Build Orientation Optimization Based on Weighted Analysis of Local Surface Region Curvature

: Build orientation becomes a hot issue in 3D printing, which has a signiﬁcant impact on the surface quality, support structure and ﬁnal cost of the fabricated model. In this paper, we focus our attention on the surface quality of the part when fabricated by a 3D printer under certain speciﬁc build orientation. A novel method using curvature shift is proposed to search local regions with obvious curvature changes of the model printed. Based on curvature shift strategy, the model is divided into separate regions which can be treated differently. Every triangle facet of the regions is given different weight factor by calculating the average curvature of each region. Weighted facets is introduced in building volume error function. Candidate build orientation can be obtained by the eigenvalue decomposition and the optimal build orientation is the one which leads to the minimal error of the function. From the case study, the method proposed gets a smaller error with a lower printing cost and time, which means the model surface in higher weighted regions gets a higher surface quality when printed.


Introduction
3D printing or additive manufacturing (AM, rapid prototyping, layer manufacturing, free-form fabrication, rapid manufacturing) is a process where parts are manufactured according to a digital 3D model by adding material, usually layer by layer along the build orientation, as opposed to subtractive manufacturing methodologies such as traditional milling [1]. The original CAD model of the fabricated part can be designed by commercial CAD software or reconstructed via reverse engineering. Once the CAD model is available, layer slice program is applied to deal with the model and output all the 2-D contour layers, then 3D printers print the model layer by layer. The build orientation needs to be determined first before printing. Only when the build orientation is already known can we set the other necessary printing parameters, slice the model and print it by 3D printing.
We all know that the inherent defect of 3D printing technique: the staircase effect [2][3][4] occurs in the process of layer by layer addition shown in Figure 1a. If the nozzle size is smaller and the layer thickness is thinner, the surface quality can be greatly improved, however it takes a long time to fabricate. It is actually a contradiction between efficiency and surface quality. When the hardware parameters of the 3D printer are determined, the build orientation has a great influence on the surface accuracy caused by the staircase error. Therefore, this paper will focus on reducing the staircase error in the pre-processing of 3D printing models. As for the effect of printing, process parameters and material shaping on the surface accuracy of the model are not involved.
If the build orientation is parallel or vertical to the surface facet of the model printed, the staircase effect disappears. If the angle θ (shown in Figure 1b) between the surface normal n and the build orientation d is between 0 and 90 degrees, the staircase effect occurs and the surface quality decreases. The build orientation determines surface quality of the part and even its mechanical properties [5]. However, for most part models, the normal direction of the surface is rarely perpendicular or parallel to the build orientation, and the staircase error is unavoidable. Therefore, it is very necessary to improve the accuracy of certain regions of the printed part by adjusting the build orientation [6]. Based on the principle of generation, we add the regional weight to the staircase error function, and obtain the candidate build orientation through eigenvalue decomposition to improve the surface quality of the region. The objective of this article was to find local regions with obvious curvature changes in the surface of the printed part from a geometric point of view, which is then given a high weight factor. Of course, according to the different application scenarios and performance of the fabricated part, different regions of the part require different surface quality. However, this article does not consider this problem. In this paper, a novel optimization of part build orientation based on weighted analysis of local surface region curvature is proposed. The rest of this paper is structured as follows: Section 2 presents the related studies of the optimization of build orientation. Section 3 presents a detailed explanation of the methodology based on the curvature shift process. This is followed by case study on test models in Section 4. Finally, the conclusions and future scope of this work are presented in Section 5.

Literature Review
Due to the importance of build orientation in AM, intensive researches are conducted to provide feasible solutions. An attempt is made to achieve minimum average part surface roughness (best overall surface quality), minimum build time and support structure for stereo lithography (SL) and selective laser sintering (SLS) processed parts by determining optimum part build orientation [7][8][9][10]. For most simple models, the direction parallel to a coordinate axis is used as the build orientation [11]. It cannot be the same as complicated models. Most researchers usually chooses single or multiple factors to construct a singleobject or multi-object optimization function and find the best build orientation from the feasible solution by determining the weight and range for the optimization target [12][13][14][15][16][17][18][19][20][21].
On the research of a single target method, most researchers take one factor such as volume deviation or surface roughness to build the object function, which can get the optimal build orientation under the specific factor chosen [12][13][14][15][16][17]. Ahar et al. [12] determines the optimal build orientation based on the position of normal vectors of the original CAD model. All the normal vectors are considered as the candidate orientation. It is certainly feasible to adopt an exhaustive approach, but subject to the existing surface normals. It is difficult to get the optimal build orientation. Luo et al. [13] used a new volume error model. The biggest problem is that all normal-weighted regions are weighted equally. The geometry features of the model itself are neglected and the weighted optimization process essentially belongs to normal weight, which means all facets contribute equally to the optimal build orientation. Ding et al. [14] proposed a new method to determine the optimal build orientation using Gauss Map, which collects all facet normals in a unit sphere. The unit vector from the center of the sphere to the center of the bottom circle of the spherical crown is the optimal build direction. Although just considering the facet normal, it effectively decreases the volume of support structure. It should be noted that the algorithm is not versatile especially for some more complex parts which contain open concave loops or non-sharp edges. Bruno et al. [15] researched the effect of different build orientations on Ti-6Al-4V for microstructural and mechanical property evaluation. However, printing performance is more affected by material properties and cooling deformation after thermoforming. Relatively speaking, the build orientation has relatively little influence. Barclift et al. [16] used particle swarm optimization [17] to search an optimal build orientation owing to its ease of programming, convergence speed and computational efficiency. If the initial particle is not good, it may be biased by a certain particle. The algorithm is easy to converge prematurely and fall into a local optimal solution. In addition, the complexity of the algorithm increases, resulting in reduced efficiency.
The multi-object method chooses multiple factors such as surface quality, construction time and material consumption to determine the optimal build orientation [18]. The proportion of each factor is determined empirically or based on the demand [19][20][21]. Phatak et al. [19] applied the genetic algorithm to solve the parameter optimization of multiple objects (staircase error, heights and materials cost). The method distributed different weight to the three factors and obtained the optimal orientation. A constrained non-linear multi-object optimization model is constructed based on the eight parameters [20]. The model is solved by global search algorithm in MatLAB. Different parameter weight is based on which parameter is more important. The results of the method show significant improvements in the manufactured part's geometric accuracy and thus validate the performance of this approach. Brika et al. [21] proposed a multi-object optimization of surface roughness, build time and support structures. Utility function approach is adopted to convert the optimization problem into a linear-weighted function. The optimal build orientation is determined by iteratively inputting the parameter. Although the multi-objective optimization algorithm uses multiple research objects and assigns a certain weight to each object to select the optimal build orientation to ensure that the final printing effect meets the expected settings, there are common shortcomings. The requirements of each research object on the build orientation are different or even opposite, which leads to a contradictory calculation process in the orientation optimization process. If the weight of a research object is increased or decreased, in fact, the multi-objective optimization algorithm reduces the dimensionality to a single-objective optimization algorithm. It is back to the problem of single objective optimization.
With the rise of machine learning, machine learning (ML) has been applied in various aspects of 3D printing, such as design for 3D printing, material tuning, process optimization, in-situ monitoring, cloud serving and cybersecurity, to improve the whole design and manufacturing workflow especially in the era of industrial revolution 4.0 [22]. In recent years, many scholars have used machine learning to optimize 3D printing process parameters and part performance parameters, including the build orientation [23][24][25][26]. Malviya et al. [23] proposed a generalized machine learning-based parameter optimization framework to determine optimal build orientation for FDM(Fused Deposition Modeling) components. The mechanical properties of the test examples selected are tested and simulated from the three main directions of XYZ, and then the training data are obtained through orthogonal experiments. Obviously the algorithm does not have universal applicability and is not applicable to other complex models. The simulation data of complex models is definitely more than three main directions for testing. Zhang et al. [24] proposed a method that applies a non-supervised machine learning method, K-means clustering with DaviesBouldin criterion cluster measuring, to rapidly decompose a surface model into facet clusters and efficiently generate a set of meaningful alternative build orientations. Cluster analysis based on statistics takes a lot of time and it is difficult to converge for more complex models.
CNNs is more precise at estimating all three studied factors than the baseline linear regression model for the training and evaluation conditions [25]. Machine learning algorithms have a great advantage for studying a class of models with similar characteristics. Given enough training data, it fits very well. When the model has anisotropic characteristics, either increase the training sample data or the new model needs to be re-learned to train the data. In addition, machine learning requires very high computer performance and it is more difficult to choose meta-parameters and network topology.
Build orientation impacts surface quality, build time, support volume and mechanical properties [27]. Despite that multi-object and heuristic-based optimization can be used to determine an orientation and lots of researchers focus their attention on multi-object optimization, it cannot solve collective effect of multi-factors synchronously to the optimization process. Once the weight of each factor is determined, it essentially degrades into simple object optimization. The only benefit that draws from multi-object optimization is we can easily obtain the balanced optimal result from the factors defined by giving the specific weight factor. In this paper, we only focus the effect of different build orientations on the surface quality of regions with higher curvature in the fabricated part.

Methodology
This section presents a detailed explanation of our method to implement the proposed optimization of build orientation. Firstly, a new method curvature shift is proposed to effectively classify the surface regions of the CAD model. The method divides the original model into different clusters and each cluster represents those points and facets that have similar geometry features. Secondly, the curvature of the point is defined and estimated based on the NURBS(Non-Uniform Rational B-Splines) surface reconstructed by the point as well as its 1-ring neighbor points. The point with the big curvature is distributed a big weight factor, which is determined by the number points of the CAD model and the different ratios of each point's curvature. Thirdly, the volume error function with weight factor determined in the second step is built by calculating cusp height [28]. The orientation optimization is converted into a linear regression problem with the least absolute deviation. The least absolute deviation norm is appropriated by the least squares norm and PCA method to process eigenvalue decomposition on the scatter matrix of weighted norm vector. The optimal build orientation is finally determined from the eigenvectors which minimizes the volume error function.

Surface Region Analysis
Different regions of a part have different functions and the geometry accuracy has a great impact on the mechanic performance especially in the field of free-form surface [29]. By analyzing the surface region curvatures of the model, different regions of the model are assigned different weight factors, which can be used in the volume error function to calculate the optimal build orientation. To distribute a reasonable weight factor in different regions of the model, cluster strategy [30] is applied in the original model. The model is divided into several clusters and each cluster represents one set that has roughly similar features. Each cluster is considered as a separate module, which means the cluster appears interest points relative to other points instead of nearest neighbor search of the whole model such as thin tips and edges. Different regions are shown in different colors ( Figure 2b) and each cluster is analyzed as a separate part in Section 3.2.

Cluster
Clustering algorithms are useful in information theory, target detection, communications, compression and other regions. There are mainly K-means clustering, hierarchical clustering, spectral clustering and mean shift clustering. K-means clustering is simple and efficient, but it is easily affected by the initial cluster center. Multiple hierarchical clustering has a large time complexity and the result of hierarchical clustering depends on the selection of the merging points and the splitting points of the clustering. Mean shift cluster searches for the cluster center along the direction of the increase in the highest density, which is not helpful to the recognize geometry features of the model. To solve this problem, curvature shift is proposed to classify the model into different clusters based on the geometry features. The weight factor is set for each cluster so that each point in the cluster has different importance to the vector of curvature shift (Section 3.1.3).
(a) Test model (b) Clustering model Figure 2. Cluster strategy on test model.

Curvature Estimation
The curvature shift method proposed mainly depends on the curvature of points. The curvature of one point on the model is defined as follows: the maximum curvature of the central point on the surface, which is reconstructed by the point with its 1-ring points. The maximum curvature reflects the changes in the polar region around the point. If the maximum curvature is close to zero, it shows that the polar region is relatively flat.
Surface reconstruction is used to estimate the curvature as shown in Figure 3. NURBS surface is adopted to the appropriate local sample. A NURBS surface is obtained as the tensor product of two NURBS curves, thus using two independent parameters u and v (with indices i and j, respectively) [21]: with as rational basis functions, let (d) = du : dv be the main direction of point p on the surface S, r = r(u, v) is the main curvature along the main direction. The curvature information is obtained following the expressions: Based on the Vieta theorem, the Gaussian curvature and mean curvature is The maximum curvature is as follows:

Curvature Shift
Curvature shift algorithm refers to an iterative step, similar with the mean shift strategy: calculate the average of the current point offset, move the point to its offset average, then use the shifted point as a new starting point and continue to move until satisfying certain conditions. As shown in Figure 4a, the curvature shift strategy is implemented as follows: the center of the blue circle is selected as the initial point, and all the curvature vectors in the blue circle (the radius is denoted as h) are added together. The average curvature vector is shown as a red arrow and the red dot is the new starting point of the next iteration. The process iterates until the center of the circle converges to a fixed point, which is the position of the maximum probability density. The points with similar curvatures form a cluster centered on the point with the maximum curvature. Therefore, the curvature shift is essentially a gradient-based optimization algorithm.  The curvature shift indicates the curvature vector always shifts to the maximum curvature density on the surface. In each cluster of point set, the center of the cluster is located at the point with the maximum curvature. The curvature shift vector(C sv ) is defined to represent the average shift vector in a local sample point set. Given a set of points in R d = x i , i = 1, 2, . . . , n, the maximum curvature of x i is c i . The definition of C sv is as follows: where S h is a high dimensional sphere with a radius of h : k represents there are k points located in the sphere, v i is the shift vector and w(c i ) is the curvature weight factor for determining the vector offset. Based on the strategy of curvature shift, more points in S h are distributed along the curvature density. Therefore, the C sv should point to the direction of curvature density just as shown in Figure 4b. Before that, we do not consider the distance factor in calculation of the curvature shift vector. As long as the projections of two sampling points in the direction of the mean vector are equal, they contribute equally to the calculation of the curvature shift vector. Therefore, the intention of introducing the kernel in curvature shift is that the contribution of the offset to C sv is different as the distance between the sample point and the offset point is different. Gaussian kernel is introduced in curvature shift: in extending the curvature shift algorithm, a weight coefficient is set for each sample point, so that the importance of different sample points for calculating C sv is different. Combining kernel functions and sample point weights, C sv has the following form: where G h is a unit kernel function, H is a bandwidth matrix, w(c i ) is the weight factor of sample point. In practical applications, the bandwidth matrix H is often limited to a diagonal matrix. In particular, the most common bandwidth matrix is H = h 2 I. To simplify the mathematical model subject to the normal distribution, let σ = 1 and b = 0. The equation is equivalent to the following form: in order to get the weight distribution according to the distance, so the model is further revised as following: where a is weight coefficient, d i is the distance between the i-th point and the cluster center, let a = 1, the Gaussian weight is determined by the following equation: In order to manage the topological structure and points query efficiently, we used the KD-tree proposed in [31]. The index not only offers quick distance query to get one cluster but topological query of neighbour points to reconstruct the NURBS surface. Based on the curvature estimation and Gaussian kernel, the process of curvature shift is shown in Algorithm 1. The clustering model using curvature shift is shown in Figure 4c. Different clusters of the model are represented by different colors, which represent different regions that have similar geometry features.
Clustering through curvature shift is to better analyze the key regions of the surface curvature changes, which helps filter out key points and triangle facets to assign higher weights to these regions in order to participate in the construction of the volume error function in Section 4. Although clustering is not the focus of this article, it is necessary to present the comparative results of the program running. The K-means cluster results are unpredictable, and the effect is difficult to determine. When the same parameters are used for clustering, different results will appear, because the initial value of the clustering is randomly assigned. Figure 5b,c are different results when k = 10. No matter what parameters are used to filter key points, the result is always uncertain. Curvature shift cluster results are shown in Figure 6. When the cluster center moves along the direction of the largest curvature change, the clustering result is unique. When different thresholds are given, the key points with large curvature changes in the edge of the model can be filtered out effectively. Query point set Q query in S index (p init , b w ) 6: if L(Q query ) ≤ c num then 7: b ← b w + 0.1 8:  (5) 13: for point p i in S do 14: Calculate w(d i ) by Equations (11) and (12) 15: Calculate w(c i ) based on Section 3.1.2 16: 17: Calculate C sv by Equation (9) 18: if √ C sv ≥ then 19: clist j ← p i 20: When the number of clusters is given, the bandwidth b w is determined. The calculation range of C sv is determined according to the bandwidth. In step 5, b w is adaptively adjusted according to the number of clusters, and the range of C sv is limited in the spherical domain within the radius h and the cluster center of the sphere. C sv always moves along the direction with the biggest curvature density. If it is less than the threshold, the new cluster is added, otherwise the number of points in current cluster continues to increase. This iterative process ends up with the number of clusters set by the user. In the algorithm, the threshold value is one tenth of the model's average point distance. When C sv moves along the direction of maximum curvature density, the curvatures of the points in the cluster are rounded with point which has the biggest curvature (cluster center). The curvature of the points in the cluster generally tends to be uniform.  Different clusters are obtained by adjusting b w so that the model is effectively divided into different cluster which has similar features. In addition, the maximum curvature is also helpful to the weight distribution in Section 3.2.

Weight Distribution
Once the curvatures are available, the weight factor is distributed on every point. Initially all the clusters are introduced an initial weight factor called cluster weight. Then local weight is distributed on every point in each cluster based on the curvature analysis. Finally, the weight factor is calculated by the cluster weight and the local weight.

Cluster Weight
In Section 3.1.3, the curvature of every cluster center is estimated. The curvature of center point in each cluster is set to represent the average change of the point set. If we get n clusters, the method of obtaining cluster weight is as follows: Step 1: Cluster the entire model using curvature shift strategy proposed.
Step 2: Calculate the curvature of the center point in each cluster. The curvatures of n cluster are c 1 , c 2 , . . . , c n .
Step 4: Calculate the weight of i-th point by the following equation: w ci = c i ∑ n i=1 c i . The cluster weight is effectively estimated by the curvature shift. However, in each cluster, some points with relatively big curvature changes are missed. Actually, it is lack of sufficient credibility just based on the curvature of one center point in each cluster. Therefore, the curvature weight of each point is further defined to guarantee each point with big curvature participating in the calculation of volume error function.

Local Weight
Although cluster weight represents the variation of local regions, it cannot show the specific changes at the point level. Once we have the curvature map of each cluster, we need to get further information in each cluster from the point level instead of cluster level. Local weight is proposed to reflect curvature variation of a facet consist of its three vertices. Given a cluster C with m points, C = {p 1 , p 2 , . . . , p m }, local weight is obtained as Algorithm 2 shown. insert c pj into P temp 5: end while 6: F ← ∅, t ← 0 7: Assumed P temp consists of facet set F, F consists of t facets 8: for facet f in F do 9: get the three vertex belongs to f :p 1 , p 2 , p 3 10: The final weight of the i-th facet in the model is calculated by the cluster weight and local weight: The weight of the points whose curvatures are 0 indicates the points have no contribution to the optimal orientation. Owing to the weight being based on the facet, the local weight actually means the facet weight based on the facet consisted of the three vertices. In addition, the mean curvature c m of a cluster also helps to judge the regions with large curvature changes from the center point. If the cluster weight and the local weight have synchronized changes, it indicates the cluster weight has sufficient credibility to reflect the geometry changes in the current region.

Optimal Build Orientation
The fabricated part based on the CAD model should get the best surface quality and shape precision when printed in the optimal orientation. However, when the model designed by the computer becomes more complicated, the optimal process of orientation is a paradox. One surface gets better quality, while the other side may sacrifice the quality and geometry precision. What is more, the build time and support structure cannot be considered at the same time. Lots of researchers focus on multi-object optimization, it is still difficult to find the optimal balance among the different factors. Actually, what we need most is to get the best performance requirements when given the single constrain. Therefore, the surface quality is the only factor we consider. Even if one factor considered, we do not take all the surface into account when analyzing the model. The key region of the model concerns us most. Therefore, geometry analysis on the model based on curvature shift is implemented to get the key regions of the model. Those regions contribute more than the others when determining the optimal orientation.
To get the optimal build orientation, the volume error function proposed in [13] is adopted. [28] also proposed the cusp height to measure the fabricate error when the surface of the model has a specific angle with the build orientation. The volume error function is given as follows: where l is the layer thickness. Assume the given model has m facets, the volume error function is: The total volume error V is determined by the sum of the absolute values of the dot product along the build orientation d and the facet normal n i . To minimize the V, we just need to determine a orientation which minimizes the sum of value of the dot products of d and n i .
In the volume error function, n i are of the equal importance to the determination of build orientation d. Now that the various regions of the model have different performance requirements. Geometry analysis is implemented so that more important regions can be distributed a bigger weight to contribute more on the process of the optimization. Therefore, adding the weight factor, the volume error function is revised by the following equation: In order to solve the optimal solution to the volume error function, we apply the method proposed by [13]. The minimization of the volume error function is equal to this question: given a weighted normal set N = { n 1 , n 2 , . . . , n n }, find a unit vector d which can minimize the sum of the projection length L p of all the normals to d. Assuming d = (a, b, c) T , n i = (x i , y i , z i ), the equation of L p is determined as follows: κ i is the projection length of n i to d, Equation (17) is equivalent to a linear regression problem with minimum absolute deviation. The linear regression parameters can be appropriated by using the least squares criterion instead of the minimum absolute deviation criterion. The parameters are quickly determined with PCA and matrix eigenvector decomposition. The optimal build orientation is chosen from which eigenvector minimizes the volume error function. The entire optimization process is shown in Figure 7. The optimization process first loads the 3D CAD model format. The model adopts the STL(Stereolithography) format. The STL file format can easily obtain the points information and triangle facets information of the model. The curvature information of each point is calculated by fitting the NURBS parameter surface to the local point cloud, as the initial reference value for the curvature shift calculation. Substitute the curvature weight coefficient w(c) and the distance weight coefficient w(d) of each point in the local point set into the formula to calculate the shift vector C sv , and use the set threshold as the condition for C sv convergence. If the convergence condition is met, it is the same cluster, otherwise set an initial point for the new cluster to calculate. When the clustering of the entire model is completed, the curvature of the cluster center point is used as the cluster weight w c , and the curvature of each point in the cluster is used as the local weight w l of each point. The weight of each point is determined by w c and w l . The weight w f of each triangle facet is determined by the arithmetic average of its three vertices. The points of the model whose curvatures are greater than the average curvature c m are selected as the key points for calculating the optimal build orientation. The triangle facet where each vertex is located is used as the key facet. Finally, w f is introduced into the volume error function V and three vectors can be obtained as candidate build orientations after eigenvalue decomposition of V. The vector that minimizes V is the optimal build orientation. This orientation ensures the surface quality of the regions where key points are located. Of course, different process and manufacturing requirements have different key points. In this article, only the points with greater curvature change are selected for method demonstration. As for special process and processing requirements, the mechanism of screening key points is more complicated, and the optimal build orientation is adaptively changed.

Case Study
To execute the whole framework, we tested the model shown in Figure 8a. The freeform model was reconstructed by Solidworks, which is used in the engine of aircraft. The edge and free-form patch of the blade are all key regions which are needed to print more accurately. The key points (the read points) were detected by the algorithm proposed as shown in Figure 8b. Those key points are distributed a bigger weight factor to build volume error function so that the optimal build orientation is dependent more on the key points. In the printing process, the model can be fabricated in a high quality especially in those regions. Curvature map is used to help find the surface changes of the turbine blade. To simplify the analysis process, we extract the point cloud from the STL file. Each point curvature is obtained based on the NURBS reconstructed by the local sample. In addition to the edges, some inside points of the blade also appear. The curvature map is shown in Figure 8c.
Once the curvature map is obtained, weight factor is distributed for calculating the curvature shift vector. Gaussian weight is applied in determining the weight distribution. In our test, 1-ring points are chosen under the bandwidth 3. In addition to the curvature, distance combined with Gaussian weight is also considered into the calculation for the weight distribution. The Gaussian weight map based on curvature and Euclidean distance are respectively shown in Figure 9a  In the calculation of the optimal build orientation, the key step is determining the normal weighted region. Once key points are obtained, the key region of the model is taken into account when determining the optimal build orientation. Only if given a high weight factor can the part have a high surface quality. Therefore, the weight distribution, including two parts: cluster weight and local weight, is needed for calculating the volume error function too. The optimal build orientation is chosen from three candidate orientations by the one which minimizes the volume error function. The orientation which minimizes the volume error function, is the desiring build orientation. As a comparison, the Equal Weight Optimization (EWO) proposed in reference [13] is adopted. The comparison of build orientation is shown in Figure 10. The comparison of data is shown in Table 1. The default, volume error, Zenith and Azimuth angles are referred to as Z-axis orientation, e, δ and ψ, respectively. The time is the running time of the program. From Table 1, orientation 3 is the optimal build orientation based on proposed method. Zenith angle and azimuth angle are 52.068 • and 46.040 • . As a contrast, the result calculated by reference [13] is 49.881 • and 52.551 • . As for the volume error function, the facets in key points ( Figure 10) play a more important role than the other facets. EWO method Ref. [13] regards all facets equally important. The facets in key regions bring greater errors, so those facets are given different weight in this paper. Despite that the program execution time is longer than that in [13], the volume error is obviously smaller.
To further confirm the validity of proposed method, more different models were tested in the following comparisons shown in Figure 11, the model in the left panel of Figure 11 is the default orientation, the medium is optimized by EWO method and the right is determined based on the algorithm proposed in this paper.
Curvature shift is processed on Fan duct as shown in Figure 12. The curvature distribution is obtained shows the regions with big curvature are main concerned in boundaryedges and free-form surface. Small curvature change at the surface transition. Based on the curvature map and weight distribution, all the clusters are shown in different color. Key regions can be further acquired more reasonably in each cluster. To observe key regions of Fan-duct intuitively, the facets are extracted from the original model shown in Figure 12c.
The detailed comparison parameters are shown in Table 2. It should be noted as different models have its dimension scale, the volume error is bigger when the dimension of the model is bigger. For example, the model size of Impeller is 400 mm in the y-dimension as the Rocket hardware is just 30 mm in the y-dimension. Therefore, the volume error of Impeller is obviously bigger than the Rocket hardware. In addition to the dimension scale, the operation time of the program is mainly depended by the mesh density. The more points per unit volume, the greater the time it takes. For example, there are 24,310 points in impeller as there is only 8358 points in Fan duct. There is no doubt the time cost is bigger in testing the impeller. The model has different sizes under various build orientations. The size means the minimum enclosing rectangle parallel to the axis plane. The length is the Consumables in PLA. Weight is the mass of final printed model. The cost is material costs and the time is the whole printing process takes. The comparison of three orientations in size, length, weight, cost and time is shown in Table 3.  If we choose the Z-axis as the default build orientation, the cost is maximum. Compared with the EWO, the length, weight, cost and time are all reduced to some extent when the method proposed is applied. Meanwhile, the volume error also reduced from the Table 2 in spite of the program execution time increased a bit. Therefore, the proposed method not only reduces the costs but improve the surface quality of the fabricated model. Finally, the Fan duct model was printed in three orientations using the H2000A Printer (Figure 13a) produced by Himalaya 3D company. Although the cost and time may be different by Cura and H2000A, the print result is consistent with our proposed method. The actual printing time is shorter than EWO despite of the little longer execution time of algorithm shown in Figure 13 (The printing time is included in parentheses).
In order to see the details more clearly, we also magnified the original model by 1.8 times. The local magnification region which is marked by a black rectangular box shows the results under three build orientations in Figure 14. The local average surface roughness [32] is measured by TR200 roughness meter, a hand-held roughness measuring instrument. The same local region is measured three times and the average surface roughness Ra is calculated and marked in parentheses. As we can see, the surface quality in the region of free-form surface and edges is higher and the staircase effect is decreased than the other two methods. It should be noted that the surface roughness model [10,[33][34][35] is established to theoretically calculate and verify the surface quality of the model printing, the design of the theoretical model still uses the triangular facet normal and layer height to calculate. The final result is essentially the same as the volume error, so their method is not used in the article, but directly verified by instrument measurement.
From the case study above, curvature shift strategy can effectively determine the surface regions with higher curvature, which help specify a larger weight factor for complex surfaces, especially those with obvious curvature changes. Those regions will be given higher weights to participate in the construction of the volume error function. The error function is actually a vector function with the shortest projection distance along the build orientation. The higher the weight of the triangle facets, the more contribution to minimize the volume error function, The optimal build orientation is the vector to leads to minimum volume error, which means surface roughness of those regions get higher accuracy. In other words, the final build orientation can help improve the printing accuracy of high-weight regions. As can be seen from the printing example ( Figure 14) and error data (Tables 1 and 2), the method proposed can improve printing accuracy and shorten printing time too.

Conclusions
Although the multi-object optimization is a hot issue, there are lots of restrictions even paradox among the parameters to be optimized. It is difficult to find the balance to get the best quality and efficiency. If we adopt a comprise plan, we have to sacrifice part of quality or efficiency. Therefore, the surface quality is only concerned especially for the models with free-form surface in this paper. The geometry shape of the model has an important influence on the dynamic performance. A useful method is proposed to provide an optimal build orientation for the parts that needs high surface quality especially in the aircraft industry. The developed algorithm is capable of analyzing the key position using the curvature shift strategy. All those regions which have high obvious curvature changes are considered more by distributing a bigger weight factor in determining the orientation. The optimal orientation can ensure the key regions have the higher accuracy when printed. The analysis of local surface region curvature is challenging in this paper. Curvature shift strategy is proposed to cluster the original points and surface reconstruction is applied in estimating the curvature of each point. The novelty of the proposed algorithm is the analysis of local surface region curvature and the key region of the model is considered more to guarantee surface quality such as sharp regions and thin regions.
This article does not involve the actual application scenarios of the model, but only analyzes and verifies it from the theoretical method. This is the limitation of this paper. Although the algorithm proposed can significantly improve the surface quality of the regions with obvious curvature changes of the model, there are still conflicting regions that make the weight distribution counterbalance each other and weaken the effectiveness of the algorithm. Therefore, the next article will attempt to solve this problem through multi-directional optimization. Institutional Review Board Statement: Not applicable. The study is not involving humans or animals.
Informed Consent Statement: Not applicable.

Conflicts of Interest:
The authors declare no conflict of interest.

AM
Additive Manufacturing a Weight coefficient S(u, v) The NURBS surface c max The maximum curvature C sv Curvature Shift Vector v i The shift vector p i The i-th point c pi The curvature of p i c m The mean curvature k x The kernel function d The distance between the i-th point and the cluster center c av The average curvature c f The curvature of one face w c The cluster weight w(c) The curvature weight w(d) The Gaussian distance weight w l The local weight w f The facet weight ∆V The volume error of one face V The whole volume error of the model C cusp The cusp height θ i The angle between facet normal and Z-axis n i The facet normal d The build orientation L P The projection length of all facet normals