Due to the persistent advancements in science and technology, the implementation of digital technology in the preservation of cultural heritage is progressively expanding. One of the focal points of research lies in the spatial virtual restoration design technology of ancient edifices, which is based on three-dimensional laser scanning technology. The study initially outlines the process of obtaining point cloud data via 3D laser scanning technology and subsequently executes denoising, splicing, and simplification processing on the point cloud. Subsequently, the pre-processed data undergo 3D mesh model construction. Finally, an effective repair technique is implemented to address the void phenomenon present during the modeling process. To construct the implicit surface, the RBF method is employed and new vertices are adjusted, resulting in a more accurate spatial virtual restoration of ancient buildings (ABs). The study found that using the radial basis function based void repair method resulted in a mean void repair accuracy of 92.38% in the west wall, an improvement of 3.08% compared to the Liepa-based method. In addition, this method achieved the highest accuracy of 98.94% on the north wall, improving by 6.37% compared to the Poisson grid editing algorithm. Meanwhile, the RBF-based method repaired cavities in the west wall model with an average runtime of only 20.613 s, resulting in a 19.16 s reduction compared to the Liepa-based method. In addition, the method’s average repair time for the north wall was only 5.364 s, a decrease of 13.28 s compared to the Poisson grid editing algorithm. This shows that combining 3D laser scanning technology and cavity repair technology can acquire high-quality point cloud data of historic structures, create precise 3D models, and achieve spatial virtual restoration. This offers a new and efficient technological approach to preserving and passing down ABs.