Table of Contents

Method TryIntersect

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TryIntersect(GeoSolid3, GeoSolid3, out GeoSolid3)

Gets the part two solids have in common, using the default tolerance.

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

Parameters

first GeoSolid3
second GeoSolid3
result GeoSolid3

Returns

bool

TryIntersect(GeoSolid3, GeoSolid3, out GeoSolid3, Tolerance)

Gets the part two solids have in common, within a tolerance.

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

Parameters

first GeoSolid3
second GeoSolid3
result GeoSolid3
tolerance Tolerance

Returns

bool

false when the two bodies share no volume, or when it cannot be worked out, which is logged: of two closed bodies, a common part closed as Validate(Tolerance) reads it, or none.

Remarks

Only one body is cut, and only by the planes of the other that come near it and of its own openings: those are what leave every cell wholly inside or wholly outside the other, and wholly material or wholly carved out. Its own outer faces bound it already and need not cut it. On a bent bar they would: every plane of a bend runs on through the rest of the bar, and a bar with a hook came out in thousands of cells, twenty seconds against a plate. The body cut is the one fewer planes cut, so a bar crossing a beam is cut by a handful of the beam's planes rather than the beam by the hundreds of the bar's.

TryIntersect(GeoSolid3, GeoSolid3, out GeoSolid3, out BooleanOutcome)

Gets the part two solids have in common, saying how it came out, using the default tolerance.

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

Parameters

first GeoSolid3
second GeoSolid3
result GeoSolid3
outcome BooleanOutcome

Returns

bool

TryIntersect(GeoSolid3, GeoSolid3, out GeoSolid3, Tolerance, out BooleanOutcome)

Gets the part two solids have in common, within a tolerance, saying how it came out.

public static bool TryIntersect(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 part they share.

tolerance Tolerance

The tolerance.

outcome BooleanOutcome

Made with the result, Empty where the two share no volume, or no more than a slab the tolerance thick, or NotWorkedOut where it could not be worked out, which is logged.

Returns

bool

false when the two bodies share no volume, or share no more than a slab the tolerance thick as Validate(Tolerance) reads it, or when it cannot be worked out.

TryIntersect(GeoSolid3, GeoSolid3, out GeoSolid3, SolidBooleanOptions, out BooleanOutcome)

Gets the solid two bodies share as the options say; see SolidBooleanOptions.

public static bool TryIntersect(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 common part.

options SolidBooleanOptions

How the intersection is worked out.

outcome BooleanOutcome

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

Returns

bool

false when the two share nothing, or no more than a slab the tolerance thick, or when it cannot be worked out.

Exceptions

ArgumentNullException

Thrown when either body or the options are null.