isff.txt
来自「支持各种栅格图像和矢量图像读取的库」· 文本 代码 · 共 2,219 行 · 第 1/5 页
TXT
2,219 行
Linkage Arc Elements (Type 16)----------------------Arc elements are defined by the center, the rotation, start, and sweep angles, and the major and minor axes. The C structure definitions are as follows 2D: typedef struct { Elm_hdr ehdr ; /* element header */ Disp_hdr dhdr ; /* display header */ long startang ; /* start angle */ long sweepang ; /* sweep angle */ double primary ; /* primary axis */ double secondary ; /* secondary axis */ long rotation ; /* rotation angle */ Dpoint2d origin ; /* origin */ } Arc_2d ; 3D: typedef struct { Elm_hdr ehdr ; /* element header */ Disp_hdr dhdr ; /* display header */ long startang ; /* start angle */ long sweepang ; /* sweep angle */ double primary ; /* primary axis */ double secondary ; /* secondary axis */ long quat[4] ; /* quaternion rotations */ Dpoint3d origin ; /* origin */ } Arc_3d ; Arc parameters Arc parameters-------------- Parameter: Description Primary and Defined by two double-precision floating point values that specify the lengths secondary axes in UORs of the semi-major and semi-minor axes. The primary axis is not necessarily the longest (semi-major) axis, but the axis whose orientation is specified by the rotation angle or quaternion. Orientation Rotation angle or quaternion defines the orientation of the primary axis with respect to the design file coordinate system. Origin (center) Expressed as double-precision floating point coordinates. The center itself need not be within the design plane although the entire arc definition must be within the design plane. Start angle Expressed in the same format as a 2D rotation angle. It defines the counterclockwise angle in the plane of the arc from the primary axis to the starting point of the arc on a unit circle. Sweep angle Represents the sweep of the arc along a unit circle. It is in the same format as a 2D rotation angle except that the sign bit indicates the direction of sweep, 0=counterclockwise, 1=clockwise. Note that MicroStation interprets the special case of a 0d sweep angle as a 360d sweep angle. Offset Offset arc_3d.startang arc_3d.sweepang arc_3d.primary arc_3d.secondary arc_3d.quat arc_3d.origin Linkage Linkage Text Elements (Type 17)-----------------------A text element stores a single line of text. The C structures are as follows. 2D: typedef struct { Elm_hdr ehdr ; /* element header */ Disp_hdr dhdr ; /* display header */ byte font ; /* text font used */ byte just ; /* justification type */ long lngthmult ; /* length multiplier */ long hghtmult ; /* height multiplier */ long rotation ; /* rotation angle */ Point2d origin ; /* origin */ byte numchars ; /* # of characters */ byte edflds ; /* # of enter data fields */ char string[1] ; /* characters */ } Text_2d ; 3D: typedef struct { Elm_hdr ehdr ; /* element header */ Disp_hdr dhdr ; /* display header */ byte font ; /* text font used */ byte just ; /* justification type */ long lngthmult ; /* length multiplier */ long hghtmult ; /* height multiplier */ long quat[4] ; /* quaternion angle */ Point3d origin ; /* origin */ byte numchars ; /* # of characters */ byte edflds ; /* # of enter data fields */ char string[1] ; /* characters */ } Text_3d ; These parameters define the text. Parameter: Description Font A single byte is used to store the font for a text element. This number corresponds to the appropriate font definition in the font library. Length and height The basic character size is 6 UORs wide and 6 UORs high (4 UORs of width multipliers and 2 of spacing). The length and height multipliers specify the scale factors to be applied to the basic character size to determine the true size of the text string. The multipliers are stored as long integers with the lower order bit set. Mirrored text is identified by a negative length multiplier. The maximum multiplier value is 2,147,483.648 (231/1000). The maximum text size is therefore 12,884,898 UORs (6 x 2,147,483.648). Orientation The rotation angle or quaternion defines the orientation of a text element relative to the design file coordinate system. Justification and At the time of placement, the active text justification determines how text origin is positioned about the user-defined origin. The origin stored in a text element is always the lower left of the text element. It is necessary to use the justification value to compute the user-defined origin. There are nine possible justifications for text elements: Enter data fields Areas within a text element that can be easily modified by the user. Each enter data field in a text string is specified by three bytes appended to the element. The first byte specifies the character number in the string (relative to 1) that is the first character in the enter data field. The second byte specifies the number of characters in the field. The third byte defines the justification of the non-blank characters within the field (-1=left, 0=center, +1=right). Note that if the number of characters is odd, the first enter data field specification does not lie on a word boundary, and if there are no enter data fields, there are no specification bytes. Left/Top (0) Center/Top (6) Right/Top (12) Left/Center(1) Center/Center (7) Right/Center (13) Left/Bottom(2) Center/Bottom (8) Right/Bottom (14) Offset Offset text_3d.font text_3d.lngthmult text_3d.hghtmult text_3d.rotation Chars text_3d.origin 2 2 #1 2 Ed #1 text_3d.numchars Chars text_3d.string[0] Linkage 2 2 #1 2 Ed #1 Linkage 3D Surface Header (Type 18) and 3D Solid Header (Type 19)---------------------------------------------------------A surface or solid is a complex 3D element that is projected or rotated from a planar boundary element (line, line string, curve, arc, or ellipse). The surface or solid header precedes an ordered set of primitive elements that define boundaries, cross sections and rule lines. A solid (type 19) is capped at both ends -- it encloses a volume. A surface (type 18) is not capped on the ends -- it encloses no volume. Surface and solid headers are identical except for their type number. The C definition is as follows: typedef struct { Elm_hdr ehdr ; /* element header */ Disp_hdr dhdr ; /* display header */ unsigned short totlength ; /* total length of surface */ unsigned short numelems ; /* # of elements in surface */ byte surftype ; /* surface type */ byte boundelms ; /* # of boundary elements-1 */ #ifdef unix short filler #endif short attributes[4] ; /* unknown attribute data */ } Surface ; Method of creation Elements in surfaces and solids Method of creation------------------Each surface or solid header has a type number describing its method of creation. For surfaces, the following values are used. 0=Surface of projection 1=Bounded Plane 2=Bounded Plane 3=Right circular cylinder 4=Right circular cone 5=Tabulated cylinder 6=Tabulated cone 7=Convolute 8=Surface of revolution 9=Warped surface For solids (capped surfaces), the following values are used. 0=Volume of projection 1=Volume of revolution 2=Volume defined by boundary elements Word Offset 0-17 Header 18 Words in Description surface.totlngth 19 Number of Elements surface.numelems 20 Surface Type surface.type 21 A Linkage Elements in surfaces and solids-------------------------------Any line, line string, curve, arc, or ellipse can be a boundary element of a surface or solid. A complex element cannot be a component of a surface or solid. Rule elements are restricted to lines and arcs. Elements are stored in a surface or solid in a strict order. Boundary elements (class=0) appear first after the surface/solid header. The second boundary element immediately follows the first boundary and is followed by any rule lines connecting the first and second boundary. If additional boundary elements are included they should follow this same pattern with the boundary elements preceding the rule lines that connect it to the previous boundary. Point String Elements (Type 22)-------------------------------A point string element consists of a number of vertices with orientations defined at each vertex. They are useful in specialized applications that need to specify orientations as well as point locations, such as a "walk through." Point strings can be defined as either contiguous or disjoint. Contiguous point strings are displayed with lines connecting the vertices. Disjoint point strings are displayed as a set of discrete points. Both types are placed and manipulated in the same way, but exhibit slightly different characteristics when snapping or locating. It is impossible to define a point string structure in C because all point locations are stored before any of the orientations. Description Range The range of the point string element is the range of the points. Properties The H-bit (bit 15) of the properties word indicates the type of point string (0 = continuous, 1 = disjoint) for display purposes. The setting of the planar bit indicates whether the points are coplanar. Number of points The maximum number of vertices allowed in a single point string is 48. A longer series of points is formed by combining multiple elements in a complex chain. Point coordinates An array contains the X and Y coordinates for 2D points or the X, Y, and Z coordinates for 3D points as integer values. Point orientations An array contains the rotation matrices (2D) or quaternions (3D) describing the points' orientations with respect to the drawing axes. The coefficients
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?