## 2 Materials and Methods
### Process of the Optimization of FDM Printing
As illustrated in Figure 1, two noteworthy defects (identified with a red arrow) are evident in the printed sample: an excess of material at the perimeter and string-like formations that bear a resemblance to spider webs. These imperfections are accompanied by a visible unevenness in the surface texture of the side perimeter. Such defects typically arise due to an inability to control the printing parameters with sufficient precision, particularly regarding the temperature, feed rate, and print speed. The observed unevenness and stringing may be indicative of inappropriate nozzle temperature settings, which could result in excessive material deposition and filament drag. Achieving an optimal print quality necessitates a meticulous equilibrium between the viscosity of the polymer and the velocity at which it is extruded, which is temperature-dependent. It is therefore essential to calibrate the printing temperature of the chosen material to minimize these defects and ensure consistent surface quality [35]. \begin{table}
\begin{tabular}{l l} \hline \hline \multicolumn{3}{c}{**Technical Parameters of PLA Material**} \\ \hline Density & 1250 kg/m3 \\ \hline Nozzle temperature & 180–230 °C \\ \hline Tensile strength (MPa) & 110 \\ \hline Fumes & Almost none \\ \hline Temperature deformation (°C) & 65 \\ \hline Melting temperature (°C) & 160 \\ \hline Thermal conductivity (W/m*K) & 0.13 \\ \hline Flexural strength (MPa) & 80 \\ \hline Absorption of moisture & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Technical parameters of PLA. Figure 1: Defects of 3D printing. One of the key tools for monitoring and controlling 3D printing is the open-source OctoPrint system, which provides a user-friendly interface to streamline the printing process [37]. Users can easily monitor their prints, preview models, and adjust settings through a web interface, with the option to expand its capabilities through customizable plugins [38]. OctoPrint version 1.10.2 offers remote monitoring via built-in webcam access and real-time temperature control for optimal printing. Its GCODE visualizer allows for detailed customization and precise control over prints. With wide compatibility and easy add-on installation, it simplifies 3D printing management and enhances the print reliability and accuracy [39]. A 3D printing system can be modeled as a control system with input, state, and output parameters, allowing for comprehensive analysis and optimization. This model helps consider all factors affecting the final product's quality. The parameters in 3D printing technology fall into three categories: input, state, and output [40]. Our first step was designing the model using graphics software to meet all the specifications and functional requirements. We then transferred the design to a web application, where we entered technical details for the 3D model, such as the material and geometry, creating the model in STL format. Finally, the STL file was imported into a slicer (as shown in Figure 2), which converted the model into layers and generated the G-code for the 3D printer [41]. The slicer allowed us to adjust various printing parameters, and we experimented with 17 variations, focusing on the layer height and print speed. This trial-and-error process helped us analyze how these adjustments impacted the final product's quality. Smaller layer heights improved the detail and surface quality at the cost of longer print times, while larger heights sped up the printing but reduced the quality; similarly, faster print speeds decreased the accuracy, while slower speeds enhanced the quality but extended the print time [42]. In this piece of research, 17 samples were produced using a variety of different combinations of key parameters, including the temperature, printing speed, and layer height. These controlled variations permitted an exhaustive examination of the impact of disparate input parameters on the quality of the final 3D-printed products [43].