Table of Contents

Class DxfShape

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

An entity of a DXF file as DxfReader read it: the library's shape for it, what the file says of it, and every group of it as the file has it, so that nothing of the entity is lost.

public sealed class DxfShape
Inheritance
DxfShape
Inherited Members

Remarks

Add(DxfShape) writes one back: its shape on its layer, in its colour, linetype, lineweight and thickness.

Constructors

DxfShape(object, string, int?, int?, string, int?, double)

Initializes an entity of a shape of one's own, to be written with its look by Add(DxfShape).

Properties

BlockPath

Gets the names of the blocks the entity was placed through, outermost first, each as its definition writes it: FRAME, BOLT for a circle of the block BOLT inserted in the block FRAME inserted in the drawing. Empty for an entity of the drawing itself, and for one made in code.

Color

Gets the colour of the entity (group 62), an AutoCAD colour index from 1 to 255; null where it takes the colour of its layer (256), or the file gives none. An entity of a block whose colour is BYBLOCK (0) has the colour of the INSERT that placed it, and its true colour where it has none of its own; one of the drawing itself has none.

Groups

Gets every group of the entity's record, in the order of the file, after the group 0 that names its type: extended data (1000 to 1071) and groups no reader looks at among them, each value the text the file prints.

Handle

Gets the handle of the entity (group 5), as the file writes it in hexadecimal; null where it has none, as in a file of R12, or for an entity made in code.

InsertHandles

Gets the handles of the INSERTs the entity was placed through, outermost first, one to each name of BlockPath: the first is the handle of the INSERT in the drawing. An INSERT without a handle, as in a file of R12, gives null; the cells of one MINSERT share its handle. Empty for an entity of the drawing itself.

Layer

Gets the layer the entity is on (group 8), as Layers names it; 0 where the file gives none. An entity of a block drawn on layer 0 is on the layer of the INSERT that placed it.

LineWeight

Gets the lineweight of the entity (group 370) in hundredths of a millimetre, one of AutoCAD's 0 to 211: 25 is a line 0.25 wide. Null where the file gives none, or one of the three the DXF reference gives as numbers below nought (-1 by layer, -2 by block and -3 the default), or a number not among AutoCAD's, which a warning counts. An entity of a block whose lineweight is by block has the lineweight of the INSERT that placed it.

Linetype

Gets the name of the linetype of the entity (group 6), such as DASHED, Continuous or ByBlock; null where it takes the linetype of its layer, BYLAYER, written or not. An entity of a block whose linetype is BYBLOCK has the linetype of the INSERT that placed it.

Shape

Gets the shape: a GeoLine3 for a LINE, a GeoPolylineArc2 for a LWPOLYLINE with bulges read with PlanAs2D, a DxfText for a TEXT or an MTEXT, and so on; the guide lists them all.

Thickness

Gets the thickness of the entity (group 39), how far it stands up along its extrusion, scaled to millimetres where ToMillimeters asks; nought where the file gives none. The shape is of the entity itself and does not stand up by it. Of an entity placed by an INSERT it is stretched as the INSERT stretches the extrusion, and turned over where the placed extrusion points against the entity's own: 10 is 30 under a scale of 3 along z, and -30 under one of -3.

TrueColor

Gets the colour of the entity as red, green and blue (group 420), 0xRRGGBB, which a CAD program draws in place of Color: 0xFF8000 is orange. Null where the file gives none.

Type

Gets the type of the entity as the file names it, such as LINE, LWPOLYLINE or 3DFACE; null for an entity made in code.