ClipperOffset.ArcTolerance

Delphi property ArcTolerance: double; //read and write

C++ double ArcTolerance;

C#  public double ArcTolerance {get; set;}


ArcTolerance is only relevant when offsetting with JoinType.Round and / or EndType.Round (see ClipperOffset.AddPath and ClipperOffset.AddPaths).

The Clipper2 library approximates arcs by using series of relatively short straight line segments (see Trigonometry). And logically, shorter line segments will produce better arc approximations. But very short segments can degrade performance, usually with little or no discernable improvement in curve quality. Very short segments can even detract from curve quality, due to the effects of integer rounding.

Arc tolerance is user defined since there isn't an optimal number of line segments for any given arc radius (ie that perfectly balances curve approximation with performance). Nevertheless, when the user doesn't define an arc tolerance (the default value == 0.0), the default calculated arc tolerance (see below) will generally produces smooth arc approximations while avoiding excessively small segment lengths.

The default ArcTolerance is: offset_radius / 500.

When changing ArcTolerance to a value > 0, it needs to be a sensible fraction of the offset delta for the reasons given above.

See Also

Trigonometry, AddPath, AddPaths