Method Xor
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Xor(GeoPolygonArc2, GeoPolygonArc2)
Gets what one loop covers and the other does not, with the arcs cut into straight pieces first.
public static GeoFace2[] Xor(GeoPolygonArc2 loop1, GeoPolygonArc2 loop2)
Parameters
loop1GeoPolygonArc2The first loop, which may curve.
loop2GeoPolygonArc2The second loop, which may curve.
Returns
- GeoFace2[]
The faces of the result, straight throughout.
Remarks
Each arc is cut finely enough to stray no further than the automatic share of its radius, about a fifth of a percent. Use the overload that names a chord tolerance when that is not fine enough.
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygonArc2, GeoPolygonArc2, Tolerance)
Gets what one loop covers and the other does not, with the arcs cut into straight pieces first, within a tolerance.
public static GeoFace2[] Xor(GeoPolygonArc2 loop1, GeoPolygonArc2 loop2, Tolerance tolerance)
Parameters
loop1GeoPolygonArc2loop2GeoPolygonArc2toleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygonArc2, GeoPolygonArc2, double)
Gets what one loop covers and the other does not, cutting the arcs no further than a chord tolerance from the curve.
public static GeoFace2[] Xor(GeoPolygonArc2 loop1, GeoPolygonArc2 loop2, double chordTolerance)
Parameters
loop1GeoPolygonArc2The first loop, which may curve.
loop2GeoPolygonArc2The second loop, which may curve.
chordTolerancedoubleThe largest gap allowed between a piece and the arc it replaces, in drawing units. Zero picks the automatic share of each radius.
Returns
- GeoFace2[]
The faces of the result, straight throughout.
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygonArc2, GeoPolygonArc2, double, Tolerance)
Gets what one loop covers and the other does not, cutting the arcs no further than a chord tolerance from the curve, within a tolerance.
public static GeoFace2[] Xor(GeoPolygonArc2 loop1, GeoPolygonArc2 loop2, double chordTolerance, Tolerance tolerance)
Parameters
loop1GeoPolygonArc2loop2GeoPolygonArc2chordTolerancedoubletoleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygonArc2, GeoPolygon2)
Gets what one loop covers and the other does not where one of them is already straight, cutting the arcs of the other.
public static GeoFace2[] Xor(GeoPolygonArc2 loop1, GeoPolygon2 loop2)
Parameters
loop1GeoPolygonArc2loop2GeoPolygon2
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygonArc2, GeoPolygon2, double, Tolerance)
Gets what one loop covers and the other does not where one of them is already straight, cutting the arcs of the other, within a tolerance.
public static GeoFace2[] Xor(GeoPolygonArc2 loop1, GeoPolygon2 loop2, double chordTolerance, Tolerance tolerance)
Parameters
loop1GeoPolygonArc2loop2GeoPolygon2chordTolerancedoubletoleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygon2, GeoPolygonArc2)
Gets what one loop covers and the other does not where the subject is already straight, cutting the arcs of the other.
public static GeoFace2[] Xor(GeoPolygon2 loop1, GeoPolygonArc2 loop2)
Parameters
loop1GeoPolygon2loop2GeoPolygonArc2
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygon2, GeoPolygonArc2, double, Tolerance)
Gets what one loop covers and the other does not where the subject is already straight, cutting the arcs of the other, within a tolerance.
public static GeoFace2[] Xor(GeoPolygon2 loop1, GeoPolygonArc2 loop2, double chordTolerance, Tolerance tolerance)
Parameters
loop1GeoPolygon2loop2GeoPolygonArc2chordTolerancedoubletoleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygonArc2, GeoPolygon2, Tolerance)
Gets the result where one shape is already straight, within a tolerance.
public static GeoFace2[] Xor(GeoPolygonArc2 loop1, GeoPolygon2 loop2, Tolerance tolerance)
Parameters
loop1GeoPolygonArc2loop2GeoPolygon2toleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygonArc2, GeoPolygon2, double)
Gets the result where one shape is already straight, cutting the arcs no further than a chord tolerance from the curve.
public static GeoFace2[] Xor(GeoPolygonArc2 loop1, GeoPolygon2 loop2, double chordTolerance)
Parameters
loop1GeoPolygonArc2loop2GeoPolygon2chordTolerancedouble
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygon2, GeoPolygonArc2, Tolerance)
Gets the result where the subject is already straight, within a tolerance.
public static GeoFace2[] Xor(GeoPolygon2 loop1, GeoPolygonArc2 loop2, Tolerance tolerance)
Parameters
loop1GeoPolygon2loop2GeoPolygonArc2toleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygon2, GeoPolygonArc2, double)
Gets the result where the subject is already straight, cutting the arcs no further than a chord tolerance from the curve.
public static GeoFace2[] Xor(GeoPolygon2 loop1, GeoPolygonArc2 loop2, double chordTolerance)
Parameters
loop1GeoPolygon2loop2GeoPolygonArc2chordTolerancedouble
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Xor(GeoPolygon2, GeoPolygon2)
Gets the region covered by exactly one of two polygons, using default tolerance.
public static GeoFace2[] Xor(GeoPolygon2 polygon1, GeoPolygon2 polygon2)
Parameters
polygon1GeoPolygon2polygon2GeoPolygon2
Returns
- GeoFace2[]
Xor(GeoPolygon2, GeoPolygon2, Tolerance)
Gets the region covered by exactly one of two polygons, within tolerance: their union less their overlap.
public static GeoFace2[] Xor(GeoPolygon2 polygon1, GeoPolygon2 polygon2, Tolerance tolerance)
Parameters
polygon1GeoPolygon2The first polygon.
polygon2GeoPolygon2The second polygon.
toleranceToleranceThe tolerance.
Returns
- GeoFace2[]
The faces covered by one polygon but not the other.
Exceptions
- ArgumentNullException
Thrown when a polygon is null.
Xor(GeoFace2, GeoFace2)
Gets the region covered by exactly one of two faces, using default tolerance.
public static GeoFace2[] Xor(GeoFace2 face1, GeoFace2 face2)
Parameters
Returns
- GeoFace2[]
Xor(GeoFace2, GeoFace2, Tolerance)
Gets the region covered by exactly one of two faces, within tolerance.
public static GeoFace2[] Xor(GeoFace2 face1, GeoFace2 face2, Tolerance tolerance)
Parameters
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when a face is null.