Constructor GeoPolylineArc2
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GeoPolylineArc2(IEnumerable<GeoPoint2>)
Initializes a chain of straight pieces.
public GeoPolylineArc2(IEnumerable<GeoPoint2> vertices)
Parameters
verticesIEnumerable<GeoPoint2>The vertices, in order; at least two, and no two neighbours in the same place.
Exceptions
- ArgumentNullException
Thrown when the vertices are null.
- ArgumentException
Thrown when fewer than two distinct vertices are given.
GeoPolylineArc2(IEnumerable<GeoPoint2>, IEnumerable<double>)
Initializes a chain whose pieces may be arcs.
public GeoPolylineArc2(IEnumerable<GeoPoint2> vertices, IEnumerable<double> bulges)
Parameters
verticesIEnumerable<GeoPoint2>The vertices, in order; at least two, and no two neighbours in the same place.
bulgesIEnumerable<double>The bulge of the edge leaving each vertex; null or short means the rest are straight, and anything past the last edge is ignored.
Remarks
A vertex within the global point tolerance of the one kept before it is dropped, and so is the edge between the two, which has no length; the edge running on from the dropped vertex keeps its own bulge. The chain (0, 0), (10, 0), (10.0004, 0), (20, 0) with bulges 0, 0, 1 is the straight edge to (10, 0) and then the half circle of bulge 1 from there to (20, 0).
Exceptions
- ArgumentNullException
Thrown when the vertices are null.
- ArgumentException
Thrown when fewer than two distinct vertices are given.
GeoPolylineArc2(IEnumerable<GeoEdge2>)
Initializes a chain from edges that run end to end.
public GeoPolylineArc2(IEnumerable<GeoEdge2> edges)
Parameters
edgesIEnumerable<GeoEdge2>The edges, each starting where the one before it ended.
Exceptions
- ArgumentNullException
Thrown when the edges are null.
- ArgumentException
Thrown when no edges are given, or one does not start where the one before it ended.
GeoPolylineArc2(GeoPolyline2)
Initializes a chain from a straight one, with no bulges.
public GeoPolylineArc2(GeoPolyline2 polyline)
Parameters
polylineGeoPolyline2The straight chain to widen.
Remarks
Widening loses nothing: every edge simply carries a bulge of zero. It is Flatten() going the other way that approximates.
Exceptions
- ArgumentNullException
Thrown when the chain is null.