Method Fillet
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Fillet(GeoPolyline3, double)
Rounds every corner of a straight chain by the same radius.
public static GeoPolylineArc3 Fillet(GeoPolyline3 polyline, double radius)
Parameters
polylineGeoPolyline3radiusdouble
Returns
Fillet(GeoPolyline3, double, Tolerance)
Rounds every corner of a straight chain by the same radius, within a tolerance.
public static GeoPolylineArc3 Fillet(GeoPolyline3 polyline, double radius, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
radiusdoubleThe radius of every corner; a bending radius, in the language of a bar.
toleranceToleranceThe tolerance.
Returns
- GeoPolylineArc3
The chain with its corners rounded; a corner with too little edge, or none to turn, or whose arc would be too small for the tolerance to tell its two ends apart, is left as it was.
Remarks
Where the bends at a leg take all of it, give or take the tolerance, nothing of the leg is left and the arcs either side meet midway along it; the bar's two ends never move. The bar (0, 0, 0), (10, 0, 0), (20, 0.7, 0) bent at 1E-4 at the default tolerance keeps its bend square: the arc would touch the legs 3.5E-6 either side of it.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentOutOfRangeException
Thrown when the radius is not a positive number.
Fillet(GeoPolylineArc3, double)
Rounds every corner of a chain that may curve by the same radius.
public static GeoPolylineArc3 Fillet(GeoPolylineArc3 chain, double radius)
Parameters
chainGeoPolylineArc3radiusdouble
Returns
Fillet(GeoPolylineArc3, double, Tolerance)
Rounds every corner of a chain that may curve by the same radius, within a tolerance.
public static GeoPolylineArc3 Fillet(GeoPolylineArc3 chain, double radius, Tolerance tolerance)
Parameters
chainGeoPolylineArc3radiusdoubletoleranceTolerance
Returns
Fillet(GeoPolyline3, IReadOnlyList<double>)
Rounds the corners of a straight chain, each by its own radius.
public static GeoPolylineArc3 Fillet(GeoPolyline3 polyline, IReadOnlyList<double> radii)
Parameters
polylineGeoPolyline3radiiIReadOnlyList<double>
Returns
Fillet(GeoPolyline3, IReadOnlyList<double>, Tolerance)
Rounds the corners of a straight chain, each by its own radius, within a tolerance.
public static GeoPolylineArc3 Fillet(GeoPolyline3 polyline, IReadOnlyList<double> radii, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
radiiIReadOnlyList<double>The radius wanted at each vertex, read the way the bulges are read: the entry at an index belongs to the vertex at that index. A radius of nought leaves that corner alone, and a list shorter than the chain leaves the rest of it alone.
toleranceToleranceThe tolerance.
Returns
Exceptions
- ArgumentNullException
Thrown when the chain or the radii are null.
- ArgumentOutOfRangeException
Thrown when a radius is negative or not a number.
Fillet(GeoPolylineArc3, IReadOnlyList<double>)
Rounds the corners of a chain that may curve, each by its own radius.
public static GeoPolylineArc3 Fillet(GeoPolylineArc3 chain, IReadOnlyList<double> radii)
Parameters
chainGeoPolylineArc3radiiIReadOnlyList<double>
Returns
Fillet(GeoPolylineArc3, IReadOnlyList<double>, Tolerance)
Rounds the corners of a chain that may curve, each by its own radius, within a tolerance.
public static GeoPolylineArc3 Fillet(GeoPolylineArc3 chain, IReadOnlyList<double> radii, Tolerance tolerance)
Parameters
chainGeoPolylineArc3radiiIReadOnlyList<double>toleranceTolerance
Returns
Fillet(GeoPolygon3, double)
Rounds every corner of a straight loop by the same radius.
public static GeoPolygonArc3 Fillet(GeoPolygon3 polygon, double radius)
Parameters
polygonGeoPolygon3radiusdouble
Returns
Fillet(GeoPolygon3, double, Tolerance)
Rounds every corner of a straight loop by the same radius, within a tolerance.
public static GeoPolygonArc3 Fillet(GeoPolygon3 polygon, double radius, Tolerance tolerance)
Parameters
polygonGeoPolygon3The loop.
radiusdoubleThe radius to round every corner by.
toleranceToleranceThe tolerance.
Returns
- GeoPolygonArc3
The loop with its corners rounded; a corner with too little edge to give is left alone.
Remarks
A rounded corner is an arc, so a straight loop cannot hold the answer and the return type is GeoPolygonArc3. A loop is flat, so this is the coplanar lift and not the per-corner frame an open chain needs.
The loop is rounded corner for corner, a side shorter than the global tolerance and all: at a millionth, the loop (0, 0, 0), (10, 0, 0), (10.0004, 0.0004, 0), (10.0004, 10, 0), (0, 10, 0) filleted at 0.0001 is five arcs, two of them at the ends of its side 0.00057 long, where it was read as a curved loop within the global tolerance of a thousandth, lost that side and its arcs, and came back its four corners.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
Fillet(GeoPolygon3, IReadOnlyList<double>)
Rounds the corners of a straight loop, one radius each.
public static GeoPolygonArc3 Fillet(GeoPolygon3 polygon, IReadOnlyList<double> radii)
Parameters
polygonGeoPolygon3radiiIReadOnlyList<double>
Returns
Fillet(GeoPolygon3, IReadOnlyList<double>, Tolerance)
Rounds the corners of a straight loop, one radius each, within a tolerance.
public static GeoPolygonArc3 Fillet(GeoPolygon3 polygon, IReadOnlyList<double> radii, Tolerance tolerance)
Parameters
polygonGeoPolygon3The loop.
radiiIReadOnlyList<double>A radius per corner; nought leaves that corner square.
toleranceToleranceThe tolerance.
Returns
- GeoPolygonArc3
The loop with the corners the radii asked for rounded.
Exceptions
- ArgumentNullException
Thrown when the loop or the list of radii is null.