Table of Contents

Method Fillet

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

Fillet(GeoPolylineArc2, double, Tolerance)

Rounds every corner of a chain that has room for it with an arc of a given radius, within a tolerance.

public static GeoPolylineArc2 Fillet(GeoPolylineArc2 polyline, double radius, Tolerance tolerance)

Parameters

polyline GeoPolylineArc2

The chain.

radius double

The radius of the arcs.

tolerance Tolerance

The tolerance.

Returns

GeoPolylineArc2

The filleted chain.

Exceptions

ArgumentNullException

Thrown when the chain is null.

ArgumentOutOfRangeException

Thrown when the radius is not a positive number.

Fillet(GeoPolygonArc2, double, Tolerance)

Rounds every corner of a loop that has room for it with an arc of a given radius, within a tolerance.

public static GeoPolygonArc2 Fillet(GeoPolygonArc2 polygon, double radius, Tolerance tolerance)

Parameters

polygon GeoPolygonArc2
radius double
tolerance Tolerance

Returns

GeoPolygonArc2

The filleted loop.

Exceptions

ArgumentNullException

Thrown when the loop is null.

ArgumentOutOfRangeException

Thrown when the radius is not a positive number.

Fillet(GeoPolylineArc2, IReadOnlyList<double>)

Rounds the corners of a chain, each by its own radius, using the default tolerance.

public static GeoPolylineArc2 Fillet(GeoPolylineArc2 polyline, IReadOnlyList<double> radii)

Parameters

polyline GeoPolylineArc2
radii IReadOnlyList<double>

Returns

GeoPolylineArc2

Fillet(GeoPolylineArc2, IReadOnlyList<double>, Tolerance)

Rounds the corners of a chain, each by its own radius, within a tolerance.

public static GeoPolylineArc2 Fillet(GeoPolylineArc2 polyline, IReadOnlyList<double> radii, Tolerance tolerance)

Parameters

polyline GeoPolylineArc2

The chain.

radii IReadOnlyList<double>

One radius per vertex, in the order the chain holds them; zero leaves that corner alone, and the two ends have no corner to round.

tolerance Tolerance

The tolerance.

Returns

GeoPolylineArc2

The filleted chain.

Remarks

The radii are read the way GetBulgeAt(int) is read: the entry at an index belongs to the vertex at that index. A list shorter than the chain leaves the rest of the corners alone. The rules for a corner that will not fit are the ones a single radius follows, and they matter more here: where two neighbours together ask for more than the edge between them is long, the one taking more of it is dropped, so a corner asking for fifty gives way to one asking for five rather than the other way round.

Exceptions

ArgumentNullException

Thrown when the chain or the radii are null.

ArgumentOutOfRangeException

Thrown when a radius is negative or not a number.

Fillet(GeoPolygonArc2, IReadOnlyList<double>)

Rounds the corners of a loop, each by its own radius, using the default tolerance.

public static GeoPolygonArc2 Fillet(GeoPolygonArc2 polygon, IReadOnlyList<double> radii)

Parameters

polygon GeoPolygonArc2
radii IReadOnlyList<double>

Returns

GeoPolygonArc2

Fillet(GeoPolygonArc2, IReadOnlyList<double>, Tolerance)

Rounds the corners of a loop, each by its own radius, within a tolerance.

public static GeoPolygonArc2 Fillet(GeoPolygonArc2 polygon, IReadOnlyList<double> radii, Tolerance tolerance)

Parameters

polygon GeoPolygonArc2

The loop.

radii IReadOnlyList<double>

One radius per vertex, in the order the loop holds them; zero leaves that corner alone.

tolerance Tolerance

The tolerance.

Returns

GeoPolygonArc2

The filleted loop.

Exceptions

ArgumentNullException

Thrown when the loop or the radii are null.

ArgumentOutOfRangeException

Thrown when a radius is negative or not a number.

Fillet(GeoPolyline2, double)

Rounds every corner of a straight chain by the same radius.

public static GeoPolylineArc2 Fillet(GeoPolyline2 polyline, double radius)

Parameters

polyline GeoPolyline2
radius double

Returns

GeoPolylineArc2

Fillet(GeoPolyline2, double, Tolerance)

Rounds every corner of a straight chain by the same radius, within a tolerance.

public static GeoPolylineArc2 Fillet(GeoPolyline2 polyline, double radius, Tolerance tolerance)

Parameters

polyline GeoPolyline2

The chain.

radius double

The radius to round every corner by.

tolerance Tolerance

The tolerance.

Returns

GeoPolylineArc2

The chain with its corners rounded; a corner with too little edge to give is left alone.

Exceptions

ArgumentNullException

Thrown when the chain is null.

Fillet(GeoPolyline2, IReadOnlyList<double>)

Rounds the corners of a straight chain, one radius each.

public static GeoPolylineArc2 Fillet(GeoPolyline2 polyline, IReadOnlyList<double> radii)

Parameters

polyline GeoPolyline2
radii IReadOnlyList<double>

Returns

GeoPolylineArc2

Fillet(GeoPolyline2, IReadOnlyList<double>, Tolerance)

Rounds the corners of a straight chain, one radius each, within a tolerance.

public static GeoPolylineArc2 Fillet(GeoPolyline2 polyline, IReadOnlyList<double> radii, Tolerance tolerance)

Parameters

polyline GeoPolyline2

The chain.

radii IReadOnlyList<double>

A radius per corner; nought leaves that corner square.

tolerance Tolerance

The tolerance.

Returns

GeoPolylineArc2

The chain with the corners the radii asked for rounded.

Exceptions

ArgumentNullException

Thrown when the chain or the list of radii is null.

Fillet(GeoPolygon2, double)

Rounds every corner of a straight loop by the same radius.

public static GeoPolygonArc2 Fillet(GeoPolygon2 polygon, double radius)

Parameters

polygon GeoPolygon2
radius double

Returns

GeoPolygonArc2

Fillet(GeoPolygon2, double, Tolerance)

Rounds every corner of a straight loop by the same radius, within a tolerance.

public static GeoPolygonArc2 Fillet(GeoPolygon2 polygon, double radius, Tolerance tolerance)

Parameters

polygon GeoPolygon2

The loop.

radius double

The radius to round every corner by.

tolerance Tolerance

The tolerance.

Returns

GeoPolygonArc2

The loop with its corners rounded; a corner with too little edge to give is left alone.

Exceptions

ArgumentNullException

Thrown when the loop is null.

Fillet(GeoPolygon2, IReadOnlyList<double>)

Rounds the corners of a straight loop, one radius each.

public static GeoPolygonArc2 Fillet(GeoPolygon2 polygon, IReadOnlyList<double> radii)

Parameters

polygon GeoPolygon2
radii IReadOnlyList<double>

Returns

GeoPolygonArc2

Fillet(GeoPolygon2, IReadOnlyList<double>, Tolerance)

Rounds the corners of a straight loop, one radius each, within a tolerance.

public static GeoPolygonArc2 Fillet(GeoPolygon2 polygon, IReadOnlyList<double> radii, Tolerance tolerance)

Parameters

polygon GeoPolygon2

The loop.

radii IReadOnlyList<double>

A radius per corner; nought leaves that corner square.

tolerance Tolerance

The tolerance.

Returns

GeoPolygonArc2

The loop with the corners the radii asked for rounded.

Exceptions

ArgumentNullException

Thrown when the loop or the list of radii is null.