资源描述:
《大三机械设计课程设计vb》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、PrivateSubCommand1_Click(IndexAsInteger)DimdblWPAsDouble,dblHPAsDouble,iAsIntegerdblWP=Abs(Picture1(0).ScaleWidth)dblHP=Abs(Picture1(0).ScaleHeight)Fori=0To5Picture1(i).ClsPicture1(i).ScaleMode=1Picture1(i).DrawStyle=0Picture1(i).DrawWidth=1.5Picture1(i).Sc
2、ale(-120,dblHP/2)-(dblWP-120,-dblHP/2)Picture1(i).Line(0,0)-(dblWP-160,0)Picture1(i).Line(dblWP-160,0)-Step(-120,120)Picture1(i).Line(dblWP-160,0)-Step(-120,-120)Picture1(i).CurrentX=dblWP-700Picture1(i).CurrentY=250Picture1(i).Print"f_AB"Picture1(i).Curren
3、tX=-120Picture1(i).CurrentY=-10Picture1(i).Print"0"Picture1(i).Line(0,dblHP/2-60)-(0,-(dblHP/2-60))Picture1(i).Line(0,dblHP/2-60)-Step(-120,-120)Picture1(i).Line(0,dblHP/2-60)-Step(120,-120)Picture1(i).CurrentX=160Picture1(i).CurrentY=dblHP/2-60Ifi<>0ThenPi
4、cture1(i).FontName="mssansserif"SelectCaseiCase0Picture1(i).Print"f_CD"Case1Picture1(i).Print"w_CD"Case2Picture1(i).Print"e_CD"Case3Picture1(i).Print"s_E"Case4Picture1(i).Print"v_E"Case5Picture1(i).Print"a_E"EndSelectNextiDimdblMax_f_CDAsDouble,dblMax_w_CDA
5、sDouble,dblMax_e_CDAsDoubleDimdblMax_s_EAsDouble,dblMax_v_EAsDouble,dblMax_a_EAsDoubleDimdblF_CD,dblW_CD,dblE_CDAsDoubleDimdblS_E,dblV_E,dblA_EAsDoubleDimdblF_AB,dblF_DEAsDoubleDimdblABAsDouble,dblCDAsDouble,dblDEAsDouble,dblACAsDouble,dblHAsDouble,dblSEAsD
6、ouble,dbldf_CDAsDoubleDimPIAsDoublePI=3.1415926dblAB=Val(Form1.Text1.Text)dblCD=Val(Form1.Text2.Text)dblDE=Val(Form1.Text3.Text)dblAC=Val(Form1.Text4.Text)dblH=Val(Form1.Text5.Text)dbln1=Val(Form1.Text6.Text)Fori=0To360dblF_AB=i*PI/180dblF_CD=Atn((dblAC+dbl
7、AB*Sin(dblF_AB))/(dblAB*Cos(dblF_AB)))IfdblF_CD<0ThendblF_CD=dblF_CD+PIdblW_CD=dblAB*(2*PI*dbln1/60)*Cos(dblF_AB-dblF_CD)/Sqr(Abs(dblAB*dblAB+dblAC*dblAC+2*dblAC*dblAB*Sin(dblF_AB)))dblE_CD=(-dblAB*(2*PI*dbln1/60)*(2*PI*dbln1/60)*Sin(dblF_AB-dblF_CD)+2*dblA
8、B*(2*PI*dbln1/60)*Sin(dblF_AB-dblF_CD)*dblW_CD)/Sqr(Abs(dblAB*dblAB+dblAC*dblAC+2*dblAC*dblAB*Sin(dblF_AB)))dblF_DE=Atn(((dblH-dblCD*Sin(dblF_CD))/dblDE)/Sqr(Abs(1-(dblH-dblCD*Sin(dblF_CD))*(dblH-dblCD