Constructor DxfPolyline2d
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
DxfPolyline2d()
Initializes a polyline of no vertices, as AutoCAD's new Polyline2d(), on layer 0 in no file.
public DxfPolyline2d()
DxfPolyline2d(DxfPoly2dType, IEnumerable<GeoPoint3>, double, bool, double, double, IEnumerable<double>)
Initializes a polyline of vertices, as AutoCAD's new Polyline2d(type, vertices, elevation, closed, startWidth,
endWidth, bulges), on layer 0 in no file until it is added to one.
public DxfPolyline2d(DxfPoly2dType type, IEnumerable<GeoPoint3> vertices, double elevation, bool closed, double startWidth, double endWidth, IEnumerable<double> bulges)
Parameters
typeDxfPoly2dTypeHow it is drawn: SimplePoly, the one made in code; fit it afterwards with ConvertToPolyType(DxfPoly2dType).
verticesIEnumerable<GeoPoint3>The vertices, in the system of the normal (0, 0, 1); their heights are not read.
elevationdoubleThe height of its plane.
closedboolWhether a segment runs from the last vertex back to the first.
startWidthdoubleThe width where each segment starts, its default start width too.
endWidthdoubleThe width where each segment ends, its default end width too.
bulgesIEnumerable<double>The bulge of each vertex, as many as there are vertices; null for none.
Exceptions
- ArgumentNullException
Thrown when the vertices are null.
- ArgumentException
Thrown when a coordinate is not finite, or the bulges are not one to each vertex.
- ArgumentOutOfRangeException
Thrown when a number is not finite, or a width is below nought.
- NotSupportedException
Thrown for a type other than SimplePoly: make the polyline straight and fit it with ConvertToPolyType(DxfPoly2dType).