找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 211|回复: 0

[求助]:dxb格式资料

[复制链接]
发表于 2004-11-11 17:19:08 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
想用一下dxb格式资料,那位有能给我一个吗,我在autodesk公司网上找到一个,可是英文的,我看不懂,请各位帮忙,先谢了Drawing Interchange File Formats
--------------------------------------------------------------------------------
DXB Files

  The DXB File Format
--------------------------------------------------------------------------------


This information is for experienced programmers and is subject to change without notice.

The format of a DXB file is as follows:

Header: "AutoCAD DXB 1.0" CR LF ^Z NUL    (19 bytes)
Data:    ...Zero or more data records...

Terminator: NUL    (1 byte)

Each data record begins with a single byte identifying the record type, followed by data items. The data items have various forms of representation and encoding. In the following descriptions of the letter codes, each data item is prefixed with a letter and a hyphen.

w-


16-bit integer, byte reversed in the standard 80x86 style the least significant byte first, and the most significant byte second).

f-


IEEE 64-bit floating-point value stored with LSB first, MSB last (as stored by an 80x87).

l-


32-bit integer with the bytes reversed 80x86 style.

n-


Either a 16-bit integer or a floating-point number, depending on the most recent setting of the number mode data item. The number mode defaults to 0, signifying integers. If set to 1, all n- items will be read as floating point.

u-


Either a 32-bit integer or a floating-point number, depending on the most recent number mode setting. If a 32-bit integer, the value is scaled by multiplying it by 65,536 (216). If a floating-point value, no scaling is applied.

a-


An angle. If number mode is integer, this is a 32-bit integer representing an angle in units of millionths of a degree (range 0 to 360,000,000). If a floating-point number, it represents degrees.


In the following table, the lengths include the item-type byte and assume that the number mode is set to 0 (integer mode). If number mode is floating point, add 6 bytes to the length for each n- item present and 4 bytes for each a- or u- item present.

Byte length for item types
Item type Code
(decimal)
Data items Length
(bytes)
Line
1
n-fromx n-fromy
n-tox n-toy
n-fromx n-fromy n-fromz
n-tox n-toy n-toz
13

Point
2
n-x n-y
5

Circle
3
n-ctrx n-ctry n-rad
7

Arc
8
n-ctrx n-ctry n-rad
a-starta a-enda
19

Trace
9
n-x1 n-y1 n-x2 n-y2
n-x3 n-y3 n-x4 n-y4
17

Solid
11
n-x1 n-y1 n-x2 n-y2
n-x3 n-y3 n-x4 n-y4
17

Seqend
17
(none)
1

Polyline
19
w-closureflag
3

Vertex
20
n-x n-y
5

3Dface
22
n-x1 n-y1 n-z1
n-x2 n-y2 n-z2
n-x3 n-y3 n-z3
n-x4 n-y4 n-z4
25

Scale factor
128
f-scalefac
9

New layer
129
"layername" NUL
layername
length + 2

Line extension
130
n-tox n-toy
5

Trace extension
131
n-x3 n-y3 n-x4 n-y4
9

Block base
132
n-bx n-by
5

Bulge
133
u-2h/d
5

Width
134
n-startw n-endw
5


The line extension item extends the last line or line extension from its To point to a new To point. The trace extension item extends the last trace solid, or trace extension from its x3,y3-x4,y4 ending line to a new x3,y3--x4,y4 line.

The scale factor is a floating-point value by which all integer coordinates are multiplied to obtain the floating-point coordinates used by the entities. The initial scale factor when a file is read is 1.0. The new layer item creates a layer if none exists, giving the new layer the same defaults as the LAYER New command, and sets that layer as the current layer for subsequent entities. At the end of the DXB file load, the layer in effect before the command is restored.

The block base item specifies the base (origin) point of a created block. The block base must be defined before the first entity record is encountered. If DXB does not define a block, this specification is ignored.

A polyline consists of straight segments of fixed width connecting the vertices, except as overridden by the bulge and width items. The closure flag should be 0 or 1; if it is 1, there is an implicit segment from the last vertex (immediately before the Seqend) to the first vertex.

A bulge item, encountered between two vertex items (or after the last vertex of a closed polyline), indicates that the two vertices are connected by an arc rather by than a straight segment. If the distance between the vertices has length d, and the perpendicular distance from the midpoint of that segment to the arc is h, then the magnitude of the bulge is (2 * h / d). The sign is negative if the arc from the first vertex to the second is clockwise. A semicircle thus has a bulge of 1 (or -1). If the number mode is 0 (integer), bulge items are scaled by 2 16. If the number mode has been set to floating point, then the floating-point value supplied is 2*h/d (not scaled).

The width item indicates the starting and ending widths of the segment (straight or curved) connecting two vertices. This width stays in effect until the next width item or the seqend. If there is a width item between the polyline item and the first vertex, it is stored as a default width for the polyline. This saves considerable database space if the polyline has several segments of this width.

The number mode item controls the mode of items with types given in the preceding table as n-, a-, or u-. If the value supplied is 0, these values will be integers; otherwise, they are floating point.

To remember the last to-point, lines share the same cells, so do not mix extension groups for the two entities without an initial group before the extension. There is no extension group for 3D faces, because there is no obvious edge to extend from.

The new color group specifies the color for subsequent entities in the DXB file. The w-colornum word argument is in the range from 0 to 256. 0 means color by block, 1-255 are the standard AutoCAD colors, and 256 means color by layer. A color outside the range from 0 to 256 sets the color back to the current entity color (you can do this deliberately, and it can be quite useful). The initial entity color of material added by DXBIN is the current entity color.

All points specified in the DXB file are interpreted in terms of the current UCS at the time that the DXBIN command is executed
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-11-24 17:56 , Processed in 0.239317 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表