齒輪范成程序MATLAB代碼_第1頁
齒輪范成程序MATLAB代碼_第2頁
齒輪范成程序MATLAB代碼_第3頁
齒輪范成程序MATLAB代碼_第4頁
齒輪范成程序MATLAB代碼_第5頁
已閱讀5頁,還剩3頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、本人經過一個月的努力,寫出了以下齒輪展成程序,是matlab格式的。只要按照附圖的標注定義出滾刀刀齒的形狀,指定程序模擬的精度,就可以模擬出滾刀滾切齒輪的圖形.下圖為程序中定義刀具的尺寸示意圖以下為源程序%shape of hob%input areacls;alpha=deg2rad(21); %壓力角alphaf=deg2rad(31); %齒頂倒角壓力角W0=1.85; %節(jié)圓半齒寬H=6; %全齒高ha0=3; %齒頂高hf0=1.44; %齒根倒角起點高度H1=0.064; %觸角厚度hc=1.3; %觸角高度ht=0.65; %觸角凸部的高度rc=0.6; %齒頂圓角半徑R=30;

2、 %工件分度圓半徑P=7.54; %刀具齒距N=2; %刀齒數amount=10; %每段線上取點的個數step=100; %計算步數range=-pi*0.15,pi*0.15;%計算范圍%location of key-point yr=ha0-rc; %齒頂圓角圓心xr=W0+(H1-rc)/cos(alpha)-yr*tan(alpha);point=zeros(6,2);point(1,2)=ha0;point(1,1)=xr;point(2,2)=ha0-rc*(1-sin(alpha);point(2,1)=xr+rc*cos(alpha);point(3,2)=ha0-ht;p

3、oint(3,1)=(W0+H1/cos(alpha)-(ha0-ht)./cot(alpha);point(4,2)=ha0-hc;point(4,1)=W0-point(4,2)*tan(alpha);point(5,2)=-hf0;point(5,1)=W0-tan(alpha)*point(5,2);point(6,2)=ha0-H;point(6,1)=point(5,1)-tan(alphaf)*(point(6,2)-point(5,2);%-直線部分-theta=linspace(range(1),range(2),step);w11=linspace(point(4,1),p

4、oint(5,1),amount);h11=linspace(point(4,2),point(5,2),amount);w12=repmat(w11,1,step);h12=repmat(h11,1,step);theta2=repmat(theta,amount,1);x12=(h12-R).*sin(theta2)+(R.*theta2-w12).*cos(theta2);y12=(R.*theta2-w12).*sin(theta2)+(R-h12).*cos(theta2);theta13=(w11-h11/tan(alpha)/R;x13=sin(theta13).*(h11-R)

5、+cos(theta13).*(R.*theta13-w11);y13=sin(theta13).*(R*theta13-w11)+cos(theta13).*(R-h11);%-圓角部分-gama=linspace(pi/2,alpha,amount);w21=(xr+rc.*cos(gama);h21=(yr+rc.*sin(gama);w22=repmat(w21,1,step);h22=repmat(h21,1,step);x22=(h22-R).*sin(theta2)+(R.*theta2-w22).*cos(theta2);y22=(R.*theta2-w22).*sin(the

6、ta2)+(R-h22).*cos(theta2);theta23=(xr-yr.*cot(gama)/R);x23=sin(theta23).*(h21-R)+cos(theta23).*(R.*theta23-w21);y23=sin(theta23).*(R*theta23-w21)+cos(theta23).*(R-h21);rmin=R;for i=1:(length(x23)-2)XX,YY,RR=threepointcircle(x23(i),y23(i),x23(i+1),y23(i+1),x23(i+2),y23(i+2);if RRrmin rmin=RR;endend%-

7、凸角部分-w31=linspace(point(2,1),point(3,1),amount);h31=linspace(point(2,2),point(3,2),amount);w32=repmat(w31,1,step);h32=repmat(h31,1,step);theta2=repmat(theta,amount,1);x32=(h32-R).*sin(theta2)+(R.*theta2-w32).*cos(theta2);y32=(R.*theta2-w32).*sin(theta2)+(R-h32).*cos(theta2);theta33=(w31-h31/tan(alph

8、a)/R;x33=sin(theta33).*(h31-R)+cos(theta33).*(R.*theta33-w31);y33=sin(theta33).*(R*theta33-w31)+cos(theta33).*(R-h31);%-連接部分-alpha2=atan(point(4,1)-point(3,1)/(point(3,2)-point(4,2);w41=linspace(point(3,1),point(4,1),amount);h41=linspace(point(3,2),point(4,2),amount);w42=repmat(w41,1,step);h42=repma

9、t(h41,1,step);theta2=repmat(theta,amount,1);x42=(h42-R).*sin(theta2)+(R.*theta2-w42).*cos(theta2);y42=(R.*theta2-w42).*sin(theta2)+(R-h42).*cos(theta2);theta43=(w41-h41/tan(alpha2)/R;x43=sin(theta43).*(h41-R)+cos(theta43).*(R.*theta43-w41);y43=sin(theta43).*(R*theta43-w41)+cos(theta43).*(R-h41);%-倒角

10、部分-alpha3=atan(point(6,1)-point(5,1)/(point(5,2)-point(6,2);w51=linspace(point(5,1),point(6,1),amount);h51=linspace(point(5,2),point(6,2),amount);w52=repmat(w51,1,step);h52=repmat(h51,1,step);theta2=repmat(theta,amount,1);x52=(h52-R).*sin(theta2)+(R.*theta2-w52).*cos(theta2);y52=(R.*theta2-w52).*sin

11、(theta2)+(R-h52).*cos(theta2);theta53=(w51-h51/tan(alpha3)/R;x53=sin(theta53).*(h51-R)+cos(theta53).*(R.*theta53-w51);y53=sin(theta53).*(R*theta53-w51)+cos(theta53).*(R-h51);%-全刀齒-w6=w21;w31;w41;w11;w51;h6=h21;h31;h41;h11;h51;w6=flipud(w6);h6=flipud(h6);w6=w6;-flipud(w6);h6=h6;flipud(h6);w62=w6;h62=

12、h6;for i=2:N w62=w6+(i-1)*P;w62; h62=h6;h62;endtheta6=repmat(theta,5*amount*2*N,1);w62=repmat(w62,1,step);h62=repmat(h62,1,step);x62=(h62-R).*sin(theta6)+(R.*theta6-w62).*cos(theta6);y62=(R.*theta6-w62).*sin(theta6)+(R-h62).*cos(theta6);%-figure;plot(x12,y12);hold on;grid on;axis equal;plot(x22,y22)

13、;plot(x32,y32);plot(x42,y42);plot(x52,y52);figure;plot(x12,y12);hold on;grid on;axis equal;plot(x22,y22);plot(x32,y32);plot(x42,y42);plot(x52,y52);figure;plot(x13,y13);hold on;grid on;axis equal;plot(x23,y23,o);plot(x33,y33,*);plot(x43,y43,.);plot(x53,y53,+);figureplot(x12,y12);hold on;grid on;axis

14、equal;plot(x22,y22);plot(x32,y32);plot(x42,y42);plot(x52,y52);plot(x13,y13,*);plot(x23,y23,*);plot(x33,y33,*);plot(x43,y43,*);plot(x53,y53,*);figureplot(w62,h62);hold on;grid on;axis equal;figureplot(x62,y62);hold on;grid on;axis equal;以下為角度轉化為弧度的子程序function rad=deg2rad(deg)rad=deg./180.*pi;以下為計算最小圓弧半徑的子程序function x,y,r=threepointcircle(x1,y1,x2,y2,x3,y3)k12=(x2-x1)/(y1-y2);k23=(x3-x2)/(y2-y3);x=(y2+y3-y1-y2)/2+k12*(x1+x2)/2-k23*(x2+x3)/2)/(k12-k

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論