Constructor GeoPolygonArc2
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GeoPolygonArc2(IEnumerable<GeoPoint2>)
Initializes a loop of straight edges.
public GeoPolygonArc2(IEnumerable<GeoPoint2> vertices)
Parameters
verticesIEnumerable<GeoPoint2>The vertices, in order; at least three distinct ones.
Exceptions
- ArgumentNullException
Thrown when the vertices are null.
- ArgumentException
Thrown when fewer than three distinct vertices are given.
GeoPolygonArc2(IEnumerable<GeoPoint2>, IEnumerable<double>)
Initializes a loop whose edges may be arcs.
public GeoPolygonArc2(IEnumerable<GeoPoint2> vertices, IEnumerable<double> bulges)
Parameters
verticesIEnumerable<GeoPoint2>The vertices, in order; at least three distinct ones.
bulgesIEnumerable<double>The bulge of the edge leaving each vertex; null or short means the rest are straight.
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 square (0, 0), (10, 0), (10.0004, 0), (20, 0), (20, 20), (0, 20) with bulges 0, 0, 1, 0, 0, 0 has five corners, and a half circle from (10, 0) to (20, 0) below its bottom. A last vertex repeating the first says nothing the loop does not already say and is dropped too, but its bulge is kept for the closing edge: the edge coming into it keeps its own bulge when it curves, and takes the repeated vertex's when it is straight. The loop (0, 0), (100, 0), (100, 100), (0, 0) with bulges 0, 0, 0, 0.25 is three corners whose closing edge, from (100, 100) back to the origin, bulges 0.25.
Exceptions
- ArgumentNullException
Thrown when the vertices are null.
- ArgumentException
Thrown when fewer than three distinct vertices are given.
GeoPolygonArc2(GeoPolygon2)
Initializes a loop from a straight polygon, with no bulges.
public GeoPolygonArc2(GeoPolygon2 polygon)
Parameters
polygonGeoPolygon2The straight polygon to widen.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.