Table of Contents

Method ToCells

Namespace
GeometryHelper.Meshing
Assembly
GeometryHelper.dll

ToCells(GeoSolid3, CellOptions3)

Cuts a body into cells as the options say, along the world's axes, using the default tolerance.

public static GeoCellGrid3 ToCells(GeoSolid3 solid, CellOptions3 options)

Parameters

solid GeoSolid3
options CellOptions3

Returns

GeoCellGrid3

ToCells(GeoSolid3, CellOptions3, Tolerance)

Cuts a body into cells as the options say, along the world's axes, within a tolerance.

public static GeoCellGrid3 ToCells(GeoSolid3 solid, CellOptions3 options, Tolerance tolerance)

Parameters

solid GeoSolid3
options CellOptions3
tolerance Tolerance

Returns

GeoCellGrid3

ToCells(GeoSolid3, CellOptions3, MeshPlacement3)

Cuts a body into cells as the options say, its grid standing as the placement says, using the default tolerance.

public static GeoCellGrid3 ToCells(GeoSolid3 solid, CellOptions3 options, MeshPlacement3 placement)

Parameters

solid GeoSolid3
options CellOptions3
placement MeshPlacement3

Returns

GeoCellGrid3

ToCells(GeoSolid3, CellOptions3, MeshPlacement3, Tolerance)

Cuts a body into cells as the options say, its grid standing as the placement says, within a tolerance.

public static GeoCellGrid3 ToCells(GeoSolid3 solid, CellOptions3 options, MeshPlacement3 placement, Tolerance tolerance)

Parameters

solid GeoSolid3

The body; closed, its openings cut in first.

options CellOptions3

How each axis of the grid is divided, the joint, and the snap distance.

placement MeshPlacement3

Which way the grid's axes run, and where a cell starts.

tolerance Tolerance

The tolerance the body is cut within: which cells are whole, and the least a cut is snapped by.

Returns

GeoCellGrid3

The grid, every cell the body holds any of a closed body of what it holds, a piece each; none when the openings take all of the body.

Remarks

The cells are cut by planes, along the grid's X axis first, then Y, then Z. A cut that comes within the snap distance of a corner of the part it cuts is moved onto that corner, and one that would take off no more than that from a side is not made: the slice stays with the cell beside, so that no cell is thinner than the snap distance where the body leaves room, and no cut runs along a face of the body a hair off it. Features of the body closer together than that still leave the slice between them.

A cell the body holds in several pieces, as across the notch of a U, gives a cell for each. A body that is not closed holds no volume to cut, and is refused rather than cut into cells that would not hold it either: one IsClosed(Tolerance) reads open, as a cube whose top stands 0.0015 over its sides with a speck of a face at each corner of the top half way up, cut into 8 cells before, and one it reads closed that the ends of its edges, each matched to the first corner seen within the tolerance of it, do not close, as the booleans the cells are cut with read it. Such is a body closed only to the rounding of its coordinates, at a tolerance below that rounding: the union of two turned boxes would be cut into no cell at all at a tolerance of nought. That reading of the corners hangs on the order the faces come in, and a slab 100 by 100 and 0.0012 thick, its side at one end slid up 0.0002, is refused with its faces in one order and cut with them in another, as it was. A body wound inwards, as a mirror leaves one, and an opening wound so, are read the right way out, and the cells are wound outwards. Openings that cannot be cut into the whole body, or leave it open, are cut into each cell they meet; a cell they cannot be cut into either keeps their material, and says so in the log.

Asked at a point tolerance below the rounding of the coordinates, a quadrillionth of the largest of them, nought among them, the body and its openings are cut within what rounding can move a corner off a plane, a trillionth of the size of the coordinates, and each cell whose corners that leaves a rounding apart is welded to close within the tolerance asked. Within the tolerance asked, the two faces beside an edge each cut their own copy of it a rounding apart, and no cut closed: at nought a plate 200 by 100 by 3 turned about in space, cut into cells 60 by 40 along it, came out one cell of 60 000, where twelve hold it, and with a hole 20 by 20 through it one cell of 60 000, the hole left in, each cut not made said so in the log. They are cut so too at and above the rounding while the point tolerance is below both that trillionth and a millionth: a million out, at 2E-9, twice the rounding, the plate with the hole came out in the wrong cells as well. Which bodies are refused is read at the tolerance asked, as before. At a millionth and above, the default tolerance among them, the body is cut as it was, to the bit, but where walls stand apart within the tolerance of one plane.

Where walls of two openings, or of an opening and the body, stand apart within the tolerance of one plane, the openings are cut in, and the cells cut, within a finer tolerance, as TryCutOpenings(out GeoSolid3, Tolerance) cuts them: an L 100 by 80 by 50, a million out, with three openings, the walls of two of them 0.0009 apart across it, cut within a thousandth into 15 cells, held 0.76 too little in six of them, and cut within a thousandth from its material cut exact, 0.06 too much in one.

A body far out, as GetVolume(Tolerance) says, is moved near the origin by whole coordinates, the placement's origin with it, cut into cells there, and the grid moved back: its origin, each cell's box and each cell's material, coordinate by coordinate; where the cells start and end along its axes, and what each holds, are as they were worked out. Where it stood, walls of openings a fraction of the tolerance apart were cut in one plane: 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, cut within a thousandth into 9 cells 50 by 40 by 20, held 0.52 too much, 0.28 in one cell; each holds what it holds at the origin now, to 2.1E-5.

Exceptions

ArgumentNullException

Thrown when the body, the options or the placement are null.

ArgumentException

Thrown when the body is not closed, or closed along its edges but not by its corners, a cell is no larger than the point tolerance along an axis it divides, or the grid would lay more cells through the body than a grid may have.

ToCells(GeoObb3, CellOptions3)

Cuts a box into cells as the options say, along its own axes, using the default tolerance.

public static GeoCellGrid3 ToCells(GeoObb3 box, CellOptions3 options)

Parameters

box GeoObb3
options CellOptions3

Returns

GeoCellGrid3

ToCells(GeoObb3, CellOptions3, Tolerance)

Cuts a box into cells as the options say, along its own axes, within a tolerance.

public static GeoCellGrid3 ToCells(GeoObb3 box, CellOptions3 options, Tolerance tolerance)

Parameters

box GeoObb3
options CellOptions3
tolerance Tolerance

Returns

GeoCellGrid3

ToCells(GeoObb3, CellOptions3, MeshPlacement3)

Cuts a box into cells as the options say, its grid standing as the placement says, using the default tolerance.

public static GeoCellGrid3 ToCells(GeoObb3 box, CellOptions3 options, MeshPlacement3 placement)

Parameters

box GeoObb3
options CellOptions3
placement MeshPlacement3

Returns

GeoCellGrid3

ToCells(GeoObb3, CellOptions3, MeshPlacement3, Tolerance)

Cuts a box into cells as the options say, its grid standing as the placement says, within a tolerance.

public static GeoCellGrid3 ToCells(GeoObb3 box, CellOptions3 options, MeshPlacement3 placement, Tolerance tolerance)

Parameters

box GeoObb3

The box.

options CellOptions3

How each axis of the grid is divided, the joint, and the snap distance.

placement MeshPlacement3

Which way the grid's axes run, Own along the box's, and where a cell starts.

tolerance Tolerance

The tolerance the box is cut within: which cells are whole, and the least a cut is snapped by.

Returns

GeoCellGrid3

The grid; none when the box is flat.

Remarks

A grid along the box's own sides cuts it by arithmetic, every cell a box, which a grid of a million cells takes a second over; one turned against them cuts it as a body, within the rounding of the coordinates where the point tolerance is below it, as ToCells(GeoSolid3, CellOptions3, MeshPlacement3, Tolerance) cuts a body: at nought a box 100 by 60 by 40 turned about in space, cut into cells 37 by 41 by 43 along the world's axes, came out one cell, where the grid lays 19 through it.

Exceptions

ArgumentNullException

Thrown when the box, the options or the placement are null.

ArgumentException

Thrown when a cell is no larger than the point tolerance along an axis it divides, or the grid would lay more cells through the box than a grid may have.

ToCells(GeoAabb3, CellOptions3)

Cuts a box into cells as the options say, along the world's axes, using the default tolerance.

public static GeoCellGrid3 ToCells(GeoAabb3 box, CellOptions3 options)

Parameters

box GeoAabb3
options CellOptions3

Returns

GeoCellGrid3

ToCells(GeoAabb3, CellOptions3, Tolerance)

Cuts a box into cells as the options say, along the world's axes, within a tolerance.

public static GeoCellGrid3 ToCells(GeoAabb3 box, CellOptions3 options, Tolerance tolerance)

Parameters

box GeoAabb3
options CellOptions3
tolerance Tolerance

Returns

GeoCellGrid3

ToCells(GeoAabb3, CellOptions3, MeshPlacement3)

Cuts a box into cells as the options say, its grid standing as the placement says, using the default tolerance.

public static GeoCellGrid3 ToCells(GeoAabb3 box, CellOptions3 options, MeshPlacement3 placement)

Parameters

box GeoAabb3
options CellOptions3
placement MeshPlacement3

Returns

GeoCellGrid3

ToCells(GeoAabb3, CellOptions3, MeshPlacement3, Tolerance)

Cuts a box into cells as the options say, its grid standing as the placement says, within a tolerance.

public static GeoCellGrid3 ToCells(GeoAabb3 box, CellOptions3 options, MeshPlacement3 placement, Tolerance tolerance)

Parameters

box GeoAabb3

The box; its own axes are the world's.

options CellOptions3

How each axis of the grid is divided, the joint, and the snap distance.

placement MeshPlacement3

Which way the grid's axes run, and where a cell starts.

tolerance Tolerance

The tolerance the box is cut within: which cells are whole, and the least a cut is snapped by.

Returns

GeoCellGrid3

The grid; none when the box is empty or flat.

Exceptions

ArgumentNullException

Thrown when the options or the placement are null.

ArgumentException

Thrown when a cell is no larger than the point tolerance along an axis it divides, or the grid would lay more cells through the box than a grid may have.