I want to output NC code on an A axis rotary machine and I want the tool moves along the Z axis but any Y motions be converted into an angular moves around the A axis.

I'm not able to solve the problem. Can anyone give me a hint that how can I generate NC code like below example:

N1 G0 G90 X0 Y0 S2000 M3

N2 A0

N3 G43 Z40. H2

N4 G1 A1.903 F1000.

N5 Z39.997 A4.064

N6 Z39.999 A6.226

N7 Z39.996 A7.847

N8 Z39.999 A9.469

N9 Z39.998 A11.63

N10 Z39.999 A13.792

N11 Z39.997 A15.413

N12 Z40. A17.035

N13 Z39.999 A19.196

N14 Z39.998 A21.358

N15 Z39.999 A22.979

N16 Z40. A24.06

N17 Z39.995 A25.681

N18 Z40. A27.303

N19 Z39.998 A29.464

N20 Z40. A31.626

N21 Z39.997 A33.788

N22 Z39.999 A35.409

N23 Z40. A37.571

My Catia generate NC code like below:

N1 G0 G90 X0 Y0 S2000
M3

N2 A0

N3 G43 Z20. H2

N4 G1 Y.001 A-4.43 F1000.

N5 Y-.001 A-8.85

N6 Y0 A-13.28

N7 Y-.002 A-17.7

N8 Y0 A-22.13

N9 Y.001 A-26.56

N10 Y-.001 A-30.98

N11 Y0 A-35.41

N12 Y.001 A-39.84

N13 Y-.001 A-44.26

N14 Y.001 A-48.69

N15 Y-.002 A-53.11

N16 Y0 A-57.54

N17 Y.001 A-61.97

N18 Y-.001 A-66.39

N19 Y0 A-70.82

N20 Y.001 A-75.25

N21 Y-.001 A-79.67

N22 Y.001 A-84.1

N23 Y-.002 A-88.52