Table of Contents

Method TryFilletAt

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TryFilletAt(GeoPolylineArc2, int, double, out GeoPolylineArc2)

Rounds one corner of a chain, using the default tolerance.

public static bool TryFilletAt(GeoPolylineArc2 polyline, int index, double radius, out GeoPolylineArc2 result)

Parameters

polyline GeoPolylineArc2
index int
radius double
result GeoPolylineArc2

Returns

bool

TryFilletAt(GeoPolylineArc2, int, double, out GeoPolylineArc2, Tolerance)

Rounds one corner of a chain, within a tolerance.

public static bool TryFilletAt(GeoPolylineArc2 polyline, int index, double radius, out GeoPolylineArc2 result, Tolerance tolerance)

Parameters

polyline GeoPolylineArc2

The chain.

index int

Which vertex to round; the two ends have no corner and are refused.

radius double

The radius of the arc to put there.

result GeoPolylineArc2

The filleted chain, or the chain unchanged when the method returns false.

tolerance Tolerance

The tolerance.

Returns

bool

true if the corner had room for the arc on its inside; false when it had not, or when it turns by no more than EqualAngleRad.

Exceptions

ArgumentNullException

Thrown when the chain is null.

ArgumentOutOfRangeException

Thrown when the index is outside the chain or the radius is not a positive number.

TryFilletAt(GeoPolygonArc2, int, double, out GeoPolygonArc2)

Rounds one corner of a loop, using the default tolerance.

public static bool TryFilletAt(GeoPolygonArc2 polygon, int index, double radius, out GeoPolygonArc2 result)

Parameters

polygon GeoPolygonArc2
index int
radius double
result GeoPolygonArc2

Returns

bool

TryFilletAt(GeoPolygonArc2, int, double, out GeoPolygonArc2, Tolerance)

Rounds one corner of a loop, within a tolerance.

public static bool TryFilletAt(GeoPolygonArc2 polygon, int index, double radius, out GeoPolygonArc2 result, Tolerance tolerance)

Parameters

polygon GeoPolygonArc2

The loop.

index int

Which vertex to round.

radius double

The radius of the arc to put there.

result GeoPolygonArc2

The filleted loop, or the loop unchanged when the method returns false.

tolerance Tolerance

The tolerance.

Returns

bool

true if the corner had room for the arc on its inside; false when it had not, or when it turns by no more than EqualAngleRad.

Remarks

The arc stays however small, and the rest of the loop as it was, a side shorter than the global tolerance and all: at a millionth, the square 10 by 10 with its corner (0, 0) cut off by a side 0.00057 long, rounded by 1 at (10, 10), keeps the short side, where the loop was put back together within the global tolerance of a thousandth and lost it.

Exceptions

ArgumentNullException

Thrown when the loop is null.

ArgumentOutOfRangeException

Thrown when the index is outside the loop or the radius is not a positive number.

TryFilletAt(GeoPolyline2, int, double, out GeoPolylineArc2)

Rounds one corner of a straight chain.

public static bool TryFilletAt(GeoPolyline2 polyline, int index, double radius, out GeoPolylineArc2 result)

Parameters

polyline GeoPolyline2
index int
radius double
result GeoPolylineArc2

Returns

bool

TryFilletAt(GeoPolyline2, int, double, out GeoPolylineArc2, Tolerance)

Rounds one corner of a straight chain, within a tolerance.

public static bool TryFilletAt(GeoPolyline2 polyline, int index, double radius, out GeoPolylineArc2 result, Tolerance tolerance)

Parameters

polyline GeoPolyline2

The chain.

index int

Which vertex to round; the two ends of a chain are not corners.

radius double

The radius.

result GeoPolylineArc2

The rounded chain, or the chain unchanged where the corner would not take it.

tolerance Tolerance

The tolerance.

Returns

bool

true when the corner was rounded; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

TryFilletAt(GeoPolygon2, int, double, out GeoPolygonArc2)

Rounds one corner of a straight loop.

public static bool TryFilletAt(GeoPolygon2 polygon, int index, double radius, out GeoPolygonArc2 result)

Parameters

polygon GeoPolygon2
index int
radius double
result GeoPolygonArc2

Returns

bool

TryFilletAt(GeoPolygon2, int, double, out GeoPolygonArc2, Tolerance)

Rounds one corner of a straight loop, within a tolerance.

public static bool TryFilletAt(GeoPolygon2 polygon, int index, double radius, out GeoPolygonArc2 result, Tolerance tolerance)

Parameters

polygon GeoPolygon2

The loop.

index int

Which vertex to round; every vertex of a loop is a corner.

radius double

The radius.

result GeoPolygonArc2

The rounded loop, or the loop unchanged where the corner would not take it.

tolerance Tolerance

The tolerance.

Returns

bool

true when the corner was rounded; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the loop is null.