| In Additive Manufacturing(AM),the STL(STereoLithography)file format has become a standard file interface,and the layer of the STL model is widely used in the AM technology.In this paper,based on the study of the layered algorithm of the STL model,a new layering algorithm is proposed by analyzing the defects of the equal-thickness layering and the adaptive layering algorithm such as the existing STL model.Firstly,this paper introduces the molding characteristics,Process types,application and part forming process flow of the AM technology.Then the research status of layering treatment of AM technology is analyzed,the source and significance of the research are introduced on the basis of the existing research,and the work flow of the main research content of this paper is put forward.Secondly,based on the research of equal-thickness layering algorithm,a new algorithm of equal-thickness layering of STL model triangular facets grouping in AM is proposed.The algorithm first reads the binary STL model information and creates a triangular facets matrix.Then the binary search algorithm is used to realize the intersection of the triangular facets and the slice planes.Then,the intersection point of the triangular facets and the intersecting slice plane in each group is obtained to obtain the intersecting line segment,and the redundant node between the intersecting line segments is removed.Finally,the depth-first search algorithm is used to optimize the intersecting line segments in the slice plane to create a contour path.The algorithm avoids the judgment of the positional relationship between the slice plane and the triangular facets and establishes the topological information relationship between the triangular facets.It has obvious advantages in the layering time.Then,in this paper,a new adaptive layering algorithm for triangular facets normal vector of STL model is presented.In this method,it is first necessary to find the minimum normal vector of the triangular facets intersecting the layer thickness t,and then apply the 3D model voxel x-y resolution and the relationship between the triangular facets normal vector and the manufacturing direction of STL model to realize adaptive layering.Layering with this method reduces the complexity of layering parameter processing,makes adaptive layering easier and easier to implement,and obtains layered thickness values more accurately.Because the adaptive layering thickness is realized within the allowable error range,the area layering with obvious change in the surface of the STL model is finer.Finally,the forming part for AM,the surface quality is estimated by analyzing the contour average roughness error,the average cusp height error and the adjacent layer missing area for the equal thickness and adaptive layering of the STL model.It is concluded that adaptive layering is easier to meet the needs of customers. |