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
polylineGeoPolylineArc2The chain.
radiusdoubleThe radius of the arcs.
toleranceToleranceThe 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
polygonGeoPolygonArc2radiusdoubletoleranceTolerance
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
polylineGeoPolylineArc2radiiIReadOnlyList<double>
Returns
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
polylineGeoPolylineArc2The chain.
radiiIReadOnlyList<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.
toleranceToleranceThe 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
polygonGeoPolygonArc2radiiIReadOnlyList<double>
Returns
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
polygonGeoPolygonArc2The loop.
radiiIReadOnlyList<double>One radius per vertex, in the order the loop holds them; zero leaves that corner alone.
toleranceToleranceThe 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
polylineGeoPolyline2radiusdouble
Returns
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
polylineGeoPolyline2The chain.
radiusdoubleThe radius to round every corner by.
toleranceToleranceThe 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
polylineGeoPolyline2radiiIReadOnlyList<double>
Returns
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
polylineGeoPolyline2The chain.
radiiIReadOnlyList<double>A radius per corner; nought leaves that corner square.
toleranceToleranceThe 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
polygonGeoPolygon2radiusdouble
Returns
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
polygonGeoPolygon2The loop.
radiusdoubleThe radius to round every corner by.
toleranceToleranceThe 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
polygonGeoPolygon2radiiIReadOnlyList<double>
Returns
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
polygonGeoPolygon2The loop.
radiiIReadOnlyList<double>A radius per corner; nought leaves that corner square.
toleranceToleranceThe 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.