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