Method Subtract
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Subtract(GeoPolygonArc2, GeoPolygonArc2)
Gets the subject with the tool taken out of it, with the arcs cut into straight pieces first.
public static GeoFace2[] Subtract(GeoPolygonArc2 subject, GeoPolygonArc2 tool)
Parameters
subjectGeoPolygonArc2The first loop, which may curve.
toolGeoPolygonArc2The 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.
Subtract(GeoPolygonArc2, GeoPolygonArc2, Tolerance)
Gets the subject with the tool taken out of it, with the arcs cut into straight pieces first, within a tolerance.
public static GeoFace2[] Subtract(GeoPolygonArc2 subject, GeoPolygonArc2 tool, Tolerance tolerance)
Parameters
subjectGeoPolygonArc2toolGeoPolygonArc2toleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(GeoPolygonArc2, GeoPolygonArc2, double)
Gets the subject with the tool taken out of it, cutting the arcs no further than a chord tolerance from the curve.
public static GeoFace2[] Subtract(GeoPolygonArc2 subject, GeoPolygonArc2 tool, double chordTolerance)
Parameters
subjectGeoPolygonArc2The first loop, which may curve.
toolGeoPolygonArc2The 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.
Subtract(GeoPolygonArc2, GeoPolygonArc2, double, Tolerance)
Gets the subject with the tool taken out of it, cutting the arcs no further than a chord tolerance from the curve, within a tolerance.
public static GeoFace2[] Subtract(GeoPolygonArc2 subject, GeoPolygonArc2 tool, double chordTolerance, Tolerance tolerance)
Parameters
subjectGeoPolygonArc2toolGeoPolygonArc2chordTolerancedoubletoleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(GeoPolygonArc2, GeoPolygon2)
Gets the subject with the tool taken out of it where one of them is already straight, cutting the arcs of the other.
public static GeoFace2[] Subtract(GeoPolygonArc2 subject, GeoPolygon2 tool)
Parameters
subjectGeoPolygonArc2toolGeoPolygon2
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(GeoPolygonArc2, GeoPolygon2, double, Tolerance)
Gets the subject with the tool taken out of it where one of them is already straight, cutting the arcs of the other, within a tolerance.
public static GeoFace2[] Subtract(GeoPolygonArc2 subject, GeoPolygon2 tool, double chordTolerance, Tolerance tolerance)
Parameters
subjectGeoPolygonArc2toolGeoPolygon2chordTolerancedoubletoleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(GeoPolygon2, GeoPolygonArc2)
Gets the subject with the tool taken out of it where the subject is already straight, cutting the arcs of the other.
public static GeoFace2[] Subtract(GeoPolygon2 subject, GeoPolygonArc2 tool)
Parameters
subjectGeoPolygon2toolGeoPolygonArc2
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(GeoPolygon2, GeoPolygonArc2, double, Tolerance)
Gets the subject with the tool taken out of it where the subject is already straight, cutting the arcs of the other, within a tolerance.
public static GeoFace2[] Subtract(GeoPolygon2 subject, GeoPolygonArc2 tool, double chordTolerance, Tolerance tolerance)
Parameters
subjectGeoPolygon2toolGeoPolygonArc2chordTolerancedoubletoleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(GeoPolygonArc2, GeoPolygon2, Tolerance)
Gets the result where one shape is already straight, within a tolerance.
public static GeoFace2[] Subtract(GeoPolygonArc2 subject, GeoPolygon2 tool, Tolerance tolerance)
Parameters
subjectGeoPolygonArc2toolGeoPolygon2toleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(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[] Subtract(GeoPolygonArc2 subject, GeoPolygon2 tool, double chordTolerance)
Parameters
subjectGeoPolygonArc2toolGeoPolygon2chordTolerancedouble
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(GeoPolygon2, GeoPolygonArc2, Tolerance)
Gets the result where the subject is already straight, within a tolerance.
public static GeoFace2[] Subtract(GeoPolygon2 subject, GeoPolygonArc2 tool, Tolerance tolerance)
Parameters
subjectGeoPolygon2toolGeoPolygonArc2toleranceTolerance
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(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[] Subtract(GeoPolygon2 subject, GeoPolygonArc2 tool, double chordTolerance)
Parameters
subjectGeoPolygon2toolGeoPolygonArc2chordTolerancedouble
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when either loop is null.
Subtract(GeoPolygon2, GeoPolygon2)
Gets the region of one polygon with another taken out of it, using default tolerance.
public static GeoFace2[] Subtract(GeoPolygon2 subject, GeoPolygon2 tool)
Parameters
subjectGeoPolygon2toolGeoPolygon2
Returns
- GeoFace2[]
Subtract(GeoPolygon2, GeoPolygon2, Tolerance)
Gets the region of one polygon with another taken out of it, within tolerance.
public static GeoFace2[] Subtract(GeoPolygon2 subject, GeoPolygon2 tool, Tolerance tolerance)
Parameters
subjectGeoPolygon2The polygon cut from.
toolGeoPolygon2The polygon taken out.
toleranceToleranceThe tolerance.
Returns
- GeoFace2[]
The faces left: a tool lying wholly inside the subject leaves a hole.
Exceptions
- ArgumentNullException
Thrown when a polygon is null.
Subtract(GeoFace2, GeoFace2)
Gets the region of one face with another taken out of it, using default tolerance.
public static GeoFace2[] Subtract(GeoFace2 subject, GeoFace2 tool)
Parameters
Returns
- GeoFace2[]
Subtract(GeoFace2, GeoFace2, Tolerance)
Gets the region of one face with another taken out of it, within tolerance. The tool's own holes are not taken out, since they are not part of it.
public static GeoFace2[] Subtract(GeoFace2 subject, GeoFace2 tool, Tolerance tolerance)
Parameters
Returns
- GeoFace2[]
Exceptions
- ArgumentNullException
Thrown when a face is null.
Subtract(GeoPolygon2, IEnumerable<GeoPolygon2>)
Gets the region of a polygon with every one of a set of polygons taken out of it, using default tolerance.
public static GeoFace2[] Subtract(GeoPolygon2 subject, IEnumerable<GeoPolygon2> tools)
Parameters
subjectGeoPolygon2toolsIEnumerable<GeoPolygon2>
Returns
- GeoFace2[]
Subtract(GeoPolygon2, IEnumerable<GeoPolygon2>, Tolerance)
Gets the region of a polygon with every one of a set of polygons taken out of it, within tolerance: a slab with its openings cut, in one call.
public static GeoFace2[] Subtract(GeoPolygon2 subject, IEnumerable<GeoPolygon2> tools, Tolerance tolerance)
Parameters
subjectGeoPolygon2The polygon cut from.
toolsIEnumerable<GeoPolygon2>The polygons taken out; none leaves the subject whole.
toleranceToleranceThe tolerance.
Returns
- GeoFace2[]
The faces left.
Exceptions
- ArgumentNullException
Thrown when the subject, the sequence or one of its polygons is null.
Subtract(GeoFace2, IEnumerable<GeoFace2>)
Gets the region of a face with every one of a set of faces taken out of it, using default tolerance.
public static GeoFace2[] Subtract(GeoFace2 subject, IEnumerable<GeoFace2> tools)
Parameters
subjectGeoFace2toolsIEnumerable<GeoFace2>
Returns
- GeoFace2[]
Subtract(GeoFace2, IEnumerable<GeoFace2>, Tolerance)
Gets the region of a face with every one of a set of faces taken out of it, within tolerance.
public static GeoFace2[] Subtract(GeoFace2 subject, IEnumerable<GeoFace2> tools, Tolerance tolerance)
Parameters
subjectGeoFace2The face cut from.
toolsIEnumerable<GeoFace2>The faces taken out; none leaves the subject whole.
toleranceToleranceThe tolerance.
Returns
- GeoFace2[]
The faces left.
Exceptions
- ArgumentNullException
Thrown when the subject, the sequence or one of its faces is null.