This article analyzed the hierarchical algorithm of present STL models, based on which put forward the recursive layered algorithm with directive weighted graph based on packet sequencing. Use the triangle grouped ordering to reduce the number of the intersection judgments, to avoid the necessity of traversal all the triangle patches in each searching process. Simplify the topological relation by founding the Directive Weighted Graph and building up the adjacency relation between the triangle patches. We solved the problems of the triangle's point cut emerged in the recursive slice by building up the recursive search functions with the deep optimized traversing method, and sealed the sections' contours. Experimental results show that, this function can not only slice the STL models efficiently, but also promise a steady and efficient slicing process.