没有合适的资源?快使用搜索试试~ 我知道了~
AutoCAD R13/R14/R2000 DWG File Specification
5星 · 超过95%的资源 需积分: 10 55 下载量 100 浏览量
2007-09-06
09:16:37
上传
评论 1
收藏 160KB DOCX 举报
温馨提示
试读
64页
Information in these materials is furnished for informational use only, is subject to change without notice and does not represent a commitment on the part of OpenDWG Alliance. OpenDWG Alliance assumes no responsibility or liability for any errors or inaccuracies that may appear in these materials. Use these materials at your own risk.
资源推荐
资源详情
资源评论
AutoCAD R13/R14/R2000 DWG File
Specification
Version 2.0
The OpenDWG
™
Alliance
http://www.opendwg.org
Copyright © 2000 OpenDWG Alliance. All rights reserved.
Information in these materials is furnished for informational use only, is subject to change
without notice and does not represent a commitment on the part of OpenDWG Alliance.
OpenDWG Alliance assumes no responsibility or liability for any errors or inaccuracies that
may appear in these materials. Use these materials at your own risk.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, OPENDWG ALLIANCE
AND ITS SUPPLIERS DISCLAIM ANY AND ALL WARRANTIES AND CONDITIONS, EITHER
EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-
INFRINGEMENT, AND THOSE ARISING OUT OF USAGE OF TRADE OR COURSE OF
DEALING, CONCERNING THESE MATERIALS. THESE MATERIALS ARE PROVIDED “AS IS”
WITHOUT WARRANTY OF ANY KIND.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL
OPENDWG ALLIANCE OR ITS SUPPLIERS (OR THEIR RESPECTIVE AGENTS, DIRECTORS,
EMPLOYEES OR REPRESENTATIVES) BE LIABLE FOR ANY DAMAGES WHATSOEVER
(INCLUDING, WITHOUT LIMITATION, CONSEQUENTIAL, INCIDENTAL, DIRECT,
INDIRECT, SPECIAL, ECONOMIC, PUNITIVE OR SIMILAR DAMAGES, OR DAMAGES FOR
LOSS OF BUSINESS PROFITS, LOSS OF GOODWILL, BUSINESS INTERRUPTION,
COMPUTER FAILURE OR MALFUNCTION, LOSS OF BUSINESS INFORMATION OR ANY
AND ALL OTHER COMMERCIAL OR PECUNIARY DAMAGES OR LOSSES) ARISING OUT OF
THE USE OF THESE MATERIALS, HOWEVER CAUSED AND ON ANY LEGAL THEORY OF
LIABILITY (WHETHER IN TORT, CONTRACT OR OTHERWISE), EVEN IF OPENDWG
ALLIANCE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY
CLAIM BY ANY OTHER PARTY. Because some jurisdictions do not allow the exclusion or
limitation of liability for consequential or incidental damages, the above limitation may not
apply to you.
OpenDWG is a trademark of OpenDWG Alliance in the United States and/or other countries.
All other trademarks, trade names or company names referenced herein are used for
identi>cation only and are the property of their respective owners.
US Government Restricted Rights: These materials are provided with RESTRICTED RIGHTS.
Use, duplication or disclosure by the Government is subject to restrictions as set forth in
subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software clause at
DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software-
Restricted Rights at 48 CFR 52.227-19, as applicable. The contractor/manufacturer is
OpenDWG Alliance, 1420 Fifth Avenue, 22
nd
Floor, Seattle, WA 98101, USA.
Printed in USA.
AUTOCAD R13/R14 DWG File Structure 3
AUTOCAD R13/R14/R2000 DWG FILE
STRUCTURE
Table of Contents
1) BIT CODES AND DATA DEFINITIONS.............................................................4
2) GENERAL STRUCTURE................................................................................14
3) FILE HEADER..............................................................................................15
4) DWG HEADER VARIABLES..........................................................................17
5) CLASS DEFINITIONS....................................................................................28
6) PADDING (R13C3 AND LATER)...................................................................29
7) IMAGE DATA (PRE-R13C3)..........................................................................30
8) OBJECTS..................................................................................................... 31
9) OBJECT MAP.............................................................................................133
10) UNKNOWN SECTION...............................................................................134
11) SECOND HEADER...................................................................................135
12) IMAGE DATA (R13C3 AND LATER)..........................................................138
13) Extended Entity Data (Extended Object Data).......................................139
14) PROXY ENTITY GRAPHICS.......................................................................140
AUTOCAD R13/R14 DWG File Structure 4
1) BIT CODES AND DATA DEFINITIONS
NOTE: Unless otherwise stated, all data in this manual is in little-endian order, with the least
significant byte first.
Much of the data in an R13/14/2000 format file must be read at the bit level. Various parts of the
drawing use data in compressed forms, which are explained below. Here are the abbreviations
used in this document for the various compressed forms:
B : bit (1 or 0)
BB : special 2 bit code (entmode in entities, for instance)
BS : bitshort
BL : bitlong
BD : bitdouble
2BD : 2D point (2 bitdoubles)
3BD : 3D point (3 bitdoubles)
RC : raw char (not compressed)
RS : raw short (not compressed)
RD : raw double (not compressed)
RL : raw long (not compressed)
2RD : 2 raw doubles
3RD : 3 raw doubles
MC : modular char
MS : modular short
H : handle reference (see the HANDLE REFERENCES section)
T : text (bitshort length, followed by the string).
X : special form
U : unknown
SN : 16 byte sentinel
BE : BitExtrusion
DD : BitDouble With Default
BT : BitThickness
3DD : 3D point as 3 DD, needing 3 default values
A “seeker” is an RL-type object which indicates either an absolute address in the file, or an offset
from some known address.
A “sentinel” is 16 bytes of data used for file recovery purposes.
Generally, the compressed forms are used to allow for compression of common data, usually
values like 0.0 and 1.0 for doubles, 0 and 256 for shorts. The method for interpreting the code is
AUTOCAD R13/R14 DWG File Structure 5
to read the first two bits, which indicate either the size of the data to follow, or the actual value
for the common values. Here are the compressed formats and some examples of how they appear
in the file:
BITSHORT:
1
st
2 bits : what it is
00 : A short (2 bytes) follows, little-endian order (LSB first)
01 : An unsigned char (1 byte) follows
10 : 0
11 : 256
The char size is used when positive shorts less than 256 are being stored. The short size is used
when values <0 or >=256 are being stored. Obviously the special cases for 0 and 256 are used
when those values are being stored.
Negative numbers use the short form, not the char form. That is, -1 is
00.11111111.11111111, not 01.11111111.
For instance, if we were known to be reading 5 shorts from the following stream of bits:
0000000001000000011011010000111110
it would be parsed like this:
00 00000001 00000001 (short 257)
10 (0)
11 (256)
01 00001111 (15)
10 (0)
(注:首先从一串二进制编码中取出 2bit 判断--00:则取后面 16 位为一个短整形数;10:则后面不取位,本身值为 0;11:则
后面不取值,本身值为 256;01:则取后面 8 为一个无符号数)
BITLONG:
1
st
2 bits : what it is
00 : A long (4 bytes) follows, little-endian order (LSB first)
01 : An unsigned char (1 byte) follows
10 : 0
11 : not used
The char size is used when positive longs less than 256 are being stored. The long size is used
when values <0 or >=256 are being stored. Obviously the special case for 0 is used when storing
0.
Negative numbers use the short form, not the char form. That is, -1 is
剩余63页未读,继续阅读
资源评论
- Frank.WU2014-05-04很有用,就是版本说明那个少了最新的
2021‘someday
- 粉丝: 54
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功