Table of Contents

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

polygon GeoPolygon2
index int
distance1 double
distance2 double
result GeoPolygon2

Returns

bool

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

polygon GeoPolygon2

The polygon.

index int

Which vertex to cut.

distance1 double

How far back along the edge running into the corner.

distance2 double

How far back along the edge running out of it.

result GeoPolygon2

The chamfered polygon, or the polygon unchanged when the method returns false.

tolerance Tolerance

The 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

polyline GeoPolyline2
index int
distance1 double
distance2 double
result GeoPolyline2

Returns

bool

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

polyline GeoPolyline2

The chain.

index int

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

distance1 double

How far back along the edge running into the corner.

distance2 double

How far back along the edge running out of it.

result GeoPolyline2

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

tolerance Tolerance

The 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

polyline GeoPolylineArc2

The chain.

index int

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

distance1 double

How far back along the edge running into the corner.

distance2 double

How far back along the edge running out of it.

result GeoPolylineArc2

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

tolerance Tolerance

The 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

polyline GeoPolylineArc2
index int
distance1 double
distance2 double
result GeoPolylineArc2

Returns

bool

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

polygon GeoPolygonArc2

The loop.

index int

Which vertex to cut.

distance1 double

How far back along the edge running into the corner.

distance2 double

How far back along the edge running out of it.

result GeoPolygonArc2

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

tolerance Tolerance

The 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

polygon GeoPolygonArc2
index int
distance1 double
distance2 double
result GeoPolygonArc2

Returns

bool