Grid#
- class Grid#
Bases:
object
Create a Grid instance.
- __init__(size, origin=(0, 0, 0))#
- Parameters:
size (tuple[int] of size 3) – The grid size.
origin (tuple[int] of size 3, optional) – The origin of the grid. The default value is (0, 0, 0).
- property size: tuple[int]#
Return the number of cells in the x, y, and z direction.
- property origin: tuple[float]#
Return the origin the grid.
- property shape: tuple[int]#
Return the number of cells in the x, y, and z direction.
The shape property is similar to the size property, but with the order of directions reversed (z, y, x).
- property ncells: int#
Return the total number of cells in this grid.