## 2 Materials and Methods
### Concept of Mirror Compensation  
In this study, the mirror compensation method was used to compensate for the errors of free-form surface machining. The compensation method was used after the semi-finishing machining was completed. The on-machine measurement was made on the semi-finishing surfaces to obtain the actual semi-finishing surface. Then, a mirror surface was introduced to mirror the actual semi-finishing surface to obtain the finishing surface for error compensation. The mirror surface is the mid-surface between the ideal semi-finishing surface and the ideal finishing surface, as indicated in Figure 6. This method finds where there is an undercut and where there is an overcut after semi-finishing machining. As illustrated in Figure 6, an undercut indicates that the remaining amount of material has exceeded the expected amount of material; an overcut indicates that the remaining amount of material has fallen short of the expected amount of material. Afterward, the semi-finishing surface is mirrored. The undercut locations on the semi-finishing surface will receive overcut during the finishing machining; the overcut locations will receive undercut during the finishing machining. As a result, after finishing machining, the machined surface is expected to approach the expected ideal surface or the target surface.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \multicolumn{5}{c}{**Surface One**} \\ \hline  & Studio Surface & Fit Surface & Through & Through Curve & \\  & & & Curves & Mesh & \\ \hline \(d_{1}\) & 0.3 & 0.8 & 0.3 & 0.3 & 0 \\ \(d_{2}\) & 0.4 & 4.1 & 0.4 & 0.4 & 0.4 \\ \hline \multicolumn{5}{c}{**Surface Two**} \\ \hline  & Studio Surface & Fit Surface & Through & Through Curve & \\  & & & Curves & Mesh & \\ \hline \(d_{1}\) & 0 & 0.1 & 0 & 0 & 0 \\ \(d_{2}\) & 0.5 & 0.6 & 0.8 & 0.2 & 0.8 \\ \hline \multicolumn{5}{c}{**Surface Three**} \\ \hline  & Studio Surface & Fit Surface & Through & Through Curve & \\  & & & Curves & Mesh & \\ \hline \(d_{1}\) & 0 & 0.2 & 0 & 0 & 0 \\ \(d_{2}\) & 0.4 & 3.0 & 0.6 & 0.1 & 0.6 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of the five surface fitting functions in NX. Unit \(\upmu\)m.  
Figure 6: Illustration of the mirror compensation method.  
How to use the mirror compensation method to find the compensation points is illustrated in Figure 7. First, we defined our ideal point \(P_{P}\) on the ideal finishing surface \(S_{F}\). Then, we could obtain the normal vector \(\mathbf{V_{N}}\) at \(P_{P}\) on the ideal finishing surface \(S_{F}\). As explained previously, the mirror surface is the mid-surface between the ideal semi-finishing surface and the ideal finishing surface. Therefore, the distance \(D_{H}\), which is half of the stock for the semi-machining, from \(P_{P}\) to the mirror surface is known. Then Equation (1) can be used to find \(P_{M}\) on the mirror surface. As long as \(P_{M}\) is known, the distance \(D_{M}\) from \(P_{M}\) to \(P_{R}\) can be readily obtained, as can the compensation point \(P_{C}\) by using Equation (2).  
\[P_{M}=P_{P}+D_{H}\mathbf{V_{N}}. \tag{1}\]  
\[P_{C}=P_{R}-2D_{M}\mathbf{V_{N}}. \tag{2}\]  
In the following analysis, the distance between \(P_{R}\) to \(P_{P}\) was used as the error for semi-finishing machining, and the distance from the actual measurement point after finishing machining to point \(P_{P}\) was used as the error for finishing machining.