Method TryChamferAt
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
TryChamferAt(GeoPolygon2, int, double, double, out GeoPolygon2)
Chamfers one corner of a polygon, using the default tolerance.
public static bool TryChamferAt(GeoPolygon2 polygon, int index, double distance1, double distance2, out GeoPolygon2 result)
Parameters
polygonGeoPolygon2indexintdistance1doubledistance2doubleresultGeoPolygon2
Returns
TryChamferAt(GeoPolygon2, int, double, double, out GeoPolygon2, Tolerance)
Chamfers one corner of a polygon, within a tolerance.
public static bool TryChamferAt(GeoPolygon2 polygon, int index, double distance1, double distance2, out GeoPolygon2 result, Tolerance tolerance)
Parameters
polygonGeoPolygon2The polygon.
indexintWhich vertex to cut.
distance1doubleHow far back along the edge running into the corner.
distance2doubleHow far back along the edge running out of it.
resultGeoPolygon2The chamfered polygon, or the polygon unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the corner had room for the cut; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
- ArgumentOutOfRangeException
Thrown when the index is outside the polygon or either distance is not a positive number.
TryChamferAt(GeoPolyline2, int, double, double, out GeoPolyline2)
Chamfers one corner of a chain, using the default tolerance.
public static bool TryChamferAt(GeoPolyline2 polyline, int index, double distance1, double distance2, out GeoPolyline2 result)
Parameters
polylineGeoPolyline2indexintdistance1doubledistance2doubleresultGeoPolyline2
Returns
TryChamferAt(GeoPolyline2, int, double, double, out GeoPolyline2, Tolerance)
Chamfers one corner of a chain, within a tolerance.
public static bool TryChamferAt(GeoPolyline2 polyline, int index, double distance1, double distance2, out GeoPolyline2 result, Tolerance tolerance)
Parameters
polylineGeoPolyline2The chain.
indexintWhich vertex to cut; the two ends have no corner and are refused.
distance1doubleHow far back along the edge running into the corner.
distance2doubleHow far back along the edge running out of it.
resultGeoPolyline2The chamfered chain, or the chain unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the corner had room for the cut; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentOutOfRangeException
Thrown when the index is outside the chain or either distance is not a positive number.
TryChamferAt(GeoPolylineArc2, int, double, double, out GeoPolylineArc2, Tolerance)
Chamfers one corner of a chain that may curve, within a tolerance.
public static bool TryChamferAt(GeoPolylineArc2 polyline, int index, double distance1, double distance2, out GeoPolylineArc2 result, Tolerance tolerance)
Parameters
polylineGeoPolylineArc2The chain.
indexintWhich vertex to cut; the two ends have no corner and are refused.
distance1doubleHow far back along the edge running into the corner.
distance2doubleHow far back along the edge running out of it.
resultGeoPolylineArc2The chamfered chain, or the chain unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the corner had room for the cut; false when it had not, or either edge is an arc.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentOutOfRangeException
Thrown when the index is outside the chain or either distance is not a positive number.
TryChamferAt(GeoPolylineArc2, int, double, double, out GeoPolylineArc2)
Chamfers one corner of a chain that may curve, using the default tolerance.
public static bool TryChamferAt(GeoPolylineArc2 polyline, int index, double distance1, double distance2, out GeoPolylineArc2 result)
Parameters
polylineGeoPolylineArc2indexintdistance1doubledistance2doubleresultGeoPolylineArc2
Returns
TryChamferAt(GeoPolygonArc2, int, double, double, out GeoPolygonArc2, Tolerance)
Chamfers one corner of a loop that may curve, within a tolerance.
public static bool TryChamferAt(GeoPolygonArc2 polygon, int index, double distance1, double distance2, out GeoPolygonArc2 result, Tolerance tolerance)
Parameters
polygonGeoPolygonArc2The loop.
indexintWhich vertex to cut.
distance1doubleHow far back along the edge running into the corner.
distance2doubleHow far back along the edge running out of it.
resultGeoPolygonArc2The chamfered loop, or the loop unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the corner had room for the cut; false when it had not, or either edge is an arc.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
- ArgumentOutOfRangeException
Thrown when the index is outside the loop or either distance is not a positive number.
TryChamferAt(GeoPolygonArc2, int, double, double, out GeoPolygonArc2)
Chamfers one corner of a loop that may curve, using the default tolerance.
public static bool TryChamferAt(GeoPolygonArc2 polygon, int index, double distance1, double distance2, out GeoPolygonArc2 result)
Parameters
polygonGeoPolygonArc2indexintdistance1doubledistance2doubleresultGeoPolygonArc2