G96 G99 S150 M3
G0 X150 Z100 M8
T0101
#1=100 (Y起点)
#2=80 (Y终点)
#3=20 (Z起点)
#4=70 (Z终点)
#5=1 (进刀量)
#6=0.2 (X精车量)
#7=0.1 (Z精车量)
#8=4 (刀宽)
#9=0.15 (走刀速)
#3=
#3+#7+#8
#4=
#4-#7
G0 X[
#1+2] Z-[#3]
#100=#1
N10 if [#100LT#2+#5+#6]GOTO50
#101=#4
#100=#100-#5
G1 X#100 F#9
Z-[#101]
if [#100LT#2+#5+#6]GOTO50
#101=#3
#100=#100-#5
G1 X#100
Z-[#101]
if [#100LT#2+#5+#6]GOTO50
if [#100 GT #2+#6]GOTO10
N50
G0 x[
#1+2] Z-[#3+1]
Z-[#3]
G1X#2
Z-[#4-1]
G0X[#1+2]
g1Z-[#4]
X#2
W1
G0X[#1+2]
G0 X150 Z100
if [#6 EQ 0] GOTO60
M5
M9
M0
G96 G99 S200 F0.1 M3
T0101 M8
G0 x[
#1+2] Z-[#3+1]
Z-[#3-#7]
G1X#2
Z-[#4-0.5]
G0X[#1+2]
g1Z-[#4+#7]
X#2
W1
G0X[#1+2]
G0 X150 Z100
N60 M30