Class GeoPolygon3
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
Whether a polygon touches another shape.
public sealed class GeoPolygon3 : IEquatable<GeoPolygon3>
- Inheritance
-
GeoPolygon3
- Implements
- Inherited Members
- Extension Methods
Remarks
A shape that does not lie in this one's plane is refused rather than projected in, because projecting would report two plates a metre apart as overlapping and say nothing about it. SharesPlaneWith(GeoPlane3) asks the question beforehand. Everything comes back as GeoFace3, because joining two areas can leave a hole in the middle and only a face can hold one.
Constructors
- GeoPolygon3(params GeoPoint3[])
Initializes a new polygon directly from vertex arguments.
- GeoPolygon3(IEnumerable<GeoPoint3>)
Initializes a new polygon from a sequence of coplanar vertices.
- GeoPolygon3(IEnumerable<GeoPoint3>, Tolerance)
Initializes a new polygon from a sequence of coplanar vertices, within a tolerance.
Properties
- Area
Gets the area of the polygon.
- Centroid
Gets the centroid of the polygon area.
- EdgeCount
Gets the number of edges, which for a closed loop equals the number of vertices.
- this[int]
Gets the vertex at a given index.
- Length
Gets the total length of the boundary.
- Normal
Gets the unit normal of the polygon, following the right-hand rule around its vertex order.
- VertexCount
Gets the number of vertices.
- Vertices
Gets the read-only list of vertices defining the polygon.
Methods
- Chamfer(double)
Cuts every corner of the loop back by the same distance.
- Chamfer(double, Tolerance)
Cuts every corner of the loop back by the same distance, within a tolerance.
- Chamfer(double, double)
Cuts every corner of the loop back, by one distance along the way in and another along the way out.
- Chamfer(double, double, Tolerance)
Cuts every corner of the loop back, by one distance along the way in and another along the way out, within a tolerance.
- Clone()
Creates a copy of this polygon.
- CollidesWith(GeoArc3)
Checks whether this polygon touches an arc, using the default tolerance.
- CollidesWith(GeoArc3, Tolerance)
Checks whether this polygon touches an arc, within a tolerance.
- CollidesWith(GeoCircle3)
Checks whether this polygon touches a circle, using the default tolerance.
- CollidesWith(GeoCircle3, Tolerance)
Checks whether this polygon touches a circle, within a tolerance.
- CollidesWith(GeoEdge3)
Checks whether this polygon touches an edge.
- CollidesWith(GeoEdge3, Tolerance)
Checks whether this polygon touches an edge, within a tolerance.
- CollidesWith(GeoLine3)
Checks whether this polygon touches a segment, using the default tolerance.
- CollidesWith(GeoLine3, Tolerance)
Checks whether this polygon touches a segment, within a tolerance.
- CollidesWith(GeoObb3)
Checks whether this polygon touches an oriented box, using the default tolerance.
- CollidesWith(GeoObb3, Tolerance)
Checks whether this polygon touches an oriented box, within a tolerance.
- CollidesWith(GeoPolygonArc3)
Checks whether this polygon touches a curved loop.
- CollidesWith(GeoPolygonArc3, Tolerance)
Checks whether this polygon touches a curved loop, within a tolerance.
- CollidesWith(GeoPolylineArc3)
Checks whether this polygon touches a curved chain.
- CollidesWith(GeoPolylineArc3, Tolerance)
Checks whether this polygon touches a curved chain, within a tolerance.
- CollidesWith(GeoRay3)
Checks whether a ray runs into this polygon, using the default tolerance.
- CollidesWith(GeoRay3, Tolerance)
Checks whether a ray runs into this polygon, within a tolerance.
- CollidesWith(GeoSolid3)
Checks whether this polygon touches a solid, using the default tolerance.
- CollidesWith(GeoSolid3, Tolerance)
Checks whether this polygon touches a solid, within a tolerance.
- Contains(GeoPoint3)
Checks whether this polygon holds a point, using the default tolerance.
- Contains(GeoPoint3, Tolerance)
Checks whether this polygon holds a point, within a tolerance.
- DistanceTo(GeoLine3)
Gets the distance from this polygon to a segment, using the default tolerance.
- DistanceTo(GeoLine3, Tolerance)
Gets the distance from this polygon to a segment, within a tolerance.
- DistanceTo(GeoPoint3)
Calculates the shortest distance from this polygon to a point.
- DistanceTo(GeoPolyline3)
Gets the distance from this polygon to a polyline, using the default tolerance.
- DistanceTo(GeoPolyline3, Tolerance)
Gets the distance from this polygon to a polyline, within a tolerance.
- DistanceTo(GeoSolid3)
Gets the distance from this polygon to a solid, using the default tolerance.
- DistanceTo(GeoSolid3, Tolerance)
Gets the distance from this polygon to a solid, within a tolerance.
- Equals(GeoPolygon3)
Determines whether another polygon has exactly the same vertices, in the same order.
- Equals(object)
Determines whether the specified object is equal to the current polygon.
- Fillet(IReadOnlyList<double>)
Rounds the corners of the loop, one radius each.
- Fillet(IReadOnlyList<double>, Tolerance)
Rounds the corners of the loop, one radius each, within a tolerance.
- Fillet(double)
Rounds every corner of the loop by the same radius.
- Fillet(double, Tolerance)
Rounds every corner of the loop by the same radius, within a tolerance.
- Flip()
Gets the polygon with its vertices in the opposite order, so its normal reverses.
- GetAabb()
Gets the axis-aligned bounding box enclosing this polygon.
- GetClosestPointOnBoundary(GeoPoint3)
Gets the point on this polygon closest to a target point.
- GetDistanceAtParameter(double)
Gets the arc length from the first vertex to a normalized parameter around the boundary.
- GetDistanceAtPoint(GeoPoint3)
Gets the arc length from the first vertex to the point on the boundary closest to the supplied point.
- GetDistanceAtPoint(GeoPoint3, Tolerance)
Gets the arc length from the first vertex to the point on the boundary closest to the supplied point, within a tolerance.
- GetEdgeAt(int)
Gets the edge at a given index, with the last edge closing the loop.
- GetEdges()
Gets every edge of the polygon, in order around the loop.
- GetFrame()
Gets the frame of this polygon: its plane, with the origin at the first vertex and the first axis along the first edge that has a direction, so the frame turns with the polygon.
- GetHashCode()
Returns the hash code for this instance.
- GetIntersections(GeoArc3)
Gets every point where an arc crosses this polygon, using the default tolerance.
- GetIntersections(GeoArc3, Tolerance)
Gets every point where an arc crosses this polygon, within a tolerance.
- GetIntersections(GeoCircle3)
Gets every point where a circle crosses this polygon, using the default tolerance.
- GetIntersections(GeoCircle3, Tolerance)
Gets every point where a circle crosses this polygon, within a tolerance.
- GetIntersections(GeoEdge3)
Gets every point where an edge crosses this polygon.
- GetIntersections(GeoEdge3, Tolerance)
Gets every point where an edge crosses this polygon, within a tolerance.
- GetIntersections(GeoLine3)
Gets every point where a segment crosses this polygon.
- GetIntersections(GeoLine3, Tolerance)
Gets every point where a segment crosses this polygon, within a tolerance.
- GetIntersections(GeoPolygonArc3)
Gets every point where a curved loop crosses this polygon.
- GetIntersections(GeoPolygonArc3, Tolerance)
Gets every point where a curved loop crosses this polygon, within a tolerance.
- GetIntersections(GeoPolylineArc3)
Gets every point where a curved chain crosses this polygon.
- GetIntersections(GeoPolylineArc3, Tolerance)
Gets every point where a curved chain crosses this polygon, within a tolerance.
- GetParameterAtDistance(double)
Gets the normalized parameter at an arc length measured around the boundary.
- GetParameterAtPoint(GeoPoint3)
Gets the normalized parameter of the point on the boundary closest to the supplied point.
- GetParameterAtPoint(GeoPoint3, Tolerance)
Gets the normalized parameter of the point on the boundary closest to the supplied point, within a tolerance.
- GetPlane()
Gets the plane carrying the polygon, oriented along its normal.
- GetPointAtDistance(double)
Gets the point at an arc length measured around the boundary from the first vertex.
- GetPointAtParameter(double)
Gets the point at a normalized parameter around the boundary, starting at the first vertex. The parameter wraps, so 1.25 gives the same point as 0.25.
- Intersect(GeoFace3)
Keeps what this polygon and a face both cover.
- Intersect(GeoFace3, Tolerance)
Keeps what this polygon and a face both cover, within a tolerance.
- Intersect(GeoPolygon3)
Keeps what this polygon and a polygon both cover.
- Intersect(GeoPolygon3, Tolerance)
Keeps what this polygon and a polygon both cover, within a tolerance.
- Intersect(GeoPolygonArc3)
Keeps what this polygon and a curved loop both cover.
- Intersect(GeoPolygonArc3, Tolerance)
Keeps what this polygon and a curved loop both cover, within a tolerance.
- IsEqualTo(GeoPolygon3)
Compares whether this polygon equals another using the default tolerance.
- IsEqualTo(GeoPolygon3, Tolerance)
Compares whether this polygon equals another within a tolerance.
- IsPointOn(GeoPoint3)
Checks whether a point lies on the boundary of this polygon, using the default tolerance.
- IsPointOn(GeoPoint3, Tolerance)
Checks whether a point lies on the boundary of this polygon, within a tolerance.
- IsSimple()
Checks whether this polygon is simple, using the default tolerance: no edge crosses or touches another except where neighbours share their vertex.
- IsSimple(Tolerance)
Checks whether this polygon is simple, within a tolerance.
- Locate(GeoPoint3)
Locates a point relative to this polygon, using the default tolerance.
- Locate(GeoPoint3, Tolerance)
Locates a point relative to this polygon, within a tolerance.
- Offset(double)
Grows this polygon within its own plane by a distance, or shrinks it when the distance is negative, with sharp corners, using the default tolerance. See Offset(GeoPolygon3, double, OffsetOptions, Tolerance).
- Offset(double, OffsetJoin)
Grows this polygon within its own plane by a distance, or shrinks it when the distance is negative, with the given corners, using the default tolerance.
- Offset(double, OffsetJoin, Tolerance)
Grows this polygon within its own plane by a distance, or shrinks it when the distance is negative, with the given corners, within a tolerance.
- Offset(double, OffsetOptions)
Grows this polygon within its own plane by a distance, or shrinks it when the distance is negative, as the options say, using the default tolerance.
- Offset(double, OffsetOptions, Tolerance)
Grows this polygon within its own plane by a distance, or shrinks it when the distance is negative, as the options say, within a tolerance.
- Offset(double, Tolerance)
Grows this polygon within its own plane by a distance, or shrinks it when the distance is negative, with sharp corners, within a tolerance.
- ProjectToPolygon2(GeoCoordinateSystem3)
Lays this polygon out in a frame, dropping each vertex's distance from the plane of that frame.
- Reverse()
Gets the polygon running the other way round.
- SharesPlaneWith(GeoPlane3)
Determines whether a plane is the plane this polygon lies in.
- SharesPlaneWith(GeoPlane3, Tolerance)
Determines whether a plane is the plane this polygon lies in, within a tolerance.
- Subtract(GeoFace3)
Takes a face out of this polygon.
- Subtract(GeoFace3, Tolerance)
Takes a face out of this polygon, within a tolerance.
- Subtract(GeoPolygon3)
Takes a polygon out of this polygon.
- Subtract(GeoPolygon3, Tolerance)
Takes a polygon out of this polygon, within a tolerance.
- Subtract(GeoPolygonArc3)
Takes a curved loop out of this polygon.
- Subtract(GeoPolygonArc3, Tolerance)
Takes a curved loop out of this polygon, within a tolerance.
- ToPolyline()
Gets the boundary of this polygon as an open chain, with the closing vertex written out.
- ToString()
Returns a string that represents the current polygon.
- TransformBy(GeoTransform3)
Applies a transformation to every vertex.
- Translate(GeoVector3)
Moves the polygon by a vector.
- Triangulate()
Breaks the polygon into triangles.
- TryChamferAt(int, double, double, out GeoPolygon3)
Cuts one corner of the loop back; every vertex of a loop is a corner.
- TryChamferAt(int, double, double, out GeoPolygon3, Tolerance)
Cuts one corner of the loop back within a tolerance; every vertex of a loop is a corner.
- TryFilletAt(int, double, out GeoPolygonArc3)
Rounds one corner of the loop; every vertex of a loop is a corner.
- TryFilletAt(int, double, out GeoPolygonArc3, Tolerance)
Rounds one corner of the loop within a tolerance; every vertex of a loop is a corner.
- TryIntersectWith(GeoArc3, out GeoPoint3[])
Tries to find where an arc crosses this polygon, using the default tolerance.
- TryIntersectWith(GeoArc3, out GeoPoint3[], Tolerance)
Tries to find where an arc crosses this polygon, within a tolerance.
- TryIntersectWith(GeoCircle3, out GeoPoint3[])
Tries to find where a circle crosses this polygon, using the default tolerance.
- TryIntersectWith(GeoCircle3, out GeoPoint3[], Tolerance)
Tries to find where a circle crosses this polygon, within a tolerance.
- TryIntersectWith(GeoLine3, out GeoPoint3)
Tries to find the point where a line segment crosses this polygon, using the default tolerance.
- TryIntersectWith(GeoLine3, out GeoPoint3, Tolerance)
Tries to find the point where a line segment crosses this polygon, within a tolerance.
- TryIntersectWith(GeoRay3, out GeoPoint3)
Tries to find the point where a ray crosses this polygon, using the default tolerance.
- TryIntersectWith(GeoRay3, out GeoPoint3, Tolerance)
Tries to find the point where a ray crosses this polygon, within a tolerance.
- TrySplitBy(GeoPlane3, out GeoPolygon3[], out GeoPolygon3[])
Splits this polygon by a plane, using the default tolerance.
- TrySplitBy(GeoPlane3, out GeoPolygon3[], out GeoPolygon3[], Tolerance)
Splits this polygon by a plane, within a tolerance.
- TrySplitBy(GeoPolyline3, out GeoPolygon3[])
Splits this polygon along a chain drawn across it, using the default tolerance.
- TrySplitBy(GeoPolyline3, out GeoPolygon3[], Tolerance)
Splits this polygon along a chain drawn across it, within a tolerance.
- TrySplitBy(GeoSolid3, out GeoPolygon3[], out GeoPolygon3[])
Splits this polygon by a solid, sorting the pieces into those inside it and those outside, using the default tolerance.
- TrySplitBy(GeoSolid3, out GeoPolygon3[], out GeoPolygon3[], Tolerance)
Splits this polygon by a solid, within a tolerance.
- Union(GeoFace3)
Joins this polygon to a face.
- Union(GeoFace3, Tolerance)
Joins this polygon to a face, within a tolerance.
- Union(GeoPolygon3)
Joins this polygon to a polygon.
- Union(GeoPolygon3, Tolerance)
Joins this polygon to a polygon, within a tolerance.
- Union(GeoPolygonArc3)
Joins this polygon to a curved loop.
- Union(GeoPolygonArc3, Tolerance)
Joins this polygon to a curved loop, within a tolerance.
- Xor(GeoFace3)
Keeps what this polygon and a face cover between them but do not share.
- Xor(GeoFace3, Tolerance)
Keeps what this polygon and a face cover between them but do not share, within a tolerance.
- Xor(GeoPolygon3)
Keeps what this polygon and a polygon cover between them but do not share.
- Xor(GeoPolygon3, Tolerance)
Keeps what this polygon and a polygon cover between them but do not share, within a tolerance.
- Xor(GeoPolygonArc3)
Keeps what this polygon and a curved loop cover between them but do not share.
- Xor(GeoPolygonArc3, Tolerance)
Keeps what this polygon and a curved loop cover between them but do not share, within a tolerance.