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
polylineGeoPolylineArc2indexintradiusdoubleresultGeoPolylineArc2
Returns
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
polylineGeoPolylineArc2The chain.
indexintWhich vertex to round; the two ends have no corner and are refused.
radiusdoubleThe radius of the arc to put there.
resultGeoPolylineArc2The filleted chain, or the chain unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the corner had room for the arc; otherwise, false.
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
polygonGeoPolygonArc2indexintradiusdoubleresultGeoPolygonArc2
Returns
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
polygonGeoPolygonArc2The loop.
indexintWhich vertex to round.
radiusdoubleThe radius of the arc to put there.
resultGeoPolygonArc2The filleted loop, or the loop unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the corner had room for the arc; otherwise, false.
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
polylineGeoPolyline2indexintradiusdoubleresultGeoPolylineArc2
Returns
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
polylineGeoPolyline2The chain.
indexintWhich vertex to round; the two ends of a chain are not corners.
radiusdoubleThe radius.
resultGeoPolylineArc2The rounded chain, or the chain unchanged where the corner would not take it.
toleranceToleranceThe 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
polygonGeoPolygon2indexintradiusdoubleresultGeoPolygonArc2
Returns
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
polygonGeoPolygon2The loop.
indexintWhich vertex to round; every vertex of a loop is a corner.
radiusdoubleThe radius.
resultGeoPolygonArc2The rounded loop, or the loop unchanged where the corner would not take it.
toleranceToleranceThe tolerance.
Returns
- bool
true when the corner was rounded; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the loop is null.