Table of Contents

Method Union

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

Union(GeoPolygonArc2, GeoPolygonArc2)

Gets both loops together, with the arcs cut into straight pieces first.

public static GeoFace2[] Union(GeoPolygonArc2 loop1, GeoPolygonArc2 loop2)

Parameters

loop1 GeoPolygonArc2

The first loop, which may curve.

loop2 GeoPolygonArc2

The 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.

Union(GeoPolygonArc2, GeoPolygonArc2, Tolerance)

Gets both loops together, with the arcs cut into straight pieces first, within a tolerance.

public static GeoFace2[] Union(GeoPolygonArc2 loop1, GeoPolygonArc2 loop2, Tolerance tolerance)

Parameters

loop1 GeoPolygonArc2
loop2 GeoPolygonArc2
tolerance Tolerance

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(GeoPolygonArc2, GeoPolygonArc2, double)

Gets both loops together, cutting the arcs no further than a chord tolerance from the curve.

public static GeoFace2[] Union(GeoPolygonArc2 loop1, GeoPolygonArc2 loop2, double chordTolerance)

Parameters

loop1 GeoPolygonArc2

The first loop, which may curve.

loop2 GeoPolygonArc2

The second loop, which may curve.

chordTolerance double

The 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.

Union(GeoPolygonArc2, GeoPolygonArc2, double, Tolerance)

Gets both loops together, cutting the arcs no further than a chord tolerance from the curve, within a tolerance.

public static GeoFace2[] Union(GeoPolygonArc2 loop1, GeoPolygonArc2 loop2, double chordTolerance, Tolerance tolerance)

Parameters

loop1 GeoPolygonArc2
loop2 GeoPolygonArc2
chordTolerance double
tolerance Tolerance

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(GeoPolygonArc2, GeoPolygon2)

Gets both loops together where one of them is already straight, cutting the arcs of the other.

public static GeoFace2[] Union(GeoPolygonArc2 loop1, GeoPolygon2 loop2)

Parameters

loop1 GeoPolygonArc2
loop2 GeoPolygon2

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(GeoPolygonArc2, GeoPolygon2, double, Tolerance)

Gets both loops together where one of them is already straight, cutting the arcs of the other, within a tolerance.

public static GeoFace2[] Union(GeoPolygonArc2 loop1, GeoPolygon2 loop2, double chordTolerance, Tolerance tolerance)

Parameters

loop1 GeoPolygonArc2
loop2 GeoPolygon2
chordTolerance double
tolerance Tolerance

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(GeoPolygon2, GeoPolygonArc2)

Gets both loops together where the subject is already straight, cutting the arcs of the other.

public static GeoFace2[] Union(GeoPolygon2 loop1, GeoPolygonArc2 loop2)

Parameters

loop1 GeoPolygon2
loop2 GeoPolygonArc2

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(GeoPolygon2, GeoPolygonArc2, double, Tolerance)

Gets both loops together where the subject is already straight, cutting the arcs of the other, within a tolerance.

public static GeoFace2[] Union(GeoPolygon2 loop1, GeoPolygonArc2 loop2, double chordTolerance, Tolerance tolerance)

Parameters

loop1 GeoPolygon2
loop2 GeoPolygonArc2
chordTolerance double
tolerance Tolerance

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(GeoPolygonArc2, GeoPolygon2, Tolerance)

Gets the result where one shape is already straight, within a tolerance.

public static GeoFace2[] Union(GeoPolygonArc2 loop1, GeoPolygon2 loop2, Tolerance tolerance)

Parameters

loop1 GeoPolygonArc2
loop2 GeoPolygon2
tolerance Tolerance

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(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[] Union(GeoPolygonArc2 loop1, GeoPolygon2 loop2, double chordTolerance)

Parameters

loop1 GeoPolygonArc2
loop2 GeoPolygon2
chordTolerance double

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(GeoPolygon2, GeoPolygonArc2, Tolerance)

Gets the result where the subject is already straight, within a tolerance.

public static GeoFace2[] Union(GeoPolygon2 loop1, GeoPolygonArc2 loop2, Tolerance tolerance)

Parameters

loop1 GeoPolygon2
loop2 GeoPolygonArc2
tolerance Tolerance

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(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[] Union(GeoPolygon2 loop1, GeoPolygonArc2 loop2, double chordTolerance)

Parameters

loop1 GeoPolygon2
loop2 GeoPolygonArc2
chordTolerance double

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when either loop is null.

Union(GeoPolygon2, GeoPolygon2)

Gets the region covered by either of two polygons, using default tolerance.

public static GeoFace2[] Union(GeoPolygon2 polygon1, GeoPolygon2 polygon2)

Parameters

polygon1 GeoPolygon2
polygon2 GeoPolygon2

Returns

GeoFace2[]

Union(GeoPolygon2, GeoPolygon2, Tolerance)

Gets the region covered by either of two polygons, within tolerance.

public static GeoFace2[] Union(GeoPolygon2 polygon1, GeoPolygon2 polygon2, Tolerance tolerance)

Parameters

polygon1 GeoPolygon2

The first polygon.

polygon2 GeoPolygon2

The second polygon.

tolerance Tolerance

The tolerance.

Returns

GeoFace2[]

The faces of the union: one where the polygons overlap or touch along an edge, two where they are apart.

Exceptions

ArgumentNullException

Thrown when a polygon is null.

Union(GeoFace2, GeoFace2)

Gets the region covered by either of two faces, using default tolerance.

public static GeoFace2[] Union(GeoFace2 face1, GeoFace2 face2)

Parameters

face1 GeoFace2
face2 GeoFace2

Returns

GeoFace2[]

Union(GeoFace2, GeoFace2, Tolerance)

Gets the region covered by either of two faces, within tolerance. A hole in one face that the other covers is filled.

public static GeoFace2[] Union(GeoFace2 face1, GeoFace2 face2, Tolerance tolerance)

Parameters

face1 GeoFace2
face2 GeoFace2
tolerance Tolerance

Returns

GeoFace2[]

Exceptions

ArgumentNullException

Thrown when a face is null.

Union(IEnumerable<GeoPolygon2>)

Gets the region covered by any of a set of polygons, using default tolerance.

public static GeoFace2[] Union(IEnumerable<GeoPolygon2> polygons)

Parameters

polygons IEnumerable<GeoPolygon2>

Returns

GeoFace2[]

Union(IEnumerable<GeoPolygon2>, Tolerance)

Gets the region covered by any of a set of polygons, within tolerance. Each polygon is read on its own under the even-odd rule before they are joined, so two that overlap stay filled where they overlap.

public static GeoFace2[] Union(IEnumerable<GeoPolygon2> polygons, Tolerance tolerance)

Parameters

polygons IEnumerable<GeoPolygon2>

The polygons; none gives no faces.

tolerance Tolerance

The tolerance.

Returns

GeoFace2[]

The faces of the union.

Exceptions

ArgumentNullException

Thrown when the sequence or one of its polygons is null.

Union(IEnumerable<GeoFace2>)

Gets the region covered by any of a set of faces, using default tolerance.

public static GeoFace2[] Union(IEnumerable<GeoFace2> faces)

Parameters

faces IEnumerable<GeoFace2>

Returns

GeoFace2[]

Union(IEnumerable<GeoFace2>, Tolerance)

Gets the region covered by any of a set of faces, within tolerance.

public static GeoFace2[] Union(IEnumerable<GeoFace2> faces, Tolerance tolerance)

Parameters

faces IEnumerable<GeoFace2>

The faces; none gives no faces.

tolerance Tolerance

The tolerance.

Returns

GeoFace2[]

The faces of the union.

Exceptions

ArgumentNullException

Thrown when the sequence or one of its faces is null.