Research on Optimization of 3D Printing Manufacturing Technology Based on Segmentation Algorithm

: 3D printing technology is a relatively mature processing technology. In actual production, external support needs to be added to ensure the smooth progress of the processing process. Tree support is a new type of external support method. Combined with instance segmentation technology in artificial intelligence, it can better solve the problems of collapse, deformation, and lack of precision in the 3D printing process and improve production efficiency. For the feature loss problem in the printing model, a new instance segmentation algorithm is adopted, including deepening the feature extraction architecture and using the nonlinear activation function Mish. For the feature reconstruction after instance segmentation, this paper optimizes and improves the classical concealment method, including the spatial range concealment method Z-buffer algorithm and the area scan line algorithm of the plane range concealment method to realize the projection mapping transformation of the 3D object model by combining coordinate refinement and Z-buffer algorithm.


Introduction
In today's era, additive manufacturing technology has gradually been integrated into our lives. People's demand for 3D printing technology no longer exists only in viewing and sighing the progress of technology, but more hope that additive manufacturing technology can be more comprehensive. It is more efficient to integrate into production and life. Therefore, for different 3D printing models to be processed, a more detailed, more efficient, and cost-reduced "all-in-one strategy" is required to accurately grasp the needs of each additive manufacturing industry [1]. More targeted to promote the continuous progress and innovation of the industry.
In fact, in response to the industrial needs of different additive manufacturing, the essence is to solve the different needs of different 3D printing models. Further, for each 3D object model to be processed, it has its object model [2]. Therefore, by accurately grasping the various characteristics of each model, adding the most suitable solutions for each type of characteristic, and combining these solutions in an orderly manner, complex demand problems can be efficiently solved. In the traditional additive manufacturing process, there are many problems such as redundancy in support addition, incomplete support addition, damage to the printed model caused by support addition, and low efficiency caused by the high cost. Therefore, exploring a new type of additive manufacturing idea is particularly critical [3].
With the increasing maturity of technologies in object recognition, semantic segmentation, instance segmentation, and 3D reconstruction of 2D images, especially with the help of deep learning, pixel-level image segmentation can be solved. The local features of the object model are extracted efficiently and accurately, and unexpected classification effects can be produced by analyzing the receptive field of local features. Therefore, with the help of artificial intelligence technology, traditional additive manufacturing is combined with computer vision and computer graphics theory, and instance segmentation is used to extract, classify, and segment local feature regions of 3D object models. For object models with different characteristics, add efficient and accurate types of tree support methods to more accurately meet the different needs of different object models, making printing more convenient and efficient.

Literature review
Additive manufacturing combines material processing principles, material molding principles, and computer image vision technology. It transmits digital model files and calculates the properties of different materials through computer-aided algorithms [4]. People also call this process 3D printing technology. Additive manufacturing materials include: metal materials, non-metallic materials, and some synthetic biological materials, etc., which can also be divided into many types according to different processing techniques, such as fused deposition modeling, laser selective sintering, laser selective melting, light-curing molding, Many forming processes such as layered entity manufacturing are formed by layered accumulation according to extrusion, sintering, melting, light curing, spraying, etc., to complete the process of three-dimensional object model processing.
Compared with the traditional manufacturing methods of cutting, cutting, and grinding raw materials, 3D printing technology has many excellent human characteristics, and it has gradually become the mainstream model in molding technology [5]. It is a "top-down" molding process. It breaks the shackles of traditional manufacturing, solves the embarrassing scene of the inability to process complex structural parts, and completes the production demand "from scratch." With the progress of the times and the extensive needs of the manufacturing industry, 3D printing has been fully integrated into every corner of life, from aerospace rockets to deep-sea submarines.
At the same time, the progress of each technology is also completed based on people's needs for production and life and the improvement of the existing defects in the existing technology. While we enjoy the speed and efficiency brought by additive manufacturing technology to production and life, 3D printing also has many factors restricting its development: including the collapse and skew of the model formed by stacking from top to bottom during the molding process due to the self-stability of the printed model during the molding process under its gravity [6], after the printed model is completed. The loss of precision on the surface of the printed model due to the removal of additional supports, the loss of material during the printing process, etc.
In the process of 3D printing and processing the model, some hollow, overhang, or other areas need special treatment in the printed model, and the additive manufacturing technology uses the "bottomup" printing principle, so these model areas need to add additional support structure. Adding appropriate support structures to the surface area of printed 3D objects can effectively solve the common problems of collapse, tilting, bending deformation, and self stability caused by gravity during the printing process. And the problem of missing local features of the printed model, the problem of reducing the accuracy of the surface features of the object model after removing the support due to too many supports, etc.
To ensure the accuracy and production efficiency of the printed model, in the molding process, good external support for the 3D model needs to have the following characteristics; first, reasonable external support should be added to all the feature parts of the 3D object model that require external support, and there is no omission. Secondly, the added external support structure itself should have good self-stability and will not skew or collapse: At the same time, it is necessary to add different support structures for different local features of the 3D object model to ensure that after the printing is completed, the original The 3D model features will not be lost to ensure the accuracy of the model features; finally, based on meeting the above requirements, the consumables required for support are minimized to save the cost of model printing.
Most traditional image segmentation methods are artificially given thresholds, boundaries, or standards for special needs [7]. Using machine learning methods for image training and segmentation can, of course, meet certain classification effects. In some special data samples, some regression characteristics can also be simulated under certain circumstances. Still, the effect is only limited to the classification of images, and the accuracy of semantic analysis of image segmentation is far from satisfactory.
With the deepening of scientific and technological products and algorithms, image segmentation methods are gradually enriched. Among them, image segmentation technology can be divided into two categories according to the segmentation results: semantic segmentation and instance segmentation. Semantic segmentation refers to the segmentation and division of all pixels, including the background, but does not specifically divide the target but only does pixel-level classification. Instance segmentation is to complete the pixel-level classification of each target. If there are objects of the same classification but different targets on a picture, they will also be distinguished. It can be said that instance segmentation is a higher-level semantic segmentation. The whole process is divided into two processes: downsampling and upsampling. Downsampling is the original convolution pooling operation, while upsampling uses the deconvolution method. In addition, in the U-Net network architecture of the same year, a jump splicing method similar to the ResNet network was adopted to ensure the permanence of image information and achieve semantic segmentation well.
In 2015, based on U-Net, SegNet recorded the position of each pixel value and the maximum value of Max-Pooling on the downsampling sliding window and mapped it back to the corresponding position during upsampling thereby reducing the convolution [8]. The problem of resolution loss in the process of feature extraction.
In 2016, based on FCN, U-Net, and SegNet, PSPNet considered the semantic context information between image features. Specifically, it optimized the feature layer using four different scales and finally used 1:1 convolution. The dimension of the feature layer is reduced and finally spliced, and then up-sampling is performed to ensure the semantic relationship between the image information features.

Feature recognition of 3D printing model based on improved instance segmentation architecture
In the process of additive manufacturing, it is necessary to carry out feature analysis for different 3D object models and identify the area's feature regions to be processed. Since the feature shapes of 3D objects are rich, there are multiple feature regions on a 3D object model. The feature recognition accuracy of the model is poor. At the same time, with the development of computer vision, the feature recognition of the two-dimensional model shows good accuracy, especially for the instance segmentation problem of part of the feature area above the single object model. Starting from the special needs of the diversity of 3D printing model features, this chapter summarizes and summarizes the local area features in the 3D printing model and makes a relevant and unique dataset model. At the same time, based on the original classic instance segmentation network architecture, in the Based on the MaskRcnn framework, the BackBone network level is deepened, the relevant activation function is modified, the target detection loss function is optimized, and the relevant optimizer is introduced to better extract the feature area of the local receptive field of the 3D object model and improve the image segmentation accuracy [9].

Feature reconstruction of 3D model based on Z-buffer concealment method
After completing the instance segmentation of the local feature area of the 3D printing 2D projection model, this chapter implements two functions based on the Z-buffer concealment method, which are the multi-angle 2D projection mapping of the 3D object model. The new, improved instance segmentation model generates multi-angle 2D object models with semantic segmentation regions and performs 3D model feature reconstruction [10].

Blanking algorithm
The concealment method refers to that for an object model, from the perspective of human observation, only the area visible to the human eye is retained, the area occluded by the rear is hidden, and the three-dimensional object model is retained from a specific angle as a two-dimensional projection mapping screen.
Common banking methods can be started from two perspectives: space and plane. The first is the blanking algorithm from a space perspective: Roberts algorithm 160, a kind of algorithm for target edge detection using the blanking method, as shown in Figure 1. This is the rendering effect of the Roberts algorithm. The specific steps are:  First, split the object into multiple independent regions.  Perform self-detection of a single region.  Remove the occluded parts between the objects, including the occluded surface information and outer contour.
Second, based on each independent individual, compare each individual with other individuals in turn, and similarly, remove the surface information and outer contour information occluded by each of them to complete mutual deduplication; finally, after completing the occlusion. After the deduplication of the parts, the relationship between each individual is introduced. For example, suppose an object is in front of other objects but is not completely occluded. In that case, new contour information must be added to show the relationship between the occluded and occluded objects. The mutual positional relationship between them can achieve the purpose of reconstructing reality. However, through the elaboration of the principle, it can be observed that the biggest disadvantage of the Roberts algorithm is that it needs a lot of memory space and time for calculation, and the efficiency is low. Moreover, the hidden algorithm greatly influences the placement of the twodimensional input model and related pictures. The method of preprocessing requires more and has limitations [11]. The Z-buffer algorithm is the most classic algorithm in the space concealment method. In the implementation process, two temporary spaces need to be opened to store the depth information and color information of the projection surface respectively, as shown in Figure 2, assuming that the projection surface is for a rectangular area, a corresponding storage space is opened up for each pixel to store the corresponding depth coordinate information and color information. If the pixel value is updated, the corresponding depth information and color information are also updated [12]. The advantage of the Z-buffer algorithm is that it uses the idea of heaps and stacks. While capturing new pixels, it continuously updates the depth and color information corresponding to the pixels; at the same time, the idea of the ray method is used as the basis for judging the rationality of pixels. Based on this, the accuracy of the model is increased. However, the classic Z-buffer algorithm also has its flaws. First of all, an important premise for updating the pixel information is to fully capture the information of each pixel. This algorithm still has the problem of pixel loss, and it is often difficult for subtle local features. Secondly, because the Z-buffer algorithm uses the ray method to judge the pixel position, it is necessary to calculate the parity of the number of intersections and compare them, which requires a large amount of calculation, which reduces the overall algorithm efficiency [13].

Projection transformation of the 3D object model
The Z-buffer concealment method uses a temporary array to store the depth information and color information corresponding to the pixel points. It presents better concealment characteristics in the process of two-dimensional projection mapping of the three-dimensional object model. Still, due to the Z-buffer algorithm, There are defects such as imprecise recognition features and low efficiency of the algorithm itself, and improvements are made for the above two problems.

3D model coordinate point reading
First of all, given the shortcomings that the characteristics of the object model are not refined enough, the original Z-buffer algorithm uses the method of traversing each pixel value of the plane to continuously update and optimize the pixel point information. Still, it is accurate to the pixel level. The improved Z-buffer algorithm. In the middle, the VTK library is used for the display and coordinate recognition of 3D features.
The process of the VTK model is shown in Figure 3, where Source is the data source, that is, the 3D printed 3D object model; Filter is the related operation on the Source data source, and the process of outputting the processed data model; Source and Filter together constitutes the preprocessing module in VTK. The output of the preprocessing module is passed into the Mapper mapping. The purpose is to convert the visualized 3D object model data into graphics and present them in the form of graphics, and perform the mapping process from data to graphics; the last Actor is the process of fine-tuning the 3D graphics, Optimized display of relevant details such as zoom ratio, color, etc [14].

Judgment method based on the quadrant where the vertex is located
Another disadvantage of Z-buffer blanking method is the low efficiency due to the large amount of calculation. Improving the ray method to a decision method based on the quadrant where the vertex is located can reduce the amount of computation. As shown in Figure 4, it is the principle of the vertex quadrant method. The specific implementation process is as follows: Assuming that point P is the target point to be determined, in order to determine whether point P exists in the model, the judgment rule is as shown in the figure. The point is the origin of the coordinates, starting from P and passing through 2 , 3 , 4 , 5 . When P, point to point 2 , that is, from the first quadrant to the second quadrant, the angle experienced is π/2. When it points to point 3 , that is, from the second quadrant to the third quadrant, the experienced angle is π/2, and so on, but when the point to point, the quadrant does not change, the angle is 0, and finally the changed angles are added in turn to get 2π. Point P is identified as the interior of the model. If the obtained change angle value is 0, then point P is considered to be outside the model. If the obtained change angle value is n, point P is considered to be on the edge of the model area [15].

Conclusion
The 3D printing tree-like support structure is designed and optimized based on the algorithm of instance segmentation. After analyzing the development status of 3D printing at home and abroad and related algorithms of related support, it is found that the optimization processing of additive manufacturing can also be carried out from the perspective of identifying the characteristics of 3D object models. Therefore, the domestic and foreign development of feature recognition and instance segmentation is investigated. The current situation, as well as the relevant algorithm of feature restoration, at the same time, the tree-like support is used in the selection of support. This support method has the advantages of good stability, high efficiency, low cost, and small consumables. Including the special requirements for the data set required for additive manufacturing, and using a variety of data enhancements for the production of the data set; improving the classic instance segmentation network, including deepening the feature extraction architecture Backbone, using the nonlinear activation function Mish. The improvement of the new concealment algorithm includes, based on the original Z-buffer algorithm, using the VTK model to refine the coordinate identification method, and at the same time using the judging method based on the quadrant of the vertex instead of the ray method, which improves the model identification accuracy and reduces the amount of calculation. The process from 3D model to 2D projection is completed; the 3D reconstruction of depth information and color information is completed by using the reverse Z-buffer algorithm and the improved area scan line algorithm combined with the AdaBoost algorithm.