Table of Contents

Constructor DxfShape

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

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).

public DxfShape(object shape, string layer = null, int? color = null, int? trueColor = null, string linetype = null, int? lineWeight = null, double thickness = 0)

Parameters

shape object

The shape: any the writer has an overload of Add for that needs no tolerance, such as a GeoPolygon2 or a GeoSolid3.

layer string

The layer; layer 0 when none is given.

color int?

The AutoCAD colour index, 1 to 255; null to take the colour of the layer.

trueColor int?

The colour as 0xRRGGBB; null for none.

linetype string

The name of the linetype, such as DASHED; null to take the linetype of the layer.

lineWeight int?

The lineweight in hundredths of a millimetre, one of AutoCAD's: 0, 5, 9, 13, 15, 18, 20, 25, 30, 35, 40, 50, 53, 60, 70, 80, 90, 100, 106, 120, 140, 158, 200 or 211; null to take the layer's.

thickness double

The thickness, written on the entities that have one; nought for none.

Remarks

The entity has no Type and no Handle, the file not having named them, and no Groups. A plate on the layer steel in red is new DxfShape(plate, "steel", color: 1).

Exceptions

ArgumentNullException

Thrown when the shape is null.

ArgumentOutOfRangeException

Thrown when the colour or true colour is outside its range, the lineweight not one of AutoCAD's, or the thickness not a finite number.