# Post processing algorithm of five coordinate linkage for spiral bevel gear NC machine tool

According to the processing principle of spiral bevel gear, to process the bevel gear on the NC machine tool shown in Figure 1, the processing of bevel gear can be completed only by ensuring that the relative motion between the milling cutter head and spiral bevel gear remains unchanged. Therefore, coordinate transformation is required, that is, the motion of the tool relative to the workpiece is transformed into the machine tool. Set the workpiece coordinate system as ∑ w = {ow IW, JW, kW}, the workpiece can rotate angle a around the coordinate axis X and angle B around the coordinate axis Y: the machine tool motion coordinate system is ∑ w = {ow IW, JW, kW}, OWOM = D; The position of the tool center C0 in the workpiece coordinate system is (xc0, yc0, zc0), and the tool axis vector t (unit vector) is (TX, ty, TZ) in the workpiece coordinate system. For the convenience of transformation, the auxiliary coordinate system Σ I = {oi II, Ji, Ki} is established to be fixedly connected with the bed, its coordinate axis II coincides with the gear axis P, and the coordinate axis Ji coincides with the JM axis of the coordinate system Σ m, as shown in Fig. 2. In the above process, the coordinate values x, y, Z, a and B of the machining machine tool shall be solved according to the tool center coordinates (xc0, yc0, zc0), the tool axis vector t and the distance d from the origin of the two coordinate systems.

The tool position data generated by tool position calculation is in the workpiece coordinate system. To convert these data into NC data, the following transformations are required. The tool position in the workpiece coordinate system is converted into NC data in the NC machining program section. In addition to coordinate translation transformation of the tool position, it is also necessary to turn the tool axis vector to the position in the same direction with the tool axis, that is, convert the position and attitude of the tool relative to the workpiece in the workpiece coordinate system Σ w in Figure 2 into the following parameters:

1) Position of cutter head center OC in machine tool coordinate system;

2) Rotation angle a of workpiece;

3) Included angle B between workpiece and tool tip plane.

For the convenience of calculation, the tool axis vector is normalized into a unit vector and moved to the workpiece coordinate origin, as shown in Figure 3. In Figure 2, the tool axis is perpendicular to the plane imomjm. In order to make the tool axis vector parallel to the tool axis, it is necessary to rotate the workpiece coordinate system Σ w counterclockwise around the axis IW α Angle to Σ I position, and then turn the workpiece coordinate system Σ m counterclockwise around JM axis β。 A can be obtained from the rotation process= α, B= β, The calculation formulas of a and B are as follows:

Next, the position of the tool center C0 in the machine tool coordinate system Σ w = {ow IW, JW, kW} after the workpiece rotates, that is, the machine tool motion coordinate values x, y, z.

The transformation matrix for translating the workpiece coordinate system to the machine tool coordinate system is:

The transformation matrix of rotating the workpiece coordinate system around the x-axis angle a is:

The transformation matrix of rotating the workpiece coordinate system around the Y axis at angle B is:

Thus, the homogeneous transformation matrix T = t3xt2xt1 from Σ w to Σ m is obtained.

Therefore, the position vector of the tool center C0 in the machine tool coordinate system Σ m is:

Expand it:

According to the above five coordinate transformation relationship, we can easily design the post-processing program of spiral bevel gear NC machining with processing tools.

For example, we have the following tool position information (x, y, z) and tool axis vector (TX, ty, TZ). The post-processing tool will call the macro definition of multi axis NC machining to process this information, then the macro definition is as follows:

Macro process = {calculate rotation angle a, calculate rotation angle B, calculate new tool center position x, y, z} output a data program block. 