Method ToPolygonByChordTolerance
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
ToPolygonByChordTolerance(double)
Approximates the circle as a polygon that strays no further from it than a chord tolerance.
public GeoPolygon2 ToPolygonByChordTolerance(double chordTolerance)
Parameters
chordTolerancedoubleThe largest gap allowed between an edge and the circle, in drawing units. Zero picks the automatic share of the radius.
Returns
- GeoPolygon2
A polygon inscribed in the circle.
Remarks
The promise holds however fine the tolerance and however large the radius: a circle of radius 50 000 cut within 0.01 is 4 968 corners, which 4 096 a turn would have strayed 0.0147 from. A tolerance that needs more than 1 048 576 corners is refused. Corners closer together than the point tolerance are merged by the polygon, so chords shorter than that are not kept, as for Flatten(double).
Exceptions
- ArgumentOutOfRangeException
Thrown when the tolerance is negative or not a number, or needs more than 1 048 576 corners.