## 2 Measurement of Complete Geometric Errors
### Geometric Error Transfer Modeling based on HTM  
According to the Figure 12, the homogeneous coordinates of the workpiece and the tool are obtained as Equations (12) and (13):  
\[T_{W}^{ideal}=T_{C}^{ideal}\Big{[} \begin{array}{cc}x_{w}&y_{w}&z_{w}\\ \end{array} \Big{]}^{T},\text{ and} \tag{12}\]  
\[T_{T}^{ideal}=T_{X}^{ideal}T_{Z}^{ideal}T_{A}^{ideal}T_{Y}^{ideal}T_{B}^{ideal} \left[ \begin{array}{c}x_{t}\\ y_{t}\\ z_{t}\\ \end{array} \right], \tag{13}\]  
where \(T_{X}^{ideal}\), \(T_{Y}^{ideal}\), \(T_{Z}^{ideal}\), \(T_{A}^{ideal}\), \(T_{B}^{ideal}\), \(T_{C}^{ideal}\), \(T_{W}^{ideal}\) and \(T_{T}^{ideal}\) respectively represent the ideal homogeneous coordinates of X-axis, Y-axis, Z-axis, A-axis, B-axis, C-axis, the workpiece and tool. \(\left[ \begin{array}{cc}x_{w}&y_{w}&z_{w}\\ \end{array} \right]^{T}\) and \(\left[ \begin{array}{cc}x_{t}&y_{t}&z_{t}\\ \end{array} \right]^{T}\) represent the relative coordinates of the tool in the B-axis and the workpiece in the C-axis respectively. Especially, when the relative motion of the tool and workpiece is in the ideal path, their homogeneous coordinates are obtained as Equation (14):  
\[T_{W}^{ideal}=T_{T}^{ideal}. \tag{14}\]  
As is analyzed in Section 2, due to the geometric errors during the actual machining process, the points on each axis deviate from the ideal position. The resultant actual homogeneous coordinates of the workpiece and tool under actual conditions are obtained as Equations (15) and (16):  
\[T_{W}^{actual}=T_{C}^{actual}[ \begin{array}{cc}x_{w}&y_{w}&z_{w}\\ \end{array} \Big{]}^{T}, \tag{15}\]  
\[T_{T}^{actual}=T_{X}^{actual}T_{Z}^{actual}T_{A}^{actual}T_{Y}^{actual}T_{B}^{ actual}\left[ \begin{array}{c}x_{t}\\ y_{t}\\ z_{t}\\ \end{array} \right], \tag{16}\]  
where \(T_{X}^{actual}\), \(T_{Y}^{actual}\), \(T_{Z}^{actual}\), \(T_{A}^{actual}\), \(T_{B}^{actual}\) and \(T_{C}^{actual}\) represent the actual homogeneous coordinates of X-axis, Y-axis, Z-axis, A-axis, B-axis and C-axis, respectively. The difference between the actual homogeneous coordinates of the workpiece and tool is the coordinates of the actual machining point \(\text{p}_{i}\) (\(\text{x}_{i}\), \(\text{y}_{i}\), \(\text{z}_{i}\)), which can be expressed as (Equation (17)):  
\[C_{p_{i}}=T_{W}^{actual}-T_{T}^{actual} \tag{17}\]  
The machining error of the point \(\text{p}_{0}\) (\(\text{x}_{0}\), \(\text{y}_{0}\), \(\text{z}_{0}\)) to be machined on the relative motion trajectory of the tool and workpiece is obtained as Equation (18):  
\[E_{p_{0}}=C_{p_{i}}-C_{p_{0}}, \tag{18}\]  
where \(C_{p_{0}}\) and \(C_{p_{i}}\) represent the coordinates of the ideal and actual machining point, respectively. The initial homogeneous transformation matrices of each axis under ideal conditions and complete geometric errors are obtained as Equations (19)-(30):  
\[T_{X}^{ideal}=\left[ \begin{array}{cccc}1&0&0&x_{i}\\ 0&1&0&0\\ 0&0&1&0\\ 0&0&0&1\\ \end{array} \right], \tag{19}\]  
exploring the relationship between the machining posture of the tool and workpiece and the translation and rotation position of each axis. (1) The forward kinematics solution  
Forward kinematic solution aims to determine the machining point according to the motion of each axis. In this way, the complete geometric errors measured in Section 2 are integrated and converted into machining errors corresponding to the translation and rotation position of each axis. According to Equations (12), (13), and (19)-(24), the position of the tool and workpiece are obtained by Equations (31) and (32):  
\[T_{W}^{ideal}=\left[ \begin{array}{c}x_{w}\cos\gamma_{i}-y_{w}\sin\gamma_{i }\\ x_{w}\sin\gamma_{i}+y_{w}\cos\gamma_{i}\\ z_{w}\\ 1\end{array} \right], \tag{31}\]  
\[T_{T}^{ideal}=\left[ \begin{array}{c}x_{t}\cos\beta_{i}+y_{t}\sin\alpha_{i} \sin\beta_{i}+z_{t}\cos\alpha_{i}\sin\beta_{i}+x_{i}\\ y_{t}\cos\alpha_{i}-z_{t}\sin\alpha_{i}+y_{i}\\ -x_{t}\sin\beta_{i}+y_{t}\sin\alpha_{i}\cos\beta_{i}+z_{t}\cos\alpha_{i}\cos \beta_{i}+z_{i}\\ 1\end{array}