The rapid prototyping system usually uses triangulation data of STL format. For the scattered point cloud data, this paper adopts the data preprocessing technique and proposes the triangulation optimization algorithm based on extended approximation method to establish the STL data model. The test results show that, for automotive covering parts and other complex surfaces, it gives the repair algorithm of point cloud data and the optimization algorithm of maintaining continuous smooth surfaces. It overcomes the STL data model shortcomings of cracks, broken face and overlap, and achieves the accurate modeling of the mesh surface. Also, the relevant algorithm runs fast. Moreover, the reconstruction of the surface model has a high precision and it benefits the exchange of data between RP systems.