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
Returns
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
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
firstGeoSolid3secondGeoSolid3resultGeoSolid3outcomeBooleanOutcome
Returns
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
firstGeoSolid3The first body.
secondGeoSolid3The second body.
resultGeoSolid3The part they share.
toleranceToleranceThe tolerance.
outcomeBooleanOutcomeMade 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
firstGeoSolid3The first body; it is not moved.
secondGeoSolid3The second body; its faces lying against the first's are put onto them.
resultGeoSolid3The common part.
optionsSolidBooleanOptionsHow the intersection is worked out.
outcomeBooleanOutcomeHow 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.