我相信很多人都想将一张cad水深测图转换成三维立体图,然后进行布尔运算计算工程量吧,由于软件限制这个过程很难进行,另外自己编程又找不到方向,有高人也不指点,下面我告诉大家一个简单的方法,我相信你们一定可以做出自己的立体图,步骤如下:
1、提取测图里的数据点,用lisp最便捷,而且简单易学,基本所有类型的数据都能提取。
2、通过编程提取疏浚点,并用三角网法建立网格,然后建立立体的侧面跟底面。三角网法教程很多,源程序也一大把。
3、最关键的一部是建立网格间的拓扑关系,生成sat文件,然后cad中插入acis。这步是最难的,因为大家对sat文件格式不了解,大家看以看一下acis学习文件,网上也很多,其中有个清华大学教授的acis书籍,很有用。我初步介绍下sat文件,它有body,shell,loop,coedge,edge,vertex,point几个元素,然后有一些属性,它们之间有拓扑关系,我说不清,大家自己看教材。
由于不需要布尔运算,因此它的速度很快,没有版本限制。一个最简单的sat黏贴下。
700 112 1 0
16 Autodesk AutoCAD 17 ASM 6.0.2.7023 NT 24 Sun Jul 15 17:12:05 2012
1 9.9999999999999995e-007 1e-010
body $-1 -1 $-1 $1 $-1 $-1 #
lump $-1 -1 $-1 $-1 $2 $0 #
shell $-1 -1 $-1 $-1 $-1 $3 $-1 $1 #
face $10 -1 $-1 $4 $17 $2 $-1 $24 forward single #
face $11 -1 $-1 $5 $18 $2 $-1 $25 forward single #
face $12 -1 $-1 $6 $19 $2 $-1 $26 forward single #
face $13 -1 $-1 $7 $20 $2 $-1 $27 forward single #
face $14 -1 $-1 $8 $21 $2 $-1 $28 forward single #
face $15 -1 $-1 $9 $22 $2 $-1 $29 forward single #
face $16 -1 $-1 $-1 $23 $2 $-1 $30 forward single #
color-adesk-attrib $-1 -1 $-1 $-1 $3 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $4 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $5 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $6 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $7 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $8 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $9 256 #
loop $-1 -1 $-1 $-1 $49 $3 #
loop $-1 -1 $-1 $-1 $52 $4 #
loop $-1 -1 $-1 $-1 $55 $5 #
loop $-1 -1 $-1 $-1 $59 $6 #
loop $-1 -1 $-1 $-1 $63 $7 #
loop $-1 -1 $-1 $-1 $67 $8 #
loop $-1 -1 $-1 $-1 $71 $9 #
plane-surface $-1 -1 $-1 444085.528 3887160 -10.1 -.597164595141211 4.94638286865092E-02 .800592140831713 .505086619083153 .798555919497586 .32740792699401 forward_v I I I I #
plane-surface $-1 -1 $-1 444091.853 3887170 -6 -.115268212830336 .174227903692945 .977935517652193 .229927067492007 .962440634124877 -.144366095118732 forward_v I I I I #
plane-surface $-1 -1 $-1 444085.528 3887160 -10.1 .845137276694389 -.534549327510185 0 0 0 -1 forward_v I I I I #
plane-surface $-1 -1 $-1 444090 3887180 -8 -.975901485683043 .21821157219916 0 0 0 -1 forward_v I I I I #
plane-surface $-1 -1 $-1 444096.631 3887190 -9 -.833419686453136 .55264059408657 0 0 0 -1 forward_v I I I I #
plane-surface $-1 -1 $-1 444091.853 3887170 -6 .972629565287909 -.232361203146851 0 0 0 -1 forward_v I I I I #
plane-surface $-1 -1 $-1 444085.528 3887160 -100 0 0 -1 1 0 0 forward_v I I I I #
vertex $-1 -1 $-1 $78 $39 #
vertex $-1 -1 $-1 $80 $40 #
vertex $-1 -1 $-1 $76 $41 #
vertex $-1 -1 $-1 $81 $42 #
vertex $-1 -1 $-1 $85 $43 #
vertex $-1 -1 $-1 $82 $44 #
vertex $-1 -1 $-1 $83 $45 #
vertex $-1 -1 $-1 $84 $46 #
point $-1 -1 $-1 444085.528 3887160 -10.1 #
point $-1 -1 $-1 444090 3887180 -8 #
point $-1 -1 $-1 444091.853 3887170 -6 #
point $-1 -1 $-1 444096.631 3887190 -9 #
point $-1 -1 $-1 444091.853 3887170 -100 #
point $-1 -1 $-1 444085.528 3887160 -100 #
point $-1 -1 $-1 444090 3887180 -100 #
point $-1 -1 $-1 444096.631 3887190 -100 #
coedge $-1 -1 $-1 $48 $49 $53 $73 forward $17 $-1 #
coedge $-1 -1 $-1 $49 $47 $52 $74 forward $17 $-1 #
coedge $-1 -1 $-1 $47 $48 $57 $75 forward $17 $-1 #
coedge $-1 -1 $-1 $51 $52 $65 $76 forward $18 $-1 #
coedge $-1 -1 $-1 $52 $50 $61 $77 forward $18 $-1 #
coedge $-1 -1 $-1 $50 $51 $48 $74 reversed $18 $-1 #
coedge $-1 -1 $-1 $54 $56 $47 $73 reversed $19 $-1 #
coedge $-1 -1 $-1 $55 $53 $60 $78 forward $19 $-1 #
coedge $-1 -1 $-1 $56 $54 $69 $82 forward $19 $-1 #
coedge $-1 -1 $-1 $53 $55 $66 $79 forward $19 $-1 #
coedge $-1 -1 $-1 $58 $60 $49 $75 reversed $20 $-1 #
coedge $-1 -1 $-1 $59 $57 $64 $80 forward $20 $-1 #
coedge $-1 -1 $-1 $60 $58 $70 $83 forward $20 $-1 #
coedge $-1 -1 $-1 $57 $59 $54 $78 reversed $20 $-1 #
coedge $-1 -1 $-1 $62 $64 $51 $77 reversed $21 $-1 #
coedge $-1 -1 $-1 $63 $61 $68 $81 forward $21 $-1 #
coedge $-1 -1 $-1 $64 $62 $71 $84 forward $21 $-1 #
coedge $-1 -1 $-1 $61 $63 $58 $80 reversed $21 $-1 #
coedge $-1 -1 $-1 $66 $68 $50 $76 reversed $22 $-1 #
coedge $-1 -1 $-1 $67 $65 $56 $79 reversed $22 $-1 #
coedge $-1 -1 $-1 $68 $66 $72 $85 forward $22 $-1 #
coedge $-1 -1 $-1 $65 $67 $62 $81 reversed $22 $-1 #
coedge $-1 -1 $-1 $70 $72 $55 $82 reversed $23 $-1 #
coedge $-1 -1 $-1 $71 $69 $59 $83 reversed $23 $-1 #
coedge $-1 -1 $-1 $72 $70 $63 $84 reversed $23 $-1 #
coedge $-1 -1 $-1 $69 $71 $67 $85 reversed $23 $-1 #
edge $99 -1 $-1 $31 0 $33 12.5226045613581 $47 $86 forward @7 unknown #
edge $100 -1 $-1 $33 0 $32 10.3650185238624 $48 $87 forward @7 unknown #
edge $101 -1 $-1 $32 0 $31 20.6011840436437 $49 $88 forward @7 unknown #
edge $102 -1 $-1 $33 0 $34 20.7805024963285 $50 $89 forward @7 unknown #
edge $103 -1 $-1 $34 0 $32 12.0403555180036 $51 $90 forward @7 unknown #
edge $104 -1 $-1 $31 0 $36 100 $54 $91 forward @7 unknown #
edge $105 -1 $-1 $35 0 $33 100 $56 $92 forward @7 unknown #
edge $106 -1 $-1 $32 0 $37 100 $58 $93 forward @7 unknown #
edge $107 -1 $-1 $34 0 $38 100 $62 $94 forward @7 unknown #
edge $108 -1 $-1 $36 0 $35 11.832397263452 $69 $95 forward @7 unknown #
edge $109 -1 $-1 $37 0 $36 20.4938718645374 $70 $96 forward @7 unknown #
edge $110 -1 $-1 $38 0 $37 11.9987566439161 $71 $97 forward @7 unknown #
edge $111 -1 $-1 $35 0 $38 20.5628131343918 $72 $98 forward @7 unknown #
straight-curve $-1 -1 $-1 444085.528 3887160 -10.1 .505086619083153 .798555919497586 .32740792699401 I I #
straight-curve $-1 -1 $-1 444091.853 3887170 -6 -.178774403126903 .964783611044974 -.192956722208995 I I #
straight-curve $-1 -1 $-1 444090 3887180 -8 -.21707490164327 -.970817985880323 -.101935888517434 I I #
straight-curve $-1 -1 $-1 444091.853 3887170 -6 .229927067492007 .962440634124877 -.144366095118732 I I #
straight-curve $-1 -1 $-1 444096.631 3887190 -9 -.550731246272488 -.830540259799413 8.30540259799413E-02 I I #
straight-curve $-1 -1 $-1 444085.528 3887160 -10.1 0 0 -1 I I #
straight-curve $-1 -1 $-1 444091.853 3887170 -100 0 0 1 I I #
straight-curve $-1 -1 $-1 444090 3887180 -8 0 0 -1 I I #
straight-curve $-1 -1 $-1 444096.631 3887190 -9 0 0 -1 I I #
straight-curve $-1 -1 $-1 444085.528 3887160 -100 .534549327510185 .845137276694389 0 I I #
straight-curve $-1 -1 $-1 444090 3887180 -100 -.21821157219916 -.975901485683043 0 I I #
straight-curve $-1 -1 $-1 444096.631 3887190 -100 -.55264059408657 -.833419686453136 0 I I #
straight-curve $-1 -1 $-1 444091.853 3887170 -100 .232361203146851 .972629565287909 0 I I #
color-adesk-attrib $-1 -1 $-1 $-1 $73 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $74 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $75 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $76 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $77 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $78 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $79 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $80 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $81 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $82 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $83 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $84 256 #
color-adesk-attrib $-1 -1 $-1 $-1 $85 256 #
大家看以看见,彼此的次序是可以改变的,非常灵活,而且速度非常快,最费时的三角网的计算过程,由于我用的是插入法,速度比较慢,我觉得用生长法是最好的,建立拓扑关系也方便,建议大家用。
由于每个人的编程方法不一样,我不献丑了,但是过程还是这个简单好用。大家可以试试。
相关文章
- 2021-08-30电影风暴2:Maya影像实拍与三维合成攻略PDF下载
- 2021-08-23精通AutoCAD三维设计与开发PDF下载
- 2021-08-19数字化成图-最新AutoCAD地形图测绘高级开发PDF下载
- 2021-07-20AutoCAD 绘制三维实体装配图 [胡起学,胡进,胡怡 编著] 2
- 2021-06-17AutoCAD二维、三维教程(中文2016版)PDF下载
- 2021-06-09AutoCAD绘图与Solid Edge三维造型PDF下载
- 2021-02-05AutoCAD 2012建筑绘图及三维建模 [高丽燕 主编] 2012
- 2020-12-28AutoCAD 2008二维与三维设计概述(英文版)PDF下载
- 2020-12-24AutoCAD 2002三维造型技术PDF下载
- 2020-12-22AutoCAD 2000三维造型PDF下载