pyvista.DataSet#
- class DataSet(*args, **kwargs)[source]#
Methods in common to spatially referenced objects.
- Parameters:
- *args
Any extra args are passed as option to spatially referenced objects.
- **kwargs
Any extra keyword args are passed as option to spatially referenced objects.
Methods
DataSet.cast_to_pointset
([pass_cell_data])Extract the points of this dataset and return a
pyvista.PointSet
.DataSet.cast_to_poly_points
([pass_cell_data])Extract the points of this dataset and return a
pyvista.PolyData
.Get a new representation of this object as a
pyvista.UnstructuredGrid
.DataSet.cell_neighbors
(ind[, connections])Get the cell neighbors of the ind-th cell.
DataSet.cell_neighbors_levels
(ind[, ...])Get consecutive levels of cell neighbors.
Remove all cell arrays.
Remove all arrays from point/cell/field data.
Remove all point arrays.
DataSet.copy_from
(mesh[, deep])Overwrite this dataset inplace with the new dataset's geometries and data.
DataSet.copy_meta_from
(ido[, deep])Copy pyvista meta data onto this object from another object.
DataSet.find_cells_along_line
(pointa, pointb)Find the index of cells whose bounds intersect a line.
DataSet.find_cells_intersecting_line
(pointa, ...)Find the index of cells that intersect a line.
DataSet.find_cells_within_bounds
(bounds)Find the index of cells in this mesh within bounds.
DataSet.find_closest_cell
(point[, ...])Find index of closest cell in this mesh to the given point.
DataSet.find_closest_point
(point[, n])Find index of closest point in this mesh to the given point.
DataSet.find_containing_cell
(point)Find index of a cell that contains the given point.
DataSet.flip_normal
(normal[, point, ...])Flip mesh about the normal.
DataSet.flip_x
([point, ...])Flip mesh about the x-axis.
DataSet.flip_y
([point, ...])Flip mesh about the y-axis.
DataSet.flip_z
([point, ...])Flip mesh about the z-axis.
DataSet.get_array
(name[, preference])Search both point, cell and field data for an array.
DataSet.get_array_association
(name[, preference])Get the association of an array.
DataSet.get_cell
(index)Return a
pyvista.Cell
object.DataSet.get_data_range
([arr_var, preference])Get the min and max of a named array.
DataSet.plot
([off_screen, full_screen, ...])Plot a PyVista, numpy, or vtk object.
Get the cell IDs that use the ind-th point.
DataSet.point_is_inside_cell
(ind, point)Return whether one or more points are inside a cell.
Get the point neighbors of the ind-th point.
DataSet.point_neighbors_levels
(ind[, n_levels])Get consecutive levels of point neighbors.
DataSet.rename_array
(old_name, new_name[, ...])Change array name by searching for the array then renaming it.
DataSet.rotate
(rotation[, point, ...])Rotate mesh about a point with a rotation matrix or
Rotation
object.DataSet.rotate_vector
(vector, angle[, ...])Rotate mesh about a vector.
DataSet.rotate_x
(angle[, point, ...])Rotate mesh about the x-axis.
DataSet.rotate_y
(angle[, point, ...])Rotate mesh about the y-axis.
DataSet.rotate_z
(angle[, point, ...])Rotate mesh about the z-axis.
DataSet.scale
(xyz[, ...])Scale the mesh.
DataSet.set_active_scalars
(name[, preference])Find the scalars by name and appropriately sets it as active.
DataSet.set_active_tensors
(name[, preference])Find the tensors by name and appropriately sets it as active.
DataSet.set_active_vectors
(name[, preference])Find the vectors by name and appropriately sets it as active.
DataSet.translate
(xyz[, ...])Translate the mesh.
Attributes
Return the active normals as an array.
Return the active scalars as an array.
Return the active scalar's association and name.
Return the name of the active scalars.
Return the active texture coordinates on the points.
Return the active tensors array.
Return the active tensor's field and name: [field, name].
Return the name of the active tensor array.
Return the active texture coordinates on the points.
Return the active vectors array.
Return the active vector's association and name.
Return the name of the active vectors array.
Return the mesh area if 2D.
Return a list of array names for the dataset.
Return a glyph representation of the active vector data as arrows.
Return the bounding box of this dataset.
A generator that provides an easy way to loop over all cells.
Return cell data as DataSetAttributes.
Return the center of the bounding box.
Return the length of the diagonal of the bounding box.
Return the number of arrays present in the dataset.
Return the number of cells in the entire dataset.
Return the number of points in the entire dataset.
Return the number of cells.
Return the number of points.
Return point data as DataSetAttributes.
Return a reference to the points as a numpy object.
Return the mesh volume.