## 4 Surface Profile Error to Evaluate Deformation  
The profile of the curve is expressed not by mathematical equation but by discrete points, which makes it difficult to evaluate the profile error. Therefore, the profile error of surface mesh can be measured by calculating the dissimilarity deviation between the source surface and the target surface based on the Surface Subdivision Method. According to the definition of the profile tolerance in International Organization for Standardization (ISO) 1101 [30], the surface profile error can be defined by the minimum diameter covering all measured points of the cluster spheres in which centers lie on the source model. Let \(M_{source}\) be source model and \(M_{target}\) be target model. The key points can be selected from the measured model \(M_{target}\) by using many methods, such as K-nearest neighbors (KNN) search, Least Squares (LS), etc. The deviation between the source surface \(\mathbf{S}\) and the \(i\)-th key point \(P_{i}^{key}\) is defined by the minimum Euclidean distance from \(P_{i}^{key}\) to the closest point \(\mathbf{S}(u_{i},v_{i})\) on the model surface \(\mathbf{S}\). \[P_{i}^{key}=\left[x_{i}^{key},y_{i}^{key},z_{i}^{key}\right]^{T},\ \ i\in[1,n] \tag{26}\]  
\[\mathbf{S}(u_{i},v_{i})=\left[x(u_{i},v_{i}),y(u_{i},v_{i}),z(u_{i},v_{i}) \right]^{T},\ u\in[0,1],v\in[0,1]. \tag{27}\]  
The closest point \(\mathbf{S}(u_{i},v_{i})\) can be searched by solving the minimum distances. \[\underset{(u,v_{i})}{\text{Arg min}}\left(\sqrt{\left(x_{i}^{key}-x(u_{i},v_{ i})\right)^{2}+\left(y_{i}^{key}-y(u_{i},v_{i})\right)^{2}+\left(z_{i}^{key}-z(u_{i},v_{ i})\right)^{2}}\right) \tag{28}\]  
Figure 5: Initialization probability \(P_{init}\) of customized layer before defect prediction using convolutional generative adversarial network with incremental \(h_{n}\), where (**a**) is concentric with \(h_{n}=0.23\); (**b**) is cross with \(h_{n}=0.23\); (**c**) is triangle with \(h_{n}=0.42\); (**d**) is tri-hexagon with \(h_{n}=0.42\); (**e**) is line with \(h_{n}=0.73\); (**f**) is grid with \(h_{n}=0.73\). Assuming that the \(i\)-th measured point is expressed as \(P_{i}=[x_{i},y_{i},z_{i}]^{T}\), and \(P_{i}^{\prime}=[x_{i}^{\prime},y_{i}^{\prime},z_{i}^{\prime}]^{T}\) is the point on the source surface S which is closest to the i-th localized measured point \(P_{i}^{*}=[x_{i}^{*},y_{i}^{*},z_{i}^{\prime}]^{T}\), the mathematical model of the surface profile error \(s_{error}\) can be described as follows:  
\[d_{i}=\|P_{i}^{*}-P_{i}^{\prime}\|_{2}, \tag{29}\]  
\[s_{error}=max[2|d_{i}|]=max\Big{\{}2\|P_{i}^{*}-P_{i}^{\prime}\|_{2}\Big{\}}, \tag{30}\]  
where \(d_{i}\) is the deviation between the i-th localized measured point and the source surface \(S\), \(\overrightarrow{P_{i}}\) is the homogeneous coordinate of \(P_{i}^{*}\), and \(\overrightarrow{P_{i}}\) is the homogeneous coordinate of the measured point \(P_{i}^{*}\). The surface profile error can be evaluated by iteratively aligning and non-rigidly deforming a measured mesh to an original source mesh. The final transformation matrix \(T\) rotates and translates the measuring coordinate system using six parameters \(\alpha\), \(\beta\), \(\underline{\gamma}\), \(\Delta\)x, \(\Delta\)y, \(\Delta\)z.