Table of Contents

Method TryCutOpenings

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TryCutOpenings(GeoSolid3, out GeoSolid3)

Turns a body with openings into one without, whose faces are the surface of its material.

public static bool TryCutOpenings(GeoSolid3 solid, out GeoSolid3 material)

Parameters

solid GeoSolid3
material GeoSolid3

Returns

bool

TryCutOpenings(GeoSolid3, out GeoSolid3, Tolerance)

Turns a body with openings into one without, whose faces are the surface of its material, within a tolerance.

public static bool TryCutOpenings(GeoSolid3 solid, out GeoSolid3 material, Tolerance tolerance)

Parameters

solid GeoSolid3

The body.

material GeoSolid3

The body with every opening cut into it, or the body itself when it has none; null when the method returns false.

tolerance Tolerance

The tolerance.

Returns

bool

true when some material is left; false when the openings take all of it, which is an outcome and not an error, as it is for the booleans, or when the cut cannot be worked out, which is logged.

Remarks

The material of a closed body with closed openings is closed as Validate(Tolerance) reads it, as a boolean's is, or not given. Where cutting the openings in at once leaves it open, it is welded within the tolerance, and where that does not close it the openings are taken out one at a time by a difference, which tries more ways of cutting and keeps only what closes; where one will not come out so, or what they leave is not valid as Validate reads it, wound two ways where the differences met, the method returns false. Each difference reads a corner as on a plane within the planar tolerance and the rounding of the coordinates, a trillionth of their size, as cutting them in at once does: within the tolerance alone, a plate 300 by 200 by 12, turned and far from the origin, with twelve holes ending 0.01 under its top to within a millionth, cut within a hundredth, came out valid and 130.70 cubic millimetres short of the plate less every hole through; it holds 666 668.11, within what its skins can leave. They are taken out so too where a plane of an opening runs through the body and will not cut it, leaving a piece part in the opening and part out of it, which cut in at once would be kept or dropped whole. A plate 300 by 200 by 12 with two blind holes ending 0.015 under its top, turned and far from the origin, came out of the cut within a hundredth open by four edges 0.015 long; the holes are taken out one at a time, and it closes, holding 711 120.61 as GetVolume(Tolerance) measures it. Cut in together, each opening keeps or loses a skin the tolerance thin as it would cut in alone: a plate with twelve holes ending 0.01 under its top to within a millionth, one 2.0E-6 nearer the top, cut within a hundredth, kept a skin over that one that the plane of another hole's floor cut off the whole plate, and came out valid and 3.71 cubic millimetres over the most its skins can leave; it holds what they can leave now. Where the point tolerance is below the rounding of the coordinates, a quadrillionth of the largest of them, the openings are cut within that rounding, as the queries read them; a planar tolerance below it alone changes nothing. Where cutting them in together leaves the material open they are cut in at once one at a time, each kept only where it closes, not taken out by a difference, which within the rounding can come back closed and wrong, and the corners the cut leaves a rounding apart are made one where that closes the material within the tolerance given. Cut at a tolerance of nought, a plate 200 by 100 by 3 turned about in space, with a hole 20 by 20 through it, came back as a shell of 7 faces, its bottom lost, and the method returned true; it comes back closed, holding 58 800. Walls of two openings, or of an opening and the body, standing apart within the tolerance of one plane are cut within a finer tolerance, where what that gives closes within the one asked: an L 100 by 80 by 50, a million out, with two blind openings 27 apart whose walls stood 0.0009 apart across it, cut within a thousandth, held 153 674.08 where it holds 153 673.56, the second opening's wall cut in the plane of the first's. A body far out is cut near the origin and its material moved back, as a boolean of such bodies is worked out. See TryCutOpenings(out GeoSolid3, Tolerance) for what it refuses, what the measures of the body read at nought, and a body far out.

Exceptions

ArgumentNullException

Thrown when the body is null.