## 2 Fundamentals of the AEDA  
As outlined in the previous section, this work is based on the premise that the relative location of a layer contour point can be established by comparing the local grayscale pattern around the expected or theoretical position with a previously obtained reference pattern. Each local grayscale pattern along the layer contour is influenced by various factors, such as the optical characteristics of the deposited material, the vertical distance between the target layer and the surrounding background (\(H\)), or the relative orientation (\(\theta\)) of the normal to the contour at the theoretical point (\(\overrightarrow{n}_{i}\)) and the scanning direction (\(\overrightarrow{v}\)) (Figure 1). Since the optical characteristics are unique for a given material, this factor should only be considered if different materials are to be used in the same part, which is not typically the case in MEX/P. Therefore, setting material considerations aside, the two primary factors influencing the characteristics of the grayscale pattern near a contour point (\(P_{i}\)) are \(H\) and \(\theta\). Notice that, due to its design, the CIS illuminates the scene with a series of LEDs preceding the array of photodiodes (\(\overrightarrow{a}\)), and, accordingly, the direction of the illumination opposes the scanning direction (\(-\overrightarrow{v}\)). According to the detailed view depicted in Figure 2, the CIS, moving in the direction of vector \(\overrightarrow{v}\), scans both the target layer and the background, capturing a digitized image of the part. At the position illustrated in the figure, the image ideally encompasses contour segments with two contour points (\(P_{1}\) and \(P_{2}\)), delineating the precise boundary between the target layer and the surrounding background. Figure 3 presents detailed views of actual contours obtained for different combinations of layer-to-background distances and contour orientations. At a given angle, increasing the layer-to-background distance enhances the contrast between the background itself and the target layer. This results in a less pronounced gradient at lower \(H\) values, which would become more pronounced as \(H\) increases. This issue arises from the diminishing light intensity over increasing distances due to spreading and attenuation phenomena. Consequently, the intensity of light reflected by the target layer becomes much higher than that reflected by the background. Similarly, variations in \(\theta\) shall also affect the gradient. For instance, with a \(0^{\circ}\) orientation (where the scanning direction aligns with the normal to the contour at the point), the CIS illuminates the background first without any shadows cast by the material layers above. Conversely, a \(180^{\circ}\) orientation results in the uppermost layer casting a shadow on the background zone near the contour. Intermediate orientations between these extremes yield significant variability in the intensity gradient recorded by the CIS near the contour, as depicted in Figure 3.  
Figure 1: Schematic representation of individual line capture with a CIS on an irregularly contoured part, with a uniform distance (\(H\)) between the target layer and the background. Figure 2: Idealized representation of two contour points (\(P_{1}\) and \(P_{2}\)) corresponding to a single digitized line, where the different grayscale gradients corresponding to each local contour orientation can be observed. Since the intensity gradient recorded in the image captured by the CIS varies depending on \(H\) and \(\theta\), the grayscale reference pattern can be anticipated for any given combination of both parameters (\(GRP_{H,\theta}\)). Therefore, when analyzing a manufactured layer, an analysis of the distribution of the extracted CPs near each tentative contour point can be performed to determine which CP best matches the GRP corresponding to the specific combination of \(H\) and \(\theta\).