**7. Conclusions**

In this paper, an e fficient and accurate method is well proposed for the establishment of the complete closed mesh model of rail-surface scratch data, solving the precondition of online rail-repair based on the laser cladding technology. Related experiments are performed on both the artificial rail and the practical rail, and the corresponding results reveal the capability of real-time and accuracy required by the online rail-repair, which could further promote the development of the field.

**Supplementary Materials:** The following are available online at http://www.mdpi.com/1424-8220/20/17/4736/s1, Figure S1: The practical rail of 50 Kg/m and its surface PCM, Figure S2: The result of the scratch-recognition algorithm performed on the rail-surface PCM of the practical rail, Figure S3: The acquisition of the scratch-data PCM, Figure S4: The triangulation of the PCM, Figure S5: The final complete closed mesh models of the scratch-data of the practical rail, Table S1: The values of the parameters used in the scratch-recognition algorithm, Table S2: The calculation results of the extension vector, Table S3: The time required in the experiment.

**Author Contributions:** Conceptualization, Y.G. and G.W.; funding acquisition, G.W.; investigation, Y.L. and J.L.; methodology, Y.G., L.H. and G.W.; project administration, G.W.; software, Y.G. and L.H.; writing—original draft, Y.G., L.H. and G.W.; writing—review & editing, Y.G. and G.W. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was supported in part by the National Natural Science Foundation of China under Grant 61875062 and in part by the Fundamental Research Funds for the Central Universities.

**Acknowledgments:** The authors would like to thank Professor Xiaoyan Zeng at Wuhan National Laboratory for Optoelectronics, Huazhong University of Science & Technology, for providing the practical damaged rail.

**Conflicts of Interest:** The authors declare no conflict of interest.
