When a laser energy gradient attenuator is working, there is an inhomogeneous temperature distribution in the whole of the glass because of the non-uniform light energy absorption. This will lead to optical performance reduction. An integrated opto-thermal–mechanical method is proposed to calculate the wavefront aberration for analysis of the thermal effect of the system. Non-sequential optical analysis is used for computing the absorbed energy distribution. The finite element analysis program solves the temperature distribution and the deformations of nodes on the surfaces. An interface routine is created to fit the surface shape and the index field, and extended Zernike polynomials are introduced to get a higher fitting precision. Finally, the parameters are imported to the CodeV optical design program automatically, and the user defined gradient index material is ray traced to obtain the wavefront aberration. The method can also be used in other optical systems for thermal effect analysis.