## 2 Methodology Setup
### Measurement Data Processing  
The confocal probe measurement data usually need to be combined with the probe motion position coordinates to construct a 3D point cloud. For this reason, a common method is to integrate the confocal probe on the displacement motion platform; the probe triggers the stages to jointly record the 3D measurement data in real time, thereby realizing the reconstruction of the surface. Therefore, the higher the positioning accuracy of the stages, the more accurate the reconstructed measured 3D surface. However, the measurement method of external trigger synchronous acquisition makes the measurement system inefficient, and means there are higher requirements for a high-precision displacement motion platform, which can be expensive. Alternatively, the synchronization of time can be achieved by software programming, but due to the disturbance in data transmission, it is difficult to ensure the synchronous action of the confocal probe and the displacement platform from the software. Based on the measurement method described in Section 2, a data processing algorithm that does not need to record the (x, y) coordinates of each measurement in real time was proposed. The algorithm flow is shown in Figure 2. Firstly, the DOE design model was unfolded to obtain the reference profile of the diffraction structure, and the original measured data were pre-processed by filtering. Secondly, the measurement data were iteratively matched with the diffraction structure model data to ensure that the measurement data crossed the central vertex of the base and the matching accuracy was optimal. Finally, the measured data were reconstructed by DOE. Figure 1: A schematic diagram for the measurement of a curved substrate diffractive optical elements (DOE). The algorithm only needed to record the position coordinates of the starting point and the end point of the measurement path, and could obtain the geometrical information of the surface contour of the measured DOE, and realize the complete 3D surface reconstruction and 2D contour information extraction of the DOE. During the measurement procedure, the confocal probe collected measurement data at a constant speed and sampling frequency along the centerline of the DOE's base contour, so the obtained measurement data contained height information \"unfolded\" along the design basis of the workpiece to be measured. In other words, the curved base was extended into a plane. Therefore, in order to obtain the correct measurement data to evaluate the tooth height and pitch of a DOE, the measurement data should be \"restored\" back to the design model with the actual coordinate information, but there will be some inevitable problem when the measured piece is fixed. Tilting and misalignment resulted in a certain slope of the measured data, and the mapping relationship between the measured data and the design model was complicated. It was difficult to restore the measured data directly to the design model, and the measurement error brought about by direct reduction was often very large. Considering the above problems, this paper chose to unfold the design model of DOEs along the centerline of the substrate, and obtained the matching relationship between the measured data and the design model data by matching the measured data with the unfolded model data, and then obtained the measured data containing the actual dimension information. The principle for unfolding the centerline of the model base was to unfold all the design data points into a straight line. The base equation was \(F(r,\,y)\), and we set the position coordinates of two adjacent points on the DOE's base to be \(a(r_{1},\,y_{1})\) and \(b(r_{2},\,y_{2})\). The set coordinates of the points  
Figure 2: Flowchart for processing chromatic confocal probe measured data by the proposed algorithm. corresponding to the two points on the design surface were \(A(r_{1},\,Y_{1})\) and \(B(r_{2},\,Y_{2})\).