資源描述:
《cad上機作業(yè)(word版)》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、過程裝備與控制工程專業(yè)過程裝備CAD技術(shù)上機作業(yè)班級:過程裝備與控制工程12-3姓名:黃凌瑞學(xué)號:20122165382015年4月3(1)源程序:(command"circle""0,0"36)(command"circle""15,12"9)(command"circle""-15,12"9)(command"circle""0,-8"4)(command"donut"018"15,12""-15,12""")(command"arc""-18,-15""0,-25""18,-15")3(2)源程序:(setqplw5);;指定線寬(command"pline""0,0""w"plw"""
2、0,100""150,100""150,200""w"0"""300,200""300,100""450,100""450,0""c")3(3)源程序:(initget1)(setqp0(getpoint"直線起點:"));;輸入直線起點(initget1)(setqcta(getreal"圓心線與水平線夾角:"));;指定圓心線與水平線夾角(initget(+124))(setqr(getreal"圓半徑:"));;輸入圓半徑(initget(+124))(setqn(getint"圓的個數(shù):"));;輸入圓的個數(shù)(setqcta(/(*picta)180.0))(repeatn(comma
3、nd"circle"p0r)(setqp0(polarp0cta(*r2))))4、源程序:(setqa(getreal"a="))(setqb(getreal"b="))(setqr(getreal"r="))(setqx1(/a2))(setqx2(exptr2))(setqx3(/(expta2)4))(setqx4(-x2x3))(setqx5(+(exptx40.5)r))(setqx6(+x5b))(setqp0(listab))(setqp1(listx1x6))(setqp2(list0b))(setqp3(list00))(setqp4(lista0))(command"ar
4、c"p0p1p2)(command"pline"p2p3p4p0"")5、源程序:(command"circle""100,100"200)(setqs1(ssget“L”))(command"offset""30"s1"500,500")6、源程序:(command"polygon"5"0,0""i"100"")(setqe1(entnext))(command"circle""0,0"60)(setqs1(ssget“L”))(ssadde1s1)(command"mirror"s1"""-100,-200""100,-200""")7:對話框文件:column1:dialog{label
5、="價格查詢";spacer;:popup_list{label="書籍名稱";key="plist1";fixed_width=true;width=30;}:edit_box{label="單價(元)";key="edbox1";width=30;}spacer;ok_only;}驅(qū)動程序:(defunmainprogram()(setqplist_1(list"高等數(shù)學(xué)""大學(xué)物理""大學(xué)英語"))(setqplist_2(list"26.00""30.50""28.00"))(setqjiage"26.00")(liebiao))(defunliebiao()(if(>(setqdlg
6、_id1(load_dialog"e:\2012216538\7.dcl"))0)(progn(if(new_dialog"column1"dlg_id1)(progn(start_list"plist1")(mapcar'add_listplist_1)(end_list)(set_tile"edbox1""26.00")(action_tile"plist1""(plistaction)")(setqflag(start_dialog)))(alert"Unabletodisplaydialogbox"))(unload_dialogdlg_id1))(alert"Unabletolo
7、addialogbox")))(defunplistaction(/idnum)(setqidnum(get_tile"plist1"))(setqidnum(atoiidnum))(setqjiage(nthidnumplist_2))(set_tile"edbox1"jiage))運行結(jié)果:8對話框文件id0:dialog{label="算屬相";spacer;:edit_box{label=