## 3 Four-Axis Machining Strategy of Five-Axis Machine Tool
### Interpolation Algorithm  
The fundamental concept underlying the tool path interpolation algorithm is to identify and determine one or more interpolation points located between two adjacent points on the five-axis tool path. This method aims to transform the motion of the machine tool between trajectory points from a five-axis linkage trajectory into a four-axis linkage trajectory. This requires the motion of a certain axis of motion to be determined by the point of interpolation. As outlined in the second section, the positional value of the tool center is influenced by the rotational and linear axis motion, while the rotational axis movement solely affects the size of the tool axis. When the movements of a specific linear axis are restricted, the impact of the rotation axis on the positional coordinate cannot be controlled, resulting in significant alterations to the tool path trajectory. If the rotation of a rotating shaft is restricted, the change in the position of the center of the tool caused by the rotating shaft can be compensated for by other linear axes. In summary, the fundamental concept behind the interpolation algorithm is to interpolate between two points on the five-axis trajectory. By constraining one of the rotational axes, the five-axis trajectory can become a four-axis trajectory. However, as the focus of the tool path algorithm is the CAM software's tool path file, the comprehensive planning of the algorithm can be divided into three core parts. Firstly, it is necessary to analyze the format of the tool file exported by the CAM's automatic programming software and extract the tool position data from the tool file. Secondly, it is crucial to judge whether adjacent tool sites are interpolated. Subsequently, calculating the tool center coordinates and tool axis vector is essential, and the interpolated data need to be integrated to simulate the interpolated tool path. Finally, after processing the new tool data, it is essential to write it into the tool position file following the structure of the initial tool position format, resulting in the creation of a new tool position file. Figure 6 illustrates the process of implementing the interpolation algorithm. Figure 5: Comprehensive strategy diagram of the four-axis machining approach of the five-axis machine tool. To ensure the continuity and smoothness of tool path, it is vital to utilize interpolation theory to interpolate the linear tool center point and rotate the axis by employing the point comparison method and maintaining even step sizes. To interpolate NC machine tools, the linear interpolation method is typically utilized. In order to ensure continuity of the interpolation trajectory, linear interpolation is carried out for the center point of the tool. At the same time, to facilitate the transformation from five-axis linkage to four-axis linkage, one rotation axis remains unchanged during interpolation, while another rotational axis rotates by half the difference between adjacent five-axis points. The number of interpolation points has a direct impact on processing efficiency. In order to align the coordinates of the five-axis machine tool to the four-axis machine tool, the number of interpolation points is 2. The schematic diagram displaying the tool center point interpolation process is available in Figure 7a. The five-axis tool positions M and N require the addition of two new points, C\({}_{11}\) and C\({}_{21}\). The tool position data for tool position M are given by \((x_{0},y_{0},z_{0},i_{0},j_{0},k_{0})\), while the tool position data of the tool position N is \((x_{1},y_{1},z_{1},i_{1},j_{1},k_{1})\). To guarantee an even step length, the interpolated points C\({}_{11}\) and C\({}_{21}\) should be uniformly distributed along the linear interpolation paths of M and N. The tool axis vector interpolation process is shown in Figure 7b. The axis displacement values for tool center points M and N are \((X_{0},Y_{0},Z_{0},B_{0},A_{0})\) and \((X_{1},Y_{1},Z_{1},B_{1},A_{1})\), respectively.