还剩4页未读,继续阅读
文本内容:
本人经过一个月的努力,写出了以下齿轮展成程序,是格式的matlab只要按照附图的标注定义出滚刀刀齿的形状,指定程序模拟的精度,就可以模拟出滚刀滚切齿轮的图形.以下为源程序会shape ofhob%input areacis;%压力角alpha=deg2rad21;齿顶倒角压力角alphaf=deg2rad31;8密节圆半齿宽*全齿高W0=
1.85;既齿顶高H=6;ha0=3;齿根倒角起点高度8hf0=
1.44;%触角厚度Hl=
0.064;告触角高度hc=
1.3;%触角凸部的高度ht=
0.65;齿顶圆角半径rc=
0.6;8%工件分度圆半径R=30;为刀具齿距P=
7.54;*刀齿数N=2;每段线上取点的个数amount=10;8%计算步数step=100;;当计算范围range=[-pi*
0.15,pi*
0.15]%location ofkey-point金齿顶圆角圆心yr=haO-rc;xr=W0+Hl-rc/cosalpha-yr*tanalpha;point=zeros6,2;point1,2=haO;point1,1=xr;point2,2=haO-rc*1-sinalpha;point2,1=xr+rc*cosalpha;point3,2=haO-ht;point3,1=WO+Hl/cosalpha-haO-ht./cotalpha;point4,2=haO-hc;point4,1=W0-point4,2*tanalpha;point5,2=-hf0;point5,1=W0-tanalpha*point5,2;point6,2=haO-H;point6,1=point5,1-tanalphaf*point6,2-point5,2;%------------------------直线部分---------------------------⑵,theta=linspace range1,range step;wll=linspacepoint4z1,point5,1,amount,;hll=linspacepoint4,2rpoint5,2,amount;wl2=repmatwllz1,step;h12=repmathllz1,step;theta2=repmattheta,amount,1;xl2=hl2-R.*sintheta2+R.*theta2-wl
2.*costheta2;yl2=R.*theta2-wl
2.*sintheta2+R-hl
2.*costheta2;thetal3=wll-hll/tanalpha/R;xl3=sinthetal
3.*hll-R+costhetal
3.*R.*thetal3-wll;yl3=sin thetal
3.*R*thetal3-V711+cos thetal
3.*R-hll;%---------------------圆角部分----------------gama=linspacepi/2,alpha,amount;w21=xr+rc.*cosgama1;h21=yr+rc.*singama,;w22=repmatw21z1,step;h22=repmath21z1,step;x22=h22-R.*sintheta2+R.*theta2-w
22.*costheta2;y22=R.*theta2-w
22.*sintheta2+R-h
22.*costheta2;theta23=xr-yr.*cotgama/R1;x23=sintheta
23.*h21-R+costheta
23.*R.*theta23-w21;y23=sintheta
23.*R*theta23-w21+costheta
23.*R-h21;rmin=R;for i=l:lengthx23-2[XX,YY,RR]=threepointcirclex23i,y23i,x23i+1zy23i+1zx23i+2,y23i+2;if RRrminrmin=RR;endend%-----------------凸角部分----------------------------------w31=1inspacepoint2,1,point3,1zamount,;h31=1inspacepoint2,2,point3,2,amount;w32=repmatw31,1,step;h32=repmath31,1,step;theta2=repmattheta,amount,1;x32=h32-R.*sintheta2+R.*theta2-w
32.*costheta2;y32=R.*theta2-v;
32.*sin theta2+R-h
32.*cos theta2;theta33=w31-h31/tanalpha/R;x33=sintheta
33.*h31-R+costheta
33.*R.*theta33-w31;y33=sintheta
33.*R*theta33-w31+costheta
33.*R-h31;%连接部分alpha2=atanpoint4,1-point3,1/point3,2-point4,2;w41=linspacepoint3,1,point4,1,amount,;h41=linspacepoint3,2,point4,2,amount1;1,w42=repmatw41z step;X,h42=repmath41z step;theta2=repmattheta,amount,1;x42=h42-R.*sintheta2+R.*theta2-w
42.*cos theta2;y42=R.*theta2-w
42.*sintheta2+R-h
42.*costheta2;theta43=w41-h41/tanalpha2/R;x43=sintheta
43.*h41-R+costheta
43.*R.*theta43-w41;y43=sin theta
43.*R*theta43-v/41+cos theta
43.*R-h41;%-------------倒角部分-----------------------------alpha3=atanpoint6,1-point5,1/point5,2-point6,2;w51=linspacepoint5,1,point6,1,amount1;h51=linspacepoint5,2,point6,2,amount1;w52=repmatw51,1,step;h52=repmath51,1,step;theta2=repmattheta,amount,1;x52=h52-R.*sintheta2+R.*theta2-w
52.*costheta2;y52=R.*theta2-w
52.*sintheta2+R-h
52.*costheta2;theta53=w51-h51/tanalpha3/R;x53=sintheta
53.*h51-R+costheta
53.*R.*theta53-w51;y53=sintheta
53.*R*theta53-w51+costheta
53.*R-h51;%-------------------全刀齿---------------------w6=[w21;w31;w41;wll;w51];h6=h21;h31;h41;hll;h51];w6=flipudw6;h6=flipudh6;w6=w6;-flipudw6];h6=h6;flipudh6;w62=w6;h62=h6;for i=2:Nw62=[w6+i-1*P;w62];h62=[h6;h62];endtheta6=repmattheta,5*amount*2*Nz1;1,w62=repmatw62z step;1,h62=repmath62z step;x62=h62-R.*sintheta6+R.*theta6-w
62.*cos theta6;y62=R.*theta6-v/
62.*sin theta6+R-h
62.*cos theta6;%figure;plotxl2z yl2;hold on;grid on;axis equal;plotx22/y22;plotx32,y32;plotx42z y42;plotx52,y52;figure;plotxl2,,yl2,;hold on;grid on;axis equal;plotx22,y22;plotx32,,y32,;plot x42,y42;plot x52,y52;figure;plotxl3,yl3;hold on;grid on;axis equal;plotx23z y23zo plotx33zy33,**,plotx43zy43z
1.1plotx53zy53z+figureplotxl2,yl2;hold on;grid on;axis equal;plotx22zy22;plotx32,y32;plotx42,y42;plotx52,y52;plotxl3,yl3,*plotx23,y23,*plotx33,y33,*plotx43,y43z*plotx53z y53,*figureplotw62z h62;hold on;grid on;axis equal;figureplotx62z y62;hold on;grid on;axis equal;以下为角度转化为弧度的子程序function rad=deg2raddeg rad=deg./
180.*pi;以下为计算最小圆弧半径的子程序function x,y,r=threepointcirclexl,yl,x2,y2,x3,y3kl2=x2-xl/yl-y2;k23=x3-x2/y2-y3;x=y2+y3-yl-y2/2+kl2*xl+x2/2-k23*x2+x3/2/kl2-k23;y=kl2*x-xl+x2/2+yl+y2/2;r=x-xlA2+y-ylA2A
0.5;以下为程序运行输出的图形一个刀刃的展成过程1,
二、刀刃上各个出蟠动轨迹2,1力Figure I.°I、FileEditViewInsertToolsDesktopWindowHelp口」Cl蛤[QI虱二二3骐/,I◎|□E■DI❶Notenewtoolbarbuttons:databrushinglinkedplots/®Plavvideox3736353433323130292827-8-6刀刃上各段切3,削力分别所展成的齿形段两图合二为一4,刀齿的形状5,多个刀齿展成的情形6,7,将图放大观察,也许是渐开线起始点的位置吧6小回QFigure611=、AleEditViewInsertToolsDesktopWindowHelp□要/一@|口目|■口❶Notenewtoolbarbuttons:databrushing同linked3/,layA»videoX B--1第…------—r-------------3029529_____.......幅
28.
52827.5-3-
2.5-2-
1.5-1-
0.
500.5以上就是程序代码及输出的结果欢迎批评指正分享经验,交流心得,共同进步有意交流的并说明来意+Q252320995李某人于重庆璧山2013/6/30。
个人认证
优秀文档
获得点赞 0