meshing.edge_detection.GridSpec
meshing.edge_detection.GridSpec()Regular sampling grid described by static Python values.
Attributes
| Name | Type | Description |
|---|---|---|
| origin | tuple[float, float, float] | World position of lattice vertex (0, 0, 0). |
| spacing | tuple[float, float, float] | Cell edge length per axis. |
| cells | tuple[int, int, int] | Number of cells per axis; the lattice has cells + 1 vertices per axis. |
Methods
| Name | Description |
|---|---|
| from_bounds | Build a grid from a lower corner, an extent, and a cell count. |
| lattice_points | All lattice vertex positions, shaped (nx + 1, ny + 1, nz + 1, 3). |
from_bounds
meshing.edge_detection.GridSpec.from_bounds(bounds, size, resolution)Build a grid from a lower corner, an extent, and a cell count.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bounds | tuple[float, float, float] | Lower corner of the sampled volume. | required |
| size | tuple[float, float, float] | Positive extent of the sampled volume per axis. | required |
| resolution | int | tuple[int, int, int] | Cells per axis, as one integer or a triplet. | required |
lattice_points
meshing.edge_detection.GridSpec.lattice_points()All lattice vertex positions, shaped (nx + 1, ny + 1, nz + 1, 3).