Method ProjectToPolygon2
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
ProjectToPolygon2(GeoCoordinateSystem3, GeoPolygon3)
Lays a polygon out in a frame, dropping each vertex's distance from the plane.
public static GeoPolygon2 ProjectToPolygon2(GeoCoordinateSystem3 frame, GeoPolygon3 polygon)
Parameters
frameGeoCoordinateSystem3The frame to lay it out in.
polygonGeoPolygon3The polygon.
Returns
- GeoPolygon2
The polygon in the plane of the frame. It runs counter-clockwise when the frame Z axis agrees with the polygon normal, and clockwise when it opposes it.
Remarks
The polygon is laid out side for side, however short a side: only a side seen end-on, along the Z axis of the frame, goes. A square 10 by 10 with a corner cut by 0.0005, tilted 60 degrees to the frame, keeps its five corners, where the global tolerance of a thousandth put the cut corner back. A polygon seen edge-on is refused, as one that encloses no area is when it is built, where it came out as a line of corners; one seen a hair off edge-on, the square tilted a ten-thousandth of a radian short of it and laid out as a strip 10 by 0.001, is kept.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
- ArgumentException
Thrown when the polygon, seen along the Z axis of the frame, encloses no area within the global tolerance: seen edge-on, it is a line; or when the frame has a coordinate that is not a finite number.