Topology reconstruction of STL data based on C++ standard template library
ZHENG Yi1,2, ZHENG Ping3
1. College of Civil Aviation, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China;
2. School of Information and Electronic Engineering, Shandong Institute of Business and Technology, Yantai 264005, China;
3. Institute for Pattern Recognition and Artificial Intelligence, Huazhong University of Science and Technology, Wuhan 430074, China
Abstract In view of a great deal of redundant vertexes and little topological information in a STL file, we studied a topology reconstruction algorithm and reconstructed the topological information of vertexes, edges and triangular facets. Containers and iterators of C++ standard template library were utilized to carry out the algorithm. Redundant vertexes were removed from the STL file based on a redblack tree structure, and a halfedge topological structure was constructed. Neighborhood searched of appointed vertexes and triangular facets could be achieved rapidly. And a boundary of the model could be ascertained likewise. Experimental results show that the topological information of STL files can be reconstructed by the proposed algorithm efficiently and stably, and the proposed algorithm has an advantage of efficiency over the improved naive algorithm.
ZHENG Yi, ZHENG Ping. Topology reconstruction of STL data based on C++ standard template library. Chinese Journal of Engineering Design, 2013, 20(6): 522-528.