pyvista.DataSet#
- class DataSet(*args, **kwargs)[source]#
Methods in common 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_bounds
(ind)Return the bounding box of a cell.
Return the number of points in a cell.
Return the point ids in a cell.
DataSet.cell_points
(ind)Return the points in a cell.
DataSet.cell_type
(ind)Return the type of a cell.
Remove all cell arrays.
Remove all arrays from point/cell/field data.
Remove all point arrays.
Clear the textures from this mesh.
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 in this mesh along 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 non-NaN min and max of a named array.
DataSet.overwrite
(mesh)Overwrite this dataset inplace with the new dataset's geometries and data.
DataSet.plot
([off_screen, full_screen, ...])Plot a PyVista, numpy, or vtk object.
DataSet.point_is_inside_cell
(ind, point)Return whether one or more points are inside a cell.
DataSet.rename_array
(old_name, new_name[, ...])Change array name by searching for the array then renaming it.
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 or set 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 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.
Return a list of cells.
Return vtkCellData 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 vtkPointData as DataSetAttributes.
Return a reference to the points as a numpy object.
Return a dictionary to hold compatible
vtk.vtkTexture
objects.Return the mesh volume.