GS(攻丝)
N05 G00 G54 G90 Z100 N10 X0 Y0
N15 M03 S50 F125
N20 MCALL CYCLE840(100,0,5,-55,,,4,3,1) N25 HOLES2(0,0,300,100,10,35) N30 MCALL
N35 G00 Z100 M05 M02
椭圆参数方程:X=30×COS(Θ) Y=20×SIN(Θ) 程序如下 O0001 R1=0
N005 G00 G54 G90 Z100 N010 X60 Y0
N015 M03 S600 F500 N020 Z-5
N025 G42 X45 Y-15
N030 G02 X30 Y0 CR=15 AA: R1=R1+1
N035 G01 X=30*COS(R1) Y=20*SIN(R1) N040 IF R1<360 GOTOB AA
N045 G02 X45 Y15 CR=15 N050 G00 G40 X60 Y0 N055 Z200 M05 M30
G54 X0 Y0 孔中心,Z0 上表面。 R4:角度变量(0°~90°) X=17-COS(R4)*6 Z=6*(SIN(R4)-1) 程序
DYJ(倒圆角) N05 R4=0
N10 G00 G54 G90 Z100 N15 X0 Y0
N20 Z3 M03 S4000 F1000 AA:R4=R4+2
N25 G01 Z=6*(SIN(R4)-1) N30 X=17-COS(R4)*6
N35 G02 I= COS(R4)*6-17 N40 IF R4<90 GOTOB AA N45 G00 Z100 M05 N50 M02
程序(使用变量)
DYJ(倒圆角) R1=倒角孔直径 R2=倒角圆半径 R3=刀半径 R4=角度变量
N05 G00 G54 G90 Z200 N10 X0 Y0
N15 Z3 M03 S4000 F2000 AA:R4=R4+2 N20 G01 Z=(SIN(R4)-1)*(R2+R3) N25 X=R1/2+R2-COS(R4)*(R2+R3) N30 G02 I=COS(R4)*(R2+R3)-R1/2-R2 N35 IF R4<90 GOTOB AA N40 G00 Z100 M05 M02
XYZ
N05 T1 G17
N10 R1=0.01 R2=0
N15 G00 G54 G90 Z100 N20 X40 Y0 N25 Z=R2
N30 M3 S2000 F1000 AA: G01 G42 X=R1 D1 N35 G03 I-R1
N40 R1=R1+0.5 R2=R2-1 N45 G40 G01 X=40 Z=R2 N50 IF R1<25 GOTOB AA N55 G00 Z100 M5 M02
设定;Φ20中心为X0、Y0。 25尺寸右端为Z0。
使用Φ20、R0.8平面铣刀加工。 程序: AAA N05 T1
N10 G00 G54 G90 Z100 N15 X0 Y0
N20 M03 S3000 F500 N25 Z5
N30 G01 G41 X10 Y0 D1 N35 Z0
N40 G02 X10 Y0 Z-15 I-10 J0 TURN=14 N45 I-10
N50 G01 G40 X40 N55 Y5 N60 R1=0
BB:R1=R1+0.5
N65 Z=-15-COS(R1)×10
N70 G01 G41 X=10+SIN(R1)×10 D1 N75 Y0
N80 G02 I=-10- SIN(R1)×10 N85 G01 Y-5 N90 G40 X40 N95 Y5
N100 IF R1<90 GOTOB BB N105 G00 Z100 M05 M02