Multi-objective Optimization in the Build Orientation of a 3D CAD Model

Over the years, rapid prototyping technologies have grown and have been implemented in many 3D model production companies. A variety of different additive manufacturing (AM) techniques are used in rapid prototyping. AM refers to a process by which digital 3D design data is used to build up a component in layers by depositing material. Several high-quality parts are being created in various engineering materials, including metal, ceramics, polymers and their combinations in the form of composites, hybrids, or functionally classiﬁed materials. The orientation of 3D models is very important since it can have a great inﬂuence on the surface quality characteristics, such as process planning, post-processing, processing time and cost. Thus, the identiﬁcation of the optimal build orientation for a part is one of the main issues in AM. The quality measures to optimize the build orientation problem may include the minimization of the surface roughness, build time, need of supports, maximize of the part stability in building process or part accuracy, among others. In this paper, a multi-objective approach was applied to a computer-aided design model using MATLAB R (cid:13) multi-objective genetic algorithm, aiming to optimize the support area, the staircase effect and the build time. Preliminary results show the effectiveness of the proposed approach.


Introduction
Additive manufacturing (sometimes called 3D printing) refers to a process by which 3D computer-aided design (CAD) models are used to build 3D objects, by adding layer-by-layer material. The manufacturing processes in layers are currently used in several areas to fabricate end-use products in aircraft industry, medical implants, jewelery, footwear industry, automotive industry and fashion products. 1,2 Additive manufacturing technologies have grown over the years due to their effectiveness in the development of the prototype model in a reduced production time and cost. Depending on the specific 3D printing technology and the complexity of the 3D model, it is important to consider support structures and how they may affect the final result. In this work, a 3D printer using Fused Deposition Modeling (FDM) is considered. FDM extrudes a melted filament onto a build surface along a predetermined path. As the material is extruded, it cools, forming a solid surface providing the foundation for the next layer of material to be built upon. This is repeated layer-by-layer until the object is completed. With FDM printing, each layer is printed as a set of heated filament threads which adhere to the threads below and around it. Each thread is printed slightly offset from its previous layer. This allows a model to be built up to angles of 45 o , allowing prints to expand beyond its previous layer's width. When a feature is printed with an overhang beyond 45 o , it can sag and requires support material beneath it to hold it up. 3,4 Thus, the accuracy of the printed object depends on the orientation of the part on the printer platform, that is, the part must have the correct orientation in order to improve the quality of the surface. Different measures can be considered to determine the optimal build orientation taking into account factors such as staircase effect, model precision, build time, structure support and model stability. 1,5 The optimal build orientation of a model helps in the accuracy of the part, reduces the number of supports generated and the build time of the parts, and consequently decreases the final costs.
Several approaches have been carried out to determine the orientation of a model based on single-objective optimization using objective functions such as the build height, staircase effect, volumetric error, volume of support structures and total contact area of the part with the support structures, surface quality, surface roughness and build deposition time. 6,7 Recently, multi-objective approaches have been developed to determine the optimal object building orientation in the construction of CAD models, essentially by reducing the multi-objective problem to a singleobjective one using classical scalarization methods. [8][9][10][11][12][13] A genetic algorithm was used in Brika et al. 8 for solving a multi-objective build orientation problem. They optimized several variables, yield and tensile strength, elongation and vickers hardness, for material properties used, surface roughness, support structure and build time and cost. The particle swarm optimization algorithm was used in Li et al. 10 to solve a multi-objective optimization problem in order to get the desired orientations for the support area, construction time and surface roughness. In the paper of Phatak and Pande 11 a genetic algorithm was used to optimize a weighted average of five normalized evaluation criteria (build height, staircase error factor, material utilization factor, part surface area in contact with support structures and volume of support structures) based on their relevance to the rapid prototyping process. In Das et al., 14 the errors related to the staircase effect and the support volume were studied, using weights to find the best orientation of a spherical model. Cheng et al. 15 formulated a multi-objective optimization problem focused on the surface quality and production cost of the parts, obtaining solutions for all types of surfaces, whether with complex geometries or not, or even for curved surfaces. The multi-objetive approach presented by Byun et al. 16 intend to reduce surface roughness, construction time and part cost. The goal was to find the ideal orientation of a 3D model by applying the Technique for Order Preference by Similarity to Ideal Solution and weight methods. Nezhad et al. 17 proposed an Optimized Pareto Based Part Orientation algorithm in order to optimize the minimum construction time, the support volume and surface finish. The applied method does not use weights and optimizes objectives simultaneously and independently. A multi-objective optimization approach, using the Non-dominated Sorting Genetic Algorithm II (NSGA-II) and Multi-Objective Particle Swarm Optimization algorithm, considering as objective functions the surface roughness and the build time, for different models, was developed by Padhye and Deb. 18 Gurrala and Regalla 19 also applied the NSGA-II algorithm to optimize the strength of the model and its volumetric shrinkage as objective functions. Through the Pareto front, they concluded that with the shrinkage of the part their strength increases in the horizontal and vertical directions. A different study addressing how an easily removed support structure might be designed using less material and build time and leaving fewer artifacts on the specimen surface can be seen in Kuo et al. 20 There, a cost-based formulation is employed to find a compromise between cost and surface profile error induced by specimen weight.
In this work, the optimization of the final printed object surface is addressed, based on the minimization of the staircase effect, the area of the object in contact with the supporting structures and the build time. Here, a multi-objective optimization approach is proposed to obtain the orientation of the Rear Panel Fixed model taking into account the compromise between combinations of two measures mentioned above. We present some preliminary experiments showing the Pareto fronts and discuss different trade-offs between the objectives. This article is organized as follows. Section 2 introduces the orientation problem, the quality measures and the multi-objective optimization approach. The numerical experiments are presented and discussed in Section 3. Finally, Section 4 contains the conclusions of this study and some recommendations for future work.

Optimization problem
In this study, a multi-objective optimization to determine the orientation of the construction of a 3D CAD model is used. It intends to simultaneously minimize more than one measure of the quality of the printed object.
The measures involved in this study are the staircase effect, the area of the object in contact with the support structures and the build time.
Although we intend to study three measures of quality, in this study we will perform the multi-objective optimization of the combinations of two objective functions and three objective functions simultaneously. Thus the multi-objective optimization problem is given by where k is the number of objective functions and θ x and θ y are the rotation angles along the x-axis and the y-axis, respectively. In the following, the quality measures based on staircase effect, support area and the required build time are described.

Quality measures 2.2.1 Support area
A measure of the quality of the printed object is the quantity of support area, since it affects post-processing and surface finish. 9 The support area is defined as the total area of the downward-facing facets that is equivalent to the total contact area of the external supports with the object. 7,9 The support area, SA, is defined by where A i is the area of the triangular face i, d is the unit vector of the direction of construction, n i is the normal unit vector of the triangular face i and the initial function is given by δ = 1 if d T n i < 0 and δ = 0 if d T n i > 0. 9 In this study, we used the direction vector d = (0, 0, 1), because our 3D printer only moves on the x-axis and y-axis, since the base platform (z-axis) is fixed.

Staircase effect
The orientation and layer thickness are the most important factors that affect the superficial roughness. 21 Kattethota et al. studied the staircase effect (SE) of a 3D model based on the deviation between the actual and desired surfaces. It means that the greater the deviation between the two surfaces (real and desired), the greater the length of the layer and the lower the orientation of the construction of the part. The staircase effect, SE, is defined by where t is the layer thickness and θ i is the angle between triangle facet i of model surface and build orientation (d).

Build time
As considered in Jibin 9  The build time, BT , is given by where d is the direction vector and v 1 i , v 2 i , v 3 i are the vertex triangle facets i.

Multi-objective genetic algorithm
In this work, the elitist Non-dominated sorting genetic algorithm (NSGA-II) proposed by Deb et al. 22 is used. This is a multi-objective genetic algorithm that mimics the natural evolution of the species. Evolution starts from a population of individuals randomly generated. Each individual represents a potential solution of the multi-objective optimization problem. In NSGA-II, each individual in the current population is evaluated using a Pareto ranking and a crowding measure. First the best rank is assigned to all the non-dominated individuals in the current population. Solutions with the best rank are removed from the current population. Next, the second best rank is assigned to all the non-dominated solutions in the remaining population. In this manner, ranks are assigned to all solutions in the current population. The fittest individuals have a higher probability of being selected to generate new ones by genetic operators. NSGA-II uses a binary tournament selection based on non-domination rank and crowding distance to select a set of parent solutions. When two solutions are selected, the one with the lowest non-domination rank is preferred. Otherwise, if both solutions belong to the same rank, then the solution with the higher crowding distance is selected. Next, genetic operators such as recombination and mutation are applied to create an offspring population. Then, the two populations are merged together to form a combined population that is sorted according to different non-dominated fronts. If the size of the first non-dominated front is smaller then the population size, all members of this front are chosen for the new population. The remaining members of the population are chosen from subsequent non-dominated fronts in the order of their ranking. The MATLAB R function gamultiobj 23 provided in the Global Optimization Toolbox will be used in order to approximate the Pareto fronts of the multi-objective problems with each combinations of two objective functions. The gamultiobj function implements a multi-objective genetic algorithm that is a variant of the elitist NSGA-II. 22 This function provides a set of algorithm options related with customizing randomization key properties, algorithm properties and termination criteria.

Model
The 3D CAD model used in this study is a Rear Panel Fixed (see Fig. 1a) that has vents on either side. The size of the model is different from the side panels, but the side panels for left and right are equal.
Initially, the CAD model is converted into STL (STereoLithography), which is the default file type used by the most common 3D print file formats (see Fig. 1b).

Implementation details
Firstly, the combination of two of the quality measures, the support area, the staircase effect and the build time of the part was considered, and the following three multi-objective optimization problems were formulated: • SA vs SE -problem (1)  Secondly, a multi-objective optimization of the three objective functions simultaneously is considered, where SA vs SE vs BT denotes solving the problem (1) with f 1 = SA, f 2 = SE and f 3 = BT .
In order to solve the multi-objective optimization problems, the MATLAB R gamultiobj function was used with default values, thus a population size and a maximum number of generations of 50 and 400, respectively. By default, the Pareto fraction is 0.35 and therefore, in each run, 18 non-dominated solutions are found (0.35× population size). In addition, 30 independent runs were performed and the Simplify 3D software 24 (a 3D model printing simulator) was used to represent the solutions found for the Rear Panel Fixed model.
In the following sections the results for the different combinations of two objectives (SA vs SE, SA vs BT , and SE vs BT problems) as well as the results for the three objectives (SA vs SE vs BT problem) are presented.
In all figures, the set of non-dominated solutions obtained among the 30 independent runs are plotted with a blue dot. From this overall set of solutions, the non-dominated ones were selected and marked with a red circle. Representative solutions will be selected to discuss trade-offs between objectives and identify the characteristics associated with these solutions.   Table 1 presents the representative non-dominated solutions selected from the Pareto front, that were marked with a red circle in Figure 3.

Results for the SA vs SE problem
Solutions A and G are the extremes of the Pareto front, where solution A has the best SA value and the worst SE value. Conversely, solution G is the worst in terms of SA and the best in terms of SE. These solutions correspond to the lowest values of SA and SE that can be observed in Figures 2a and 2b, respectively.
From Table 1, it is possible to observe that solutions A, B, C and D have very similar orientation angles, although different SA and SE values, verifying a reduction in the staircase effect and an increase in the support area, in particular in the  Figures 4b  and 4c, respectively, but the solution E requires more supports. From solutions A to G, there is a significant change in the orientation of the part. 3.4 Results for the SA vs BT problem Figure 5 shows the Pareto front for the model Rear Panel Fixed when SA and BT are the objectives to minimize simultaneously (SA vs BT ). Table 2 presents the orientation angles and objective values for representative non-dominated solutions selected from the Pareto front. These solutions are shown in Figure 6. It is possible to see that from point A to point B there is no significant change in terms of BT , but there is a great increase in the support area. From solutions B to C, the value of SA increases, while the value of BT decreases. Solution D is one of the extremes of the Pareto front, being minimum of BT function (as it can also be seen in Figure 2c), but it is a bad solution in terms of SA.

Results for the SE vs BT problem
In Figure 7, the solutions obtained in the objective space when optimizing SE vs BT problem are presented. Solutions A and F are the extremes of the Pareto front. There is a significant improvement in the BT value, when comparing solutions B and C,

Results for the SA vs SE vs BT problem
In this section, the results of the multi-objective optimization of the three objective functions simultaneously (SA vs SE vs BT problem) are presented. The problem was optimized using the MATLAB R function gamultiobj with default values, as described in the Section 3.2. Figure 9 shows the non-dominated solutions obtained for the Rear Panel Fixed model. Three solutions regarding the extreme solutions for each objective are represented by A, B and C, corresponding to the angles (90.00,0.00), (180.00,44.95), (180.00,135.00), respectively (corresponding to Figures 6a, 8a, 8f , respectively).
In Figure 10 the two-dimensional projections of the Pareto front of the Rear Panel Fixed model for the SA vs SE vs BT problem are presented. It can be seen that the number of non-dominated solutions is larger than the one obtained with two objective combinations.

Discussion of the results
The first three combinations of multi-objective optimization problems solved allow to perceive the extremes and the compromise between objectives. Moreover, there are solutions that belong to the Pareto optimal set of the problems solved, i.e., their images belong to the Pareto fronts of the different multi-objective optimization problems. This is the case of solution (90.00, 0.00) that minimizes SA and appears on the Pareto fronts of SA vs SE and SA vs BT problems. In addition, the solution that corresponds to the (180.00, 44.95) orientation was found for the SA vs SE and SE vs BT problems, optimizing the SE function. It is also verified that the solution (180.00, 135.00) optimizes BT , as can be seen in the solutions of SA vs BT and SE vs BT . When BT is one of the objective functions involved in the multi-objective problem (combinations SA vs BT and SE vs BT ), some representative solutions put the part lying down, as can be seen in solution D of Figure 6 and in solutions D, E, and F of Figure 8, as expected because BT function intends to minimize its height. However, with the combination SA vs SE, as expected, no solution that position the part lying down exists.
In the multi-objective simultaneous optimization of the three objective functions, all the solutions obtained with the combinations of two objectives and others that represent other trade-offs between objective functions were found.

Conclusions and future work
In this paper, the build orientation optimization of a given object -Rear Panel Fixed model -was addressed based on three quality measures: the total support contact area, the staircase effect and the build time.
First, a multi-objective optimization approach was proposed for three different combinations of two objectives: SA vs SE, SA vs BT , and SE vs BT . Some preliminary experiments were presented for the three different combinations. The Pareto fronts obtained and the different trade-offs between the objectives were discussed. It was also verified that some solutions were found repeatedly in different combinations of objective functions. The results showed the effectiveness of the proposed approach since it was possible to find different solutions to optimize the various combinations.
Then, the three objective functions were optimized simultaneously. From the Pareto front we may conclude that a larger number of solutions was obtained when comparing to the ones obtained through two objective combinations, as well as, new trade-off solutions were found. It was observed that, for all problems, the Pareto fronts have nonconvexities and discontinuities.
In the future, we intend to perform a multi-objective optimization using other objective functions and test more difficult models.