Abstract:The STL model is accepted by most rapid prototyping machine. The layering is one of the key steps, which algorithm directly affects the layering efficiency and manufacturing precision. Based on advantages of equally thick layering algorithm of STL model, the sorting compaction method was presented. The data were simplified by the method,at the same time, the plane pieces of triangles which intersected with stratification plane could be directly extracted. Then the contour line of cross-section was obtained rapidly. The accuracy was guaranteed by this algorithm, at the same time, the efficiency of layering was greatly improved. The implementation process of the algorithm in MATLAB software is introduced, and which stability and speedy are verified by examples.