pytuflow.GridMesh#
- class GridMesh(fpath, grid=None, base_topology=None)#
Bases:
MeshClass for loading Grid datasets into a mesh structure. This has no notable advantages over using the
Gridclass, other than providing some additional export functionality inherited from theMeshclass.It’s possible to convert to a
GridMeshfrom theGridclass by using theGrid.to_mesh()method.- Parameters:
fpath (PathLike) – Path to the Grid dataset file.
grid (Grid, optional) – An existing Grid object. If not provided, a new Grid object will be created from the
fpathparameter. This parameter takes precedence over thefpathparameter.base_topology (Grid, optional) – An optional base topology Grid object to define the mesh structure. The
Gridshould match the dimensions and extent of the dataset being loaded. Typically only required when working with datasets that are temporal or contain multiple data types.
Examples
>>> from pytuflow import GridMesh >>> mesh = GridMesh('/path/to/results/grid/Model_Max_h.tif')
- __init__(fpath, grid=None, base_topology=None)#
Methods
Extracts the data value for the given point locations and data types at the specified time.
Return the available data types for the given filter.
Returns the maximum values for the given data types.
Returns the minimum values for the given data types.
Extracts section data for the given locations and data types.
Returns the value for every cell/vertex at the specified time.
Extracts time-series data for the given locations and data types.
Returns a list of times for the given filter.
Exports the mesh to an Alembic file for visualisation in compatible software.
Exports the mesh to a glTF 2.0 file for visualisation in compatible software.
Attributes
Returns whether the mesh is in spherical coordinates.
The result name
Does the result have an inherent reference time.
The reference time for the output