# Raster Angle Prediction of Additive Manufacturing Process Using Machine Learning Algorithm
## 1 Introduction
[20] have demonstrated that the selection of an appropriate raster angle can significantly impact the mechanical integrity and surface quality of FDM-produced parts, emphasizing the critical need for careful consideration during the design and fabrication stages. Furthermore, the raster angle plays a crucial role in optimizing the strength and durability of printed components. Consequently, understanding and effectively managing the raster angle is essential for achieving the desired part characteristics and ensuring the successful implementation of AM technologies. Current FDM-based 3D printers cannot detect the optimal raster angle [21]. Traditional optimization and estimation methods can estimate the raster angle for limited design processes. Thus, in this study, ML-based algorithms are proposed to verify and estimate the optimum raster angle of different geometric parts. The input parameters required for training the algorithms were obtained from different model geometries. The proposed prediction model reduces fabrication costs without affecting product quality. An estimation of the raster angle parameter with different ML algorithms will be performed for the first time in this study. This feature makes this study unique. There are many studies that estimate the mechanical properties of products fabricated with FDM using ML methods [22; 23; 24; 25]. [PERSON] et al. studied the impact of important parameters on the dimensional accuracy of various geometries such as holes and rectangular slots [26]. They used a decision tree algorithm to predict the dimensional change. As a result, this algorithm makes accurate predictions. In addition, the effectiveness of the developed model was confirmed with an R\({}^{2}\) score of 0.67. [PERSON] and [PERSON] investigatedthe effects of 3D printing parameters and determined the optimal combination of these parameters [27]. The abovementioned process parameters were found to have a good effect on the strength of the constructed models. [PERSON] and [PERSON] aimed to determine the optimal combination of input parameters to predict and minimize the surface roughness of samples fabricated by FDM on a 3D printer using a cascaded forward neural network and genetic algorithm [28]. [PERSON] et al. developed an ensemble ML approach for predicting the surface roughness of FDM parts [29]. In this study, raw data were processed according to feature importance using RF-based methods before training the ML models. [PERSON] et al. used machine learning algorithms for classification to create different models that can predict the surface roughness of parts produced from polyvinyl butyral through FDM [30]. Five input variables were defined (layer height, printing speed, number of perimeters, wall angle, and extruder temperature) and 16 parts were produced, each with three different surfaces. The average value of the surface roughness Ra on each surface was obtained. From these experimental values, 40 models were trained and validated. The model with the best prediction results was the model generated by the Bagging and Multilayer Perceptron (BMLP) with a Kappa statistic of 0.9143. The use of ML algorithms is expanding day by day in the AM process. These algorithms will significantly contribute to improving the fabrication process [31; 32]. In this study, we used ML algorithms to estimate the raster angle to ensure the minimum material usage and fabrication time in the FDM, regardless of the model. The prediction and modeling processes were performed using five different ML algorithms. These algorithms include a support vector machine (SVM), Gaussian process regression (GPR), an artificial neural network (ANN), decision tree regression (DTR), and random forest regression (RFR). The implementation of advanced ML algorithms for the prediction of the best raster angle for different geometries conclusively reduces a product's cost without manipulating its quality.