Table of Contents

Method GetVolume

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

GetVolume()

Gets the volume of the material, every opening cut out, using the default tolerance.

public double GetVolume()

Returns

double

GetVolume(Tolerance)

Gets the volume of the material: the faces with every opening cut out.

public double GetVolume(Tolerance tolerance)

Parameters

tolerance Tolerance

The tolerance the openings are cut out within.

Returns

double

The volume, positive whichever way the faces are wound; nought where the openings take all of it.

Remarks

The openings are cut out as shapes, not taken off as numbers: the part of an opening reaching outside the body costs nothing, as a through hole drawn past the faces it runs between does, two openings overlapping are taken out once, and the material inside an opening, its own openings, stays.

A body without openings is measured by its faces at once, and nothing is cut: every part GeometryHelper.TeklaConvert reads is one, its cuts already in its faces, and a slab cut by five other parts matched Tekla's VOLUME_NET to five parts in a million million. A body with openings has them cut out once for the tolerance, and the cut kept, so its volume, area and centroid are of one material and cost one cut. An opening that cannot be cut out is left in the material and the log warns of it; TryGetVolume(out double, Tolerance) says so as well. Cut in at once, the body is parted by the planes of its openings and each piece judged by one point of it; where a plane runs through a piece and will not cut it, leaving it part in an opening and part out, the openings are taken out one at a time by a difference instead. A half of a hull cut near a face within a hundredth, a box 3.5 by 3.5 by 5 standing through the cut, held 1 465.33 cubic millimetres so, the box left in, where it holds 1 434.77. An opening that will not come out so has the openings cut as TryCutOpenings(out GeoSolid3, Tolerance) cuts them before it is left in: a plate 200 by 100 by 3 turned about in space and a million out, with a notch 20 by 20 through one end and one 20 wide and 1 deep across the other, flush with three faces, measured 58 800 at the rounding of its coordinates, the second notch left in; it measures 56 800, as it holds. Where walls of two openings, or of an opening and the body, stand apart within the tolerance of one plane, the openings are cut as TryCutOpenings(out GeoSolid3, Tolerance) cuts them, within a finer tolerance: an L 100 by 80 by 50, a million out, with two blind openings 27 apart whose walls stood 0.0009 apart across it, measured 153 674.08 within a thousandth, the second opening's wall cut in the plane of the first's; it measures 153 673.56, as it holds.

Where the point tolerance is below the rounding of the coordinates, a quadrillionth of the largest of them, nought among them, the openings are cut as TryCutOpenings(out GeoSolid3, Tolerance) cuts them, within that rounding; where it refuses them, within what rounding can move a corner off a plane, a trillionth of the size of the coordinates, as Section(GeoPlane3, Tolerance) cuts them; and only where that refuses them too, at the tolerance given as they were, and TryGetVolume(out double, Tolerance) says the volume cannot be trusted. At nought the plate with a hole 20 by 20 through it in place of the notches measured 60 000, the hole left in, and TryGetVolume trusted it; it measures 58 800. With the notches, a thousand out, it measured nought, and that was trusted too. Such a plate at the origin, turned another way, with an opening 32.7 by 51 down from its top to 0.9 over its bottom, measured nought at nought, and the whole plate, 60 000, at 1E-15, neither trusted; it measures 56 497.83, trusted.

A body far out, reaching more than 2^20 and more than 1 024 times the size of its box from the origin, as at national-grid coordinates, has its openings cut near the origin, as a union, a common part and a difference of such bodies are worked out, and the material moved back, each corner it keeps as it was given, to the bit; the volume, the area and the centroid are of that material. Where it stood, a corner was read on a plane within a trillionth of the coordinates, and walls of openings a fraction of the tolerance apart were cut in one plane: a plate 200 by 100 by 3 a hundred million out, with two openings up from its floor whose ceilings stood 0.00015 apart, measured 0.525 too much; an L 100 by 80 by 50 a thousand million out, with an opening up from its floor and one down from its top whose far walls stood 0.0009 apart, 153 732.16 within a thousandth, and with its openings given the other way round 153 731.38, where it holds 153 731.64. Each measures what it holds now, to 1.3E-4. Below a trillionth of the coordinates a 256th of the reach out the body is cut where it stands, as before.

Each face is taken as the fan of its boundary from its first corner, which is exact for a flat face and the way Tekla Structures reports a part's volume. Measure3 measures the volume other ways too, and sets the ways side by side where a face a hair out of flat makes them part.