Table of Contents

Method GetAdjacentCells

Namespace
GeometryHelper.Meshing
Assembly
GeometryHelper.dll

GetAdjacentCells(int)

Gets the cells that share part of a face with a cell: its neighbours along the grid's axes, where no joint stands between and their material meets over some area.

public int[] GetAdjacentCells(int index)

Parameters

index int

The cell, by its place in Cells.

Returns

int[]

The neighbours, by their places in Cells, in ascending order; none with joints.

Remarks

Two pieces of one cell never share a face, and pieces of neighbouring cells only where they meet: across the notch of a U, the piece of one arm meets only the cell beside it in that arm. A neighbour is found where it meets the cell, not by its indexes: a cut moved onto a corner can leave the next cell along an axis empty and the one after meeting this one, and the slabs and bars, each cut to its own corners, can leave a cell meeting one beside the next. Asked below a millionth, two cells meet over more than a strip as wide as the point tolerance, or as what rounding can move a corner, a trillionth of the size of the coordinates, where that is more, along where they overlap: two a place apart across the plane as well share no more than an edge, and at nought a plate 200 by 100 by 3 turned about in space, cut into twelve cells, gave 25 pairs of neighbours, those among them; it gives 17. At a millionth and above two cells meet over more than the point tolerance squared, as before.

Exceptions

ArgumentOutOfRangeException

Thrown when there is no such cell.