您好,欢迎访问三七文档
当前位置:首页 > 高等教育 > 工学 > 清华大学土木工程CAD技术基础课件06人机交互技术
6-16-26-36-46-56-1CADCAD6-2?DELETE1TO100//11001.1.1Pmin(Xmin,Ymin)Pmax(Xmax,Ymax)1.2XYNxNy1.3for(i=1;iNy;i++){for(j=1;jNx;j++){IP[i][j]=j+(i1)*Nx;}}2.2.1x,y2.2x,yRxRyRxX-XminRy=Y-Ymax2.3Dx=(XmaxXmin)NxDy=(YmaxYmin)NyCol=(int)(RxDx)+1Row=(int)(RyDy)+1Num=IP[Row][Col]2.4x,yxXmin,Xmax;yYmin,YmaxNum=13.NumAutoCADAutoCADAutoCAD.mnuAutoCADmnumnumnsmncAutoCAD.mns.mnsAutoCAD.mnsLISPAutoLISPmnl.mnl.mnlMC.EXE.mnd.mnrAutoCAD.mncAutoCADmnumncmnrmns.mnuAutoCAD.mnuAutoCADAutoCADARXAutoLISPAutoCADmenuacad.mnumenumenumenuloadmenuloadTools“CustomizeMenus”menuloadmenuunloadAutoCAD***MENUGROUP***SCREEN***POP0***POPnnn=1-17***IMAGE***TABLETnnn=1-4)***ACCELERATORS***HELPSTRINGS[]**subname$section=subname$S=subname$S=$I=subnameS=*“\”“;”“+”“^”“^I”TAB“--”“-”“-”“~”“^C”Ctrl+CAutoCAD***MENUGROUP=***POP11//**Fwcad[FWCAD][...]^C^CInit[--]//[-]//[...]^C^CDaxis[]^C^CAxisname[]^C^CEditaxis[-]^C^CDimaxis//[--][-][...]^C^CWalltemp[]^C^CMirwall[]^C^CWallbreak[]^C^CWall[-]^C^CDimwall[--][...]^C^CPart[--][-][...]^C^CInitform[]^C^CChangeform[...]^C^CSetform[-...]^C^CDrawform[--][]^C^CScriptUFWCAD***POP12//[][--][][]^c^c$i=superstr$i=*[]^c^c$i=substr$i=*[--][]^c^c(xloadame)$i=opelib$i=*[--][]^c^c$i=plant$i=*[--][]^c^c$i=temporary$i=***plant//[][plantlib(hoist,)]^c^c(loadhoist)hoist[plantlib(t-crane,)]^c^c(loadt-crane)t-crane[plantlib(m-crane,)]^c^c(loadm-crane)m-crane[plantlib(t-mixer,)]^c^c(loadt-mixer)t-mixer[plantlib(m-pump,)]^c^c(loadm-pump)m-pump[plantlib(f-pump,)]^c^c(loadf-pump)f-pump[]^c^c“mslide”,“SLD”“slidelib”SLB“SLD”,AutoCADID***MENUGROUP***POP1[]ID_1line[]^C^C_lineID_1circle[]^C^C_circleID_1text[]^C^C_text…***HELPSTRINGSID_1line[]ID_1circle[]ID_1text[]…***TOOLBARS**TOOLS1TAG1[Toolbar(tbarname,orient,visible,xval,yval,rows)]TAG2[Button(btnname,id_small,id_large)]macroTAG3[Flyout(flyname,id_small,id_large,icon,alias)]macroTAG4[Control(element)][--]TAG1[Toolbar(tbarname,orient,visible,xval,yval,rows)]tbarname(-)(_)orientFloatingTopBottomLeftRightvisibleShowHidexvalXyvalYrowsTAG2[Button(btnname,id_small,id_large)]macrobtnname(-)(_)id_small16x15id_big24x22macroTAG3[Flyout(“flyname”,id_small,id_large,icon,alias)]macroflyname(-)(_)id_small16x15id_big24x22iconOwnIconOtherIconalias**aliasnamemacroTAG4[Control(element)]element_Color_Dimstyle_Layer_Linetype_Lineweight_Refblkname_UCSManagerUCSUCS_View_ViewportScaleid_smallid_bigid_small16x15id_big24x22AutoCAD.bmpTAG34[Button(MyCommand,mycmd16.bmp,mycmd24.bmp)]^C^CMYCMDToolsCustomizeÆMenusMenuCPDS_CADToolsCustomizeÆToolbarsCPDS_CAD***TOOLBARS//**CPDS_Toolbar1//ID_CPDSTOOL1[_Toolbar(,_Floating,_Show,250,170,1)]//ID[XY]CPDS_TOOL_MTF1[_Button(,ICON_16_FLAT,ICON_24_FLAT)]^C^C$I=CPDS_CAD.CPDS_MTF1$i=*//[][--]CPDS_TOOL_MTF2[_Button(,ICON_16_BACKGR,ICON_24_BACKGR)]^C^C$i=CPDS_CAD.CPDS_MTF2$i=*[--]CPDS_TOOL_MTF3[_Button(,ICON_16_VPOTIL,ICON_24_VPOTIL)]^C^C$I=CPDS_CAD.CPDS_MTF3$i=*[--]CPDS_TOOL_MTF4[_Button(,tool_road.bmp,tool_road.bmp)]^C^C$i=CPDS_CAD.CPDS_MTF4$i=*[--]CPDS_TOOL_MTF5[_Button(,ICON_16_SOLVW,ICON_24_SOLVW)]^C^C$i=CPDS_CAD.CPDS_MTF5$i=*IR_Ir_help[_Button(IR_CADHelp...,ICON_16_HELP,ICON_24_HELP)]^C^C^PIR_HELP;^P[--]CPDS_TOOL_MTF6[_Button(,tool_device.bmp,tool_device.bmp)]^C^C$i=CPDS_CAD.CPDS_MTF6$i=*[--]CPDS_TOOL_CRANE[_Button(,tool_crane1.bmp,tool_crane1.bmp)]^C^Cinsertcrane;[--]CPDS_TOOL_CRANEATT[_Button(,tool_crane.bmp,tool_crane.bmp)]^C^Cpkblk;[--]6-3AutoCADInsert(Px,Py)123ab(Px,Py)123abvoiddrawRectangle(px,py,a,b){…}voidpositioning(){int*pt,px,py,a,b,id;pt=u_getPoint();px=*pt;py=*(pt+1);switch(id){case1:a=u_getInput();b=u_getInput();drawRectangle(px,py,a,b);case2:…}}AutoCADSnapOrthoOsnap12345oP1P2P3P4P2’P4’··12345oP1P2P3P4P2’P4’··voiddrawLine(x1,y1,x2,y2){…}voidconstraint(){int*pt,x1,y1,x2,y2,st,id;pt=u_getPoint(&st);x1=*pt;y1=*(pt+1);pt=u_getPoint();x2=*pt;y2=*(pt+1);switch(id){case1:y2=y1;case2:…}drawLine(x1,y1,x2,y2);}AutoCADGridSnap(Xmin,Ymin)(Xmin,Ymin)NyNx·P(x,y)(Xmin,Ymin)(Xmin,Ymin)NyNx…intAx[100][100];intAy[100][100];intNx,Ny,Xmin,Ymin;intXmax,Ymax,X1,Y1;intPx,Py;…for(i=0;i=Ny;i++){X1=Xmin;Y1=Ymin+i*(Ymax-Ymin)/Ny;for(j=0;j=Nx;j++){Ax[i][j]=X1+j*(Xmax-Xmin)/Nx;Ay[i][j]=Y1}}…eps=1;·P(x,y)…for(i=0;i=Ny;i++){for(j=0;j=Nx;j++){Vex=abs(Ax[i][j]-Px);Vey=abs(Ay[i][j]-Py);if(VexEps&&VeyEps){Px=Ax[i][j];Py=Ay[i][j];gotoNext;}}}Next……(Xmin,Ymin)(Xmin,Ymin)NyNx·P(x,y)123AutoCADSketch6-42131·22·32,31P0(x0,y0)P(x,y)(x-x0)2+(y-y0)2EpsEps··P0(x0,y0)P(x,y)2P1P2Ax+By+C=0A=y1-y2B=x2-x1C=Y1(x1-x2)X1(y1-y2)ddEpsEps2200BACByAxd+++=·P0(x0,y0)3Xmin,XmaxYmin,YmaxXminX0XmaxYminY0Ymax·P0(x0,y0)6-5GUI1————23Return-Esc---45
本文标题:清华大学土木工程CAD技术基础课件06人机交互技术
链接地址:https://www.777doc.com/doc-10667243 .html