**3. Flatness Calculation**

Through the above method, the flatness calculation reference surface has been obtained. The flatness calculation method in this article is based on the normal vector distance from the original point cloud of the initial support surface of the tunnel to the flatness calculation datum plane. The calculation of the normal vector distance only needs to use the original point cloud to make a normal ray perpendicular to the flatness calculation datum plane. The normal ray and the fitted surface intersect at a point, and the distance between this point and the starting point of the ray is the normal vector distance di. Flatness calculation can be divided into two parts: overall flatness and local flatness. The calculation of overall flatness is to analyze the unevenness of the overall point cloud in a region, and the calculation of local flatness is to analyze the point cloud on the local details of a region. The degree of unevenness.
