Table of Contents

Method TryUnion

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TryUnion(GeoSolid3, GeoSolid3, out GeoSolid3)

Joins two solids into one, using the default tolerance.

public static bool TryUnion(GeoSolid3 first, GeoSolid3 second, out GeoSolid3 result)

Parameters

first GeoSolid3
second GeoSolid3
result GeoSolid3

Returns

bool

TryUnion(GeoSolid3, GeoSolid3, out GeoSolid3, Tolerance)

Joins two solids into one, within a tolerance.

public static bool TryUnion(GeoSolid3 first, GeoSolid3 second, out GeoSolid3 result, Tolerance tolerance)

Parameters

first GeoSolid3

The first body.

second GeoSolid3

The second body.

result GeoSolid3

The combined body.

tolerance Tolerance

The tolerance.

Returns

bool

false when the two could not be combined into a closed body, which is logged.

Remarks

Two bodies that do not touch still combine: the result is one solid carrying both shells, which measures and answers containment correctly because each shell is closed and wound outwards.

TryUnion(GeoSolid3, GeoSolid3, out GeoSolid3, out BooleanOutcome)

Joins two solids into one, saying how it came out, using the default tolerance.

public static bool TryUnion(GeoSolid3 first, GeoSolid3 second, out GeoSolid3 result, out BooleanOutcome outcome)

Parameters

first GeoSolid3
second GeoSolid3
result GeoSolid3
outcome BooleanOutcome

Returns

bool

TryUnion(GeoSolid3, GeoSolid3, out GeoSolid3, Tolerance, out BooleanOutcome)

Joins two solids into one, within a tolerance, saying how it came out.

public static bool TryUnion(GeoSolid3 first, GeoSolid3 second, out GeoSolid3 result, Tolerance tolerance, out BooleanOutcome outcome)

Parameters

first GeoSolid3

The first body.

second GeoSolid3

The second body.

result GeoSolid3

The combined body.

tolerance Tolerance

The tolerance.

outcome BooleanOutcome

Made with the result, or NotWorkedOut: two bodies always leave a union.

Returns

bool

false when the two could not be combined into a closed body, which is logged.

TryUnion(GeoSolid3, GeoSolid3, out GeoSolid3, SolidBooleanOptions, out BooleanOutcome)

Joins two solids into one as the options say; see SolidBooleanOptions.

public static bool TryUnion(GeoSolid3 first, GeoSolid3 second, out GeoSolid3 result, SolidBooleanOptions options, out BooleanOutcome outcome)

Parameters

first GeoSolid3

The first body; it is not moved.

second GeoSolid3

The second body; its faces lying against the first's are put onto them.

result GeoSolid3

The combined body.

options SolidBooleanOptions

How the union is worked out.

outcome BooleanOutcome

How it came out, as TryUnion(GeoSolid3, GeoSolid3, out GeoSolid3, Tolerance, out BooleanOutcome) says.

Returns

bool

false when the two could not be combined, which is logged.

Exceptions

ArgumentNullException

Thrown when either body or the options are null.