dwg文件格式.docx

上传人:大张伟 文档编号:11034570 上传时间:2021-06-19 格式:DOCX 页数:12 大小:19.62KB
返回 下载 相关 举报
dwg文件格式.docx_第1页
第1页 / 共12页
dwg文件格式.docx_第2页
第2页 / 共12页
dwg文件格式.docx_第3页
第3页 / 共12页
dwg文件格式.docx_第4页
第4页 / 共12页
dwg文件格式.docx_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《dwg文件格式.docx》由会员分享,可在线阅读,更多相关《dwg文件格式.docx(12页珍藏版)》请在三一文库上搜索。

1、.DWGAn attempt to specify the DWG (R12) using the BFF grammar for binary files.AcknowledgementsI would like to thank Reini Urban for his contributions.Definition of the elementary elementstypedef word word :=byte : b1, byte : b2return (word)f | (word)s 8).typedef longword longp :=byte : b1, byte : b

2、2, byte : b3, byte : b4return (longword)b1 | (longword)b2 8)| (longword)b3 16) | (longword)b4 24).typedef longword longword :=byte : b1, byte : b2, byte : b3, byte : b4return (longword)b1 | (longword)b2 8)| (longword)b3 16) | (longword)b4 2 & kind != 22) then double : z fi,if (flag & 8) then double

3、: th fi,if (flag & 0x20) then handle fi,if (extra & 4) then word : paper fi,switch (kind)case 1:/* LINE */point(!(flag & 4) : l10,point(!(flag & 4) : l11,if (opts & 1) then point(TRUE) : l210 fi,if (opts & 2) then double : l38 fi,case 2:/* POINT */point(!(flag & 4) : l10,if (opts & 1) then point(TRU

4、E) : l210 fi,if (opts & 2) then double : l38 fi,case 3:/* CIRCLE */point(FALSE) : l10,double : l40,if (opts & 1) then point(TRUE) : l210 fi,if (opts & 2) then double : l38 fi,case 4:/* SHAPE */point(FALSE) : l10,word : l2,if (opts & 1) then point(TRUE) : l210 fi,if (opts & 2) then double : l38 fi,ca

5、se 7: /* TEXT */point(FALSE) : l10,double : l40,string : l1,if (opts & 1) then double : l50 fi,if (opts & 2) then double : l41 fi,if (opts & 4) then double : l51 fi,/*?*/.if (opts & 8) then byte : l7 fi,if (opts & 0x10) then byte : l71 fi,if (opts & 0x20) then byte : l72 fi,if (opts & 0x40) then poi

6、nt(FALSE) : l11 fi,if (opts & 0x100) then byte : l73 fi,case 8:/* ARC */point(FALSE) : l10,double : l40,double : l50,double : l51,if (opts & 1) then point(TRUE) : l210 fi,if (opts & 2) then double : l38 fi,case 9:/* TRACE */point(FALSE) : l10,point(FALSE) : l11,point(FALSE) : l12,point(FALSE) : l13,

7、if (opts & 1) then point(TRUE) : l210 fi,if (opts & 2) then double : l38 fi,case 11:/* SOLID */point(FALSE) : l11,point(FALSE) : l12,point(FALSE) : l13,point(FALSE) : l14,if (opts & 1) then point(TRUE) : l210 fi,if (opts & 2) then double : l38 ficase 12:/* BLOCK */point(FALSE) : l10,/*?*/string : l1

8、,/* if (opts & 1) then ? */if (opts & 2) then string : l3 ficase 13:/* ENDBLK */case 14:/* INSERT */word : l1,point(FALSE) : l10,if (opts & 1) then double : l41 fi,if (opts & 2) then double : l42 fi,if (opts & 4) then double : l43 fi,if (opts & 8) then double : l50 fi,if (opts & 0x10) then byte : l7

9、0 fi,/*?*/if (opts & 0x20) then byte : l71 fi,/*?*/if (opts & 0x40) then double : l44 fi,/*?*/if (opts & 0x80) then double : l45 fi/*?*/case 15:/* ATTDEF */point(FALSE) : l10,.double : l40,string : l1,string : l3,string : l2,byte : l70,if (opts & 1) then byte : l73 fi,/*?*/if (opts & 2) then double

10、: l50 fi,/*?*/if (opts & 4) then double : l41 fi,if (opts & 8) then double : l42 fi,if (opts & 0x10) then byte : l7 fi,if (opts & 0x20) then byte : l71 fi,if (opts & 0x40) then byte : l72 fi,if (opts & 0x80) then point(FALSE) : l11 fi,/*?*/if (opts & 0x100) then point(TRUE) : l210 fi,if (opts & 0x20

11、0) then double : l38 fi/*?*/case 16:/* ATTRIB */point(FALSE) : l10,double : l40,string : l1,string : l2,byte : l70,if (opts & 1) then byte : l73 fi,/*?*/if (opts & 2) then double : l50 fi,/*?*/if (opts & 4) then double : l41 fi,if (opts & 8) then double : l42 fi,if (opts & 0x10) then byte : l7 fi,if

12、 (opts & 0x20) then byte : l71 fi,if (opts & 0x40) then byte : l72 fi,if (opts & 0x80) then point(FALSE) : l11 fi,/*?*/if (opts & 0x100) then point(TRUE) : l210 fi,if (opts & 0x200) then double : l38 fi/*?*/case 17:/* S/BEND */longcase 19:/* PLINE */if (opts & 1) then byte : l70 fi,if (opts & 2) the

13、n double : l40 fi,/*?*/if (opts & 4) then byte : l71 fi,/*?*/if (opts & 8) then byte : l72 fi,/*?*/if (opts & 0x10) then byte : l73 fi,/*?*/if (opts & 0x20) then byte : l74 fi,/*?*/if (opts & 0x40) then byte : l75 fi/*?*/case 20:/* VERTEX */point(FALSE) : l10,if (opts & 1) then double : l40 fi,/*?*/

14、.if (opts & 2) then double : l41 fi,/*?*/if (opts & 4) then byte : l70 fi,/*?*/if (opts & 8) then double : l50 fi/*?*/case 22:/* 3DFACE */point(!(flag & 4) : l10,point(!(flag & 4) : l11,point(!(flag & 4) : l12,point(!(flag & 4) : l13case 23:/* DIM */word : l1,point(TRUE) : l10,point(FALSE) : l11,/*?

15、*/if (opts & 2) then byte : l70 fi,if (opts & 1) then point(TRUE) : l12 fi,/*?*/if (opts & 4) then string : l1 fi,if (opts & 8) then point(TRUE) : l13 fi,if (opts & 0x10) then point(TRUE) : l14 fi,if (opts & 0x20) then point(TRUE) : l15 fi,if (opts & 0x40) then point(TRUE) : l16 fi,if (opts & 0x80)

16、then double : l40 fi,if (opts & 0x100) then double : l50 fi,if (opts & 0x200) then double : l51 fi,if (opts & 0x400) then double : l52 fi,if (opts & 0x800) then double : l53 ficase 24:/* VPORT */point(TRUE) : l10,double : l40,double : l41,word : l68endswitchcheck_2)* : entities.Still need to define xdata and handle. (to be continued.)-Last updated: Tuesday, 09-Jan-96 20:21:36 MET.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1