Table of Contents

Method ToPolylineByChordTolerance

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

ToPolylineByChordTolerance(double)

Approximates the arc as a chain that strays no further from it than a chord tolerance.

public GeoPolyline2 ToPolylineByChordTolerance(double chordTolerance)

Parameters

chordTolerance double

The largest gap allowed between a piece and the arc, in drawing units. Zero picks the automatic share of the radius.

Returns

GeoPolyline2

A chain from the start of the arc to its end.

Remarks

The promise holds however fine the tolerance and however large the radius: a quarter turn of radius 50 000 cut within 1E-4 is 12 419 pieces, and an arc of radius 83 333 sweeping 0.0012 radians is 13, not the one chord that 4 096 pieces a turn would allow. An arc that the tolerance would cut into more than 1 048 576 pieces is refused. Points closer together than the point tolerance are merged by the chain, 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 pieces.