![CADCAM實(shí)驗(yàn)報(bào)告_第1頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/25/12697647-4562-4335-84f5-ced915989707/12697647-4562-4335-84f5-ced9159897071.gif)
![CADCAM實(shí)驗(yàn)報(bào)告_第2頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/25/12697647-4562-4335-84f5-ced915989707/12697647-4562-4335-84f5-ced9159897072.gif)
![CADCAM實(shí)驗(yàn)報(bào)告_第3頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/25/12697647-4562-4335-84f5-ced915989707/12697647-4562-4335-84f5-ced9159897073.gif)
![CADCAM實(shí)驗(yàn)報(bào)告_第4頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/25/12697647-4562-4335-84f5-ced915989707/12697647-4562-4335-84f5-ced9159897074.gif)
下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、cadcam實(shí)驗(yàn)報(bào)告 二叉樹的遍歷實(shí)驗(yàn) 一、實(shí)驗(yàn)名稱:二叉樹的遍歷實(shí)驗(yàn)。 二、實(shí)驗(yàn)?zāi)康模?1、掌握cad/cam系統(tǒng)中常用的數(shù)據(jù)結(jié)構(gòu)二叉樹的概念、存儲結(jié)構(gòu)以及二叉樹遍歷技術(shù)。 2、熟練應(yīng)用c語言編寫二叉樹的建立,以及用先序、中序、后序遍歷方法遍歷二叉樹的程序。 三、實(shí)驗(yàn)內(nèi)容 用tc或vc編程,將圖2-14所示的二叉樹建立鏈表存儲結(jié)構(gòu),并分別用先序、中序、后序遍歷方法遍歷該二叉樹 1、程序流程圖 2、程序 #include #include struct btree char data; struct btree *lchild,*rchild; *node9; void preorder(st
2、ruct btree *node) if(!node) return ; printf(“%c“,node->data); preorder(node->lchild); preorder(node->rchild); void inorder(struct btree *node) if(!node) return ; inorder(node->lchild); printf(“%c“,node->data); inorder(node->rchild); void postorder(struct btree *node) if(!node) retu
3、rn ; postorder(node->lchild); postorder(node->rchild); printf(“%c“,node->data); void main() int i; for(i=0;i<9;i+) nodei=(struct btree *)malloc(sizeof(struct btree); nodei->data=a+i; nodei->lchild=null; nodei->rchild=null; node0->lchild=node1; node0->rchild=node2; node1-&g
4、t;lchild=node3; node2->lchild=node4; node2->rchild=node5; node3->lchild=node6; node3->rchild=node7; node4->rchild=node8; printf(“按先序遍歷:“); preorder(node0); printf(“n按中序遍歷:“); inorder(node0); printf(“n按后序遍歷:“); postorder(node0); getchar(); return 0; 實(shí)驗(yàn)結(jié)果如下: 三、主要儀器設(shè)備 計(jì)算機(jī)(c+語言環(huán)境) 實(shí)驗(yàn)二 數(shù)表的
5、程序化處理 一、 實(shí)驗(yàn)名稱:數(shù)表的程序化處理 二、實(shí)驗(yàn)?zāi)康?1、 掌握對工程手冊和設(shè)計(jì)標(biāo)準(zhǔn)中的各種數(shù)據(jù)表格(包括數(shù)值、數(shù)表、線圖)的計(jì)算機(jī)處理技術(shù)。 2、 熟練應(yīng)用c語言或vc金星編程數(shù)據(jù)處理程序。 三、 實(shí)驗(yàn)內(nèi)容 用tc或vc編寫一個(gè)線性插值程序,以下表為根本節(jié)點(diǎn)參數(shù),插值計(jì)算90°-160°范圍內(nèi)任意角度的包角修正系數(shù)k。 /(°) 90 100 110 120 130 140 150 160 k 0.68 0.74 0.79 0.83 0.86 0.89 0.92 0.95 1、程序流程圖 2、程序 #include #include #include vo
6、id main() int i,j; int a8=90,100,110,120,130,140,150,160; double k8=0.68,0.74,0.79,0.83,0.86,0.89,0.92,0.95; double m; for(;) do printf(“請輸入包角值:(包角范圍為90°至160°)n“); scanf(“%d“,&j); if(j<90|j>160) printf(“包角輸入錯(cuò)誤,請重新輸入。n“); printf(“按回車鍵繼續(xù)查詢,按ctrl+c鍵退出n“); getchar(); getchar(); syste
7、m(“cls“); while(j<90|j>160); for(i=0;i<8;i+) if(j=ai) m=ki; if(j>ai&&j 二、 實(shí)驗(yàn)內(nèi)容 用proe構(gòu)造支架零件 三、 實(shí)驗(yàn)報(bào)告 1、 三維零件模型 2、 零件構(gòu)成過程是csg樹 實(shí)驗(yàn)四 排料圖編程繪制 3、 實(shí)驗(yàn)?zāi)康?七、 熟悉autocad中的二次開發(fā)工具autolisp的各項(xiàng)功能函數(shù); 八、 了解autolisp的編程過程和方法;九、 掌握在autocad下實(shí)現(xiàn)排料圖的繪制技術(shù)。 4、 實(shí)驗(yàn)內(nèi)容 板材尺寸為l×b,在該板料上氣割假設(shè)干個(gè)半徑為r的圓板,如果不計(jì)割縫,按實(shí)驗(yàn)
8、圖中排版方式,問用這塊板最多可以割下多少塊圓板?編程繪制出排料圖。 說明: 1.l=2000,b=1000,r=(班號*10).學(xué)號,如2班3號,r=20.03。 2.圓板數(shù)用變量表示。 3.輸出圓板數(shù),并繪制排料圖。 5、 實(shí)驗(yàn)報(bào)告 1、畫出程序流程圖 2、編寫程序并調(diào)試運(yùn)行出程序結(jié)果 (1)實(shí)驗(yàn)程序 (defun c:pl() (setq l (getreal “n請輸入板料長度l:“) (setq b (getreal “n請輸入板料厚度b:“) (setq r 50.17) (setq cl (fix (/ l (* 2 r) (setq cb (fix (/ b (* 2 r) (m
9、and “zoom“ “w“ (0 0) (l b) (setq p1 (getpoint “n輸入繪圖基點(diǎn)p1“) (setq p2 (polar p1 (/ pi 2) b) (setq p3 (polar p2 0 l) (setq p4 (polar p1 0 l) (mand “pline“ p1 p2 p3 p4 “c“) (setq m 0) (while (< m cb) (setq ph (polar p1 (/ pi 2) (* r (+ (* m 2) 1) (setq pc (polar ph 0 r) (setq n 0) (while (< n cl) (mand “circle“ pc r) (setq pc (polar pc 0 (* 2 r)
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 南京花卉綠植租賃合同范本
- 化工料采購合同范本
- 修溝工程合同范本
- 勞務(wù)合同范例國家
- 三合伙合同范本
- 2025年度國際環(huán)保監(jiān)測設(shè)備租賃與環(huán)境保護(hù)合同
- 申請實(shí)訓(xùn)的申請書
- 大學(xué)生不住校申請書
- 2025年中國高身拉籃行業(yè)市場發(fā)展前景及發(fā)展趨勢與投資戰(zhàn)略研究報(bào)告
- 現(xiàn)代生產(chǎn)管理在科技領(lǐng)域的實(shí)踐應(yīng)用
- 水稻葉齡診斷栽培技術(shù)課件
- 2023年中國工商銀行蘇州分行社會(huì)招聘30人筆試備考試題及答案解析
- 經(jīng)纖支鏡氣道球囊擴(kuò)張術(shù)課件
- 汽車尾氣污染與治理汽車尾氣污染課件
- 河南神火興隆礦業(yè)有限責(zé)任公司泉店煤礦礦產(chǎn)資源開采與生態(tài)修復(fù)方案
- 對外漢語教學(xué)論
- 《十萬個(gè)為什么》推進(jìn)課(小學(xué)課件)
- 全國主要城市的月日均總輻照量和年日均總輻照量
- 會(huì)計(jì)公司員工手冊
- GB/T 13404-2008管法蘭用非金屬聚四氟乙烯包覆墊片
- 任職宣布大會(huì)上的講話(集團(tuán)公司任命子公司領(lǐng)導(dǎo)班子成員)
評論
0/150
提交評論