清华大学土木工程CAD技术基础课件08建筑结构CAD系统设计

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

CAD8-18-28-38-48-5„70„„“”„„8-1„8-2„„„„„„13„1„„„„……„„„2„„CAD„„„„„3„„„„„„2„„„„„„„36„1„„„„2„„3„4„5„„6„„„„„„„„„„„„„„„„„„GB/T8567-1988GB/T9385-19881411.11.21.31.422.12.22.333.13.23.33.43.53.644.14.24.34.4„„„„„„„„„,,„„„„„3.13.23.33.44.14.21)ID2)3)4)4.31)2)3)4)4.44.51)2)8-3„„„„„„„1„„CC++„„„„„„„„„„e.g.„„„e.g.„1.2.3.4.5.6.e.g.„2„„„„„„„„„„„„„1nn0„T(t1,t2,t3,…,tn)„t1t2t3t4t5tnt6t7…„„Loc(ti)=Loc(t1)+(i-1)LL„„„,„staticcharLt[m]={‘A’,’B’,’C’,’D’,’E’…};„charc1;c1=Lt[i-1];„Lt[j–1]=Lt[j](j=i+1,i+2,…,n–;„i,len=sizeof(Lt)/sizeof(Lt[0]);printf(“\n:”);c=getch();printf(“\n:”);scanf(“%d”,&i);if(i1){for(j=len;j=1;j––)Lt[j]=Lt[j–1];Lt[0]=c;}elseif(ilen)Lt(len)=c;else{for(j=len;j=1;j––)Lt[j]=Lt[j–1];Lt[i–1]=c;}t1t2t3t4t5tnt6t7…e.g.„2S=(a0,a1,……,an-1)“”a0a1an-2an-1……topbottom„„top„toptopa0a1an-2an-1……topbottom„„„„„……a0a1an-2an-1……topbottomstack::stack(ints){elements=newint[maxSize];assert(elements!=0);//}voidstack::push(constint&item){assert(!isFull());elements[++top]=item;}intstack::pop(){assert(!isEmpty());returnelements[top--];}intstack::getTop(){assert(!isEmpty());returnelements[top];}classstack{public:stack(int=10);~stack(){delete[]elements;}voidpush(constint&item);intpop();intgetTop();voidmakeEmpty(){top=-1;}intisEmpty()const{returntop==-1;}intisFull()const{returntop==maxSize-1}private:inttop;int*elements;intmaxSize}„undoundo„e.g.„3S=(a0,a1,……,an-1)“”a0a1an-2an-1……rearfront„„front(rear)frontrear„rear0frontrear„reara0a1an-2an-1……rearfront„„„„„……a0a1an-2an-1……rearfront„4„„„ABCDlist„„„ABCDlist„„„„„„……ABCDlistintinsert(intd=0);intappend(intd=0);voidgetData(List&il,i);voidreverse();private:Item*end();Item*list;};intList::print(){if(list==0){cout“empty\n”;return0;}cout“(“;intcnt=0;Item*pt=list;while(pt){classlist;classItem{public:friendclassList;private:Item(intd=0){data=d;next=0;}intdata;Item*next;};classList{public:List(){list=0;}List(intd){list=newItem(d);}intprint();if(++cnt%40==1&&cnt!=1)coutendl;coutpt-data“”;pt=pt-next;}cout“)\n”;returncnt;}intList::insert(intd){Item*pt=newItem(d);pt-next=list;list=pt;returnd;}intList::append(intd){Item*pt=newItem(d);if(list==0)list=pt;else(end())-next=pt;returnd;}Item*List::end(){Item*prv,*pt;for(prv=pt=list;pt;prv=pt,pt=pt-next);returnprv;}intList::getData(List&il,i){Item*pt=il.list;while(intj++!=i)pt=pt-next;returnpt-data;}voidList::reverse(){Item*pt,*prv,*tmp;prv=0;pt=list;list=end();while(pt!=list){tmp=pt-next;pt-next=prv;prv=pt;pt=tmp;}list-next=prv;}voidList::length(){intcnt=0;Item*pt=list;for(;pt;pt=pt-next,cnt++);returncnt;}ABCDlist„„e.g.„5„„„ABCDfirst„6ABCDlist„7„„„ABCDEFGHIJKLM„„„„„„„„„„„……ABCDEFGHIJKLM„7012345689101112131470123456897„8021301234560120321„„„0000600000010000000100000010110000100110010000000012345601234560123456„„„„„„„……0123456„3„„„„„„11.11.21.31.422.12.22.32.42.52.62.733.13.23.344.14.24.355.15.25.36„„8-4„„„„„„„„„“”„„„„„„„„„„……„„„8-5„„„„„„„„„CAD„„„„„„CAD„CAD„„CAD„„

1 / 75
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功