1. 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
and the build orientation
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.
2. 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 single-object 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.
4. 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 and the facet normal . To minimize the V, we just need to determine a orientation which minimizes the sum of value of the dot products of and .
In the volume error function,
are of the equal importance to the determination of build orientation
. 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
, find a unit vector
which can minimize the sum of the projection length
of all the normals to
. Assuming
,
, the equation of
is determined as follows:
is the projection length of
to
, 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
and the distance weight coefficient
of each point in the local point set into the formula to calculate the shift vector
, and use the set threshold as the condition for
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
, and the curvature of each point in the cluster is used as the local weight
of each point. The weight of each point is determined by
and
. The weight
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
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,
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.
5. Case Study
To execute the whole framework, we tested the model shown in
Figure 8a. The free-form 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,b.
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 boundary-edges 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
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 (
Table 1 and
Table 2), the method proposed can improve printing accuracy and shorten printing time too.