| As a new and high technology,3D printing is in a stage of rapid development.Slicing processing is one of the key elements of 3D printing,which directly affects the quality and efficiency of print formation.In this paper,a slicing algorithm is proposed based on adjacent topology for STL model,including the optimization and visualization of STL model,a fast slicing algorithm for STL model based on mesh facet loop,an adaptive layer thickness optimization algorithm based on ring neighborhood reference contour line,and a slicing software system of STL model is developed which is verified by some example models.In the first chapter,the background and research significance of this paper are introduced.The current research of slicing algorithm of 3D printing for STL model at home and abroad is summarized,and the shortcomings of the existing algorithms are analyzed.The major contents and the framework of this paper are presented in the last section of the chapter.In the second chapter,the optimization and visualization of STL model for 3D printing are studied.The STL model file format is introduced at first,and the STL model is optimized using C++ under Visual Studio platform based on the slicing requirements,including model data reading,vertex redundant data removal and model coordinate transformation.Finally,the visualization of the STL model is realized based on the OpenGL graphics library.In the third chapter,a fast slicing algorithm for STL model based on mesh facet loop(MFL)is proposed.Firstly,the positions of the slicing planes are determined to create the partition blocks,and all the triangular facets of the STL model are partitioned synchronously to determine the intersected triangular mesh facets set of each slicing plane.Then the MFLs of each layer are constructed based on adjacency topology using the intersected triangular mesh facets set,and the ordered common adjacent edges between adjacent facets are obtained synchronously based on all MFLs of each layer.Further,the ordered intersection points of common adjacent edges and corresponding slicing plane are calculated.The sectional contour rings of each layer of STL model are established by connecting the ordered intersection points.In the fourth chapter,an adaptive layer thickness optimization algorithm based on ring neighborhood reference contour line for the 3D printing of STL model is developed.The overall topological relationship of STL model is established at first.After determining the slicing direction,the vertices with the maximum Gaussian curvature of the ring neighborhood of the mesh vertex of STL model are solved by recursively traversing.A reference contour line representing the morphological character of the external surface of the STL model is construceted using such vertices by interpolation fitting.The layer thicknesses are calculated based on the morphological changes of the reference contour line along the slicing direction adaptively to determine the height position of each slicing plane.Finally,the sectional contours of each layer can be obtained using the slicing algorithm of the third chapter.In the fifth chapter,a slicing software system of STL model based on the adjacency topology on the basis of the slicing algorithms and theories proposed in this paper is developed,and the functions are demonstrated and applied with the example models.In the sixth chapter,the conclusion and future work are discussed. |