In this paper, a novel hole-filling algorithm for triangular meshes is proposed. Firstly, the hole is triangulated into a set of new triangles using modified principle of minimum angle. Then the initial patching mesh is refined according to the density of vertices on boundary edges. Finally, the patching mesh is optimized via the bilateral filter to recover missed features. Experimental results demonstrate that the proposed algorithm fills complex holes robustly, and preserves geometric features to a certain extent as well.