Table of Contents

Method TrySubtract

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TrySubtract(GeoSolid3, GeoSolid3, out GeoSolid3)

Takes one solid out of another, using the default tolerance.

public static bool TrySubtract(GeoSolid3 subject, GeoSolid3 tool, out GeoSolid3 result)

Parameters

subject GeoSolid3
tool GeoSolid3
result GeoSolid3

Returns

bool

TrySubtract(GeoSolid3, GeoSolid3, out GeoSolid3, Tolerance)

Takes one solid out of another, within a tolerance.

public static bool TrySubtract(GeoSolid3 subject, GeoSolid3 tool, out GeoSolid3 result, Tolerance tolerance)

Parameters

subject GeoSolid3

The body to cut material from.

tool GeoSolid3

The body to remove.

result GeoSolid3

What is left of the subject.

tolerance Tolerance

The tolerance.

Returns

bool

false when nothing is left, because the tool swallowed the subject whole, or when it cannot be worked out, which is logged.

Remarks

The walls of the cavity are not taken from the tool; they are already there. Dividing the subject by the planes of the tool lays a face along every part of the surface of the tool that passes through it, so keeping the cells that fall outside the tool keeps those faces with them. A tool that misses the subject changes nothing, and the subject comes back unaltered.