Constructor GeoPolygon3
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GeoPolygon3(IEnumerable<GeoPoint3>)
Initializes a new polygon from a sequence of coplanar vertices.
public GeoPolygon3(IEnumerable<GeoPoint3> vertices)
Parameters
verticesIEnumerable<GeoPoint3>The vertices, in order around the loop.
Remarks
Consecutive duplicates within tolerance are dropped and a repeated closing vertex is removed, so the loop closes implicitly and no zero-length edge survives. The normal and area are measured once here rather than on every read: the polygon cannot change afterwards, and the Newell sum they both come from is a full pass over the vertices.
Exceptions
- ArgumentNullException
Thrown when the sequence is null.
- ArgumentException
Thrown when fewer than three distinct vertices remain, when they are collinear, or when they do not lie on a common plane.
GeoPolygon3(IEnumerable<GeoPoint3>, Tolerance)
Initializes a new polygon from a sequence of coplanar vertices, within a tolerance.
public GeoPolygon3(IEnumerable<GeoPoint3> vertices, Tolerance tolerance)
Parameters
verticesIEnumerable<GeoPoint3>The vertices, in order around the loop.
toleranceToleranceThe tolerance deciding duplicate vertices and flatness.
GeoPolygon3(params GeoPoint3[])
Initializes a new polygon directly from vertex arguments.
public GeoPolygon3(params GeoPoint3[] vertices)
Parameters
verticesGeoPoint3[]