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
shapeobjectThe shape: any the writer has an overload of Add for that needs no tolerance, such as a GeoPolygon2 or a GeoSolid3.
layerstringThe layer; layer 0 when none is given.
colorint?The AutoCAD colour index, 1 to 255; null to take the colour of the layer.
trueColorint?The colour as 0xRRGGBB; null for none.
linetypestringThe name of the linetype, such as
DASHED; null to take the linetype of the layer.lineWeightint?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.
thicknessdoubleThe 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.