*1.1. The Main Work*

To establish a detection system for the surface flatness of the initial support of the tunnel based on the 3DLS technology, the tunnel engineering site (Figure 1) was firstly analyzed comprehensively, then a reasonable tunnel engineering measurement plan was formulated. The Topcon GTL-1000 ground 3DLS was used to obtain the data in tunnel engineering. For the surface point cloud data of the initial branch, the relevant parameters of the 3DLS are shown in Table 1.

**Figure 1.** Tunnel project site.

**Table 1.** Performance parameters of the 3D laser scanner.


Take the area with a length of 2 m along the central axis of the tunnel as the analysis object, and use the SW Amberg Tunnel to preprocess the collected point cloud data. The SW Amberg Tunnel is specially designed for tunnel construction and was developed by the Swiss Amberg Technology Company (Amberg Technologies) R & D. It supports various tunnel construction methods and construction phase systems. The system is composed of software and hardware. The SW Amberg Tunnel cooperates with and guides high-precision measurement hardware equipment to efficiently and accurately complete the measurement tasks of each construction stage. Not only does it significantly improve the efficiency and accuracy of data collection and analysis, but also achieves an excellent performance in tunneling guidance, high-density scanning section over-under-excavation analysis, refined excavation volume analysis, lining thickness analysis, geotechnical engineering monitoring analysis, and tunnel completion data archiving [4].

After preprocessing by the SW Amberg Tunnel, the point cloud condition of the initial support surface of the tunnel is roughly obtained. It is believed that based on the number of point clouds after the reduction, the random sampling of the point cloud reduction method can maintain the original shape as well as the characteristics of the point cloud. Therefore, a 200 × 200 point cloud data set is obtained by this method and imported into MATLAB. To complete the calculation of the surface flatness of the initial support of the tunnel, the surface fitting method based on B-spline interpolation and the SG filter smoothing method based on curvature correction need to be used to optimize the surface fitting of the point cloud data and obtain the flatness calculation benchmark reference [5]. Finally, the normal vector distance from the original point cloud to the flatness calculation datum is obtained, the calculation formula of the standard deviation and the traditional detection method of the surface flatness of the initial support of the tunnel are presented, and the calculation method of flatness based on 3DLS technology is established. Draw a flatness distribution map based on the calculated flatness. It clarifies the overall and local conditions of the surface flatness of the initial support of the tunnel and improves the entire flatness detection system. It can not only determine the flatness of the surface of the initial support of the tunnel but also determine the uneven surface area of the initial support of the tunnel [6]. The measurement operation of the point cloud data by MATLAB (Commercial mathematics software produced by MathWorks, Natick, MA, USA) is shown in Figure 2.

**Figure 2.** MATLAB operation process.

Through the comparison and analysis with traditional flatness detection methods, the surface flatness detection method of tunnel primary branches based on 3DLS technology not only meets the accuracy requirements and high accuracy, but also meets the requirements of the specification, and its detection method is feasible. The technical route of this research is shown in Figure 3.

**Figure 3.** Technology roadmap.
