**2. Acquisition of Flatness Calculation Datum**

To establish a detection system for the surface flatness of the initial support of the tunnel based on the three-dimensional laser scanning technology, the acquisition of the flatness calculation datum is very important. The point cloud of the tunnel after preprocessing (Figure 4) is very smooth, which is conducive to the reconstruction of the tunnel model. The reconstruction of the tunnel point cloud model is essentially the surface fitting of the point cloud, and the discrete point cloud is fitted to a curved surface that approximates the surface of the target object. The accuracy of the fitted surface also directly affects the calculation of the flatness of the initial support surface of the tunnel result. The flatness calculation datum surface is essentially a fitting surface suitable for flatness calculation obtained by the point cloud data through the fitting method and optimization processing. To obtain the flatness calculation reference surface, selecting a suitable fitting method can effectively improve the degree of fitting optimization.

**Figure 4.** The point cloud of the tunnel after preprocessing.
