To make a reasonable maintenance plan for the gear transmission system, it is crucial to conduct the threedimensional measurement of gear damage. When using digital fringe projection profilometry to measure the metal gear, i.e. the high dynamic range object, there exists the issue of local over-exposure, leading to the loss of fringe information in those areas, which significantly affects the accuracy of the 3D measurement. To address this issue, a structural self-attention generative adversarial network is developed to generate high-quality, realistic, non-reflective fringe patterns from the reflective regions. In this network, a structural loss function is proposed for guiding the generator to learn more about the illumination, texture, and structural features in the fringe patterns, making the generated fringe patterns more consistent with real ones. Additionally, to enhance the ability to infer missing fringe information in the high-reflective regions, a self-attention skipping upsampling module is constructed, which uses SimAM to extract local high-reflectivity features from low-noise feature maps during the upsampling process and then integrating them with shallow semantic features in the downsampling process. The proposed inpainting method is applied to the 3D measurement of metal gears with minor damages and highly reflective industrial metal parts. Experimental results show that the proposed method can handle various types of modulated fringe patterns, including different metallic materials, fringe types, and levels of overexposure, and it can more accurately inpaint the fringe patterns than the existing methods, hence improving the accuracy of the subsequent 3D reconstruction.