Method ToPolyline
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
ToPolyline()
Gets the polyline that runs along the spline, as AutoCAD's ToPolyline: as ToPolylineWithPrecision(int, bool, bool)
of precision 10, of arcs, a DxfPolyline where the spline is flat.
public DxfCurve ToPolyline()
Returns
- DxfCurve
The polyline, of the spline's look, in no file.
Exceptions
- InvalidOperationException
Thrown when the spline has no data that make a spline.
ToPolyline(bool, bool)
Gets the polyline that runs along the spline, as AutoCAD's ToPolyline, as ToPolylineWithPrecision(int, bool, bool) of precision 10.
public DxfCurve ToPolyline(bool bConvertAsArcs, bool bToLWPolyline)
Parameters
bConvertAsArcsboolWhether its segments are arcs, each turning as the spline's tangent turns along it; lines where false, and for a spline that is not flat.
bToLWPolylineboolWhether a flat spline gives a DxfPolyline; a DxfPolyline2d where false.
Returns
- DxfCurve
The polyline, of the spline's look, in no file.
Exceptions
- InvalidOperationException
Thrown when the spline has no data that make a spline.
ToPolyline(int)
Gets the polyline of a count of vertices that runs along the spline, the library's own reading of AutoCAD's
ToPolyline, as ToPolyline(int, bool, bool) says: of arcs, a DxfPolyline where the
spline is flat.
public DxfCurve ToPolyline(int numOfVertices)
Parameters
numOfVerticesintHow many vertices, 2 or more, set evenly along the spline's length.
Returns
- DxfCurve
The polyline, of the spline's look, in no file.
Exceptions
- ArgumentOutOfRangeException
Thrown when the count is below 2.
- InvalidOperationException
Thrown when the spline has no data that make a spline.
ToPolyline(int, bool, bool)
Gets the polyline of a count of vertices that runs along the spline, the library's own reading of AutoCAD's
ToPolyline: the vertices set evenly along the spline's length, a closed spline's last on its first, which the
closed polyline joins back to; each segment a line, or the arc through its ends and the spline's point halfway between
them. A quarter of a circle of radius 100 made a spline, given 3 vertices and arcs, is two arcs of radius 100 to within
the rounding. AutoCAD 2021 keeps a different promise: it was seen to give the cubic of one span 33 vertices for every
count from 2 to 50 and 65 for 99, the cubic of two spans 50 for every count from 3 to 99, and to refuse the smallest
counts (2 for two spans, 2 and 3 for three); the count it is given is not the count it makes.
public DxfCurve ToPolyline(int numOfVertices, bool bConvertAsArcs, bool bToLWPolyline)
Parameters
numOfVerticesintHow many vertices, 2 or more.
bConvertAsArcsboolWhether its segments are arcs; lines where false, and for a spline that is not flat.
bToLWPolylineboolWhether a flat spline gives a DxfPolyline; a DxfPolyline2d where false. A spline that is not flat gives a DxfPolyline3d.
Returns
- DxfCurve
The polyline, of the spline's look, in no file.
Exceptions
- ArgumentOutOfRangeException
Thrown when the count is below 2.
- InvalidOperationException
Thrown when the spline has no data that make a spline.