class PolyDataFilters(*args, **kwargs)[source]#

An internal class to manage filters/algorithms for polydata datasets.


PolyDataFilters.boolean_add(*args, **kwargs)

Merge two meshes together.

PolyDataFilters.boolean_cut(*args, **kwargs)

Cut two meshes.


Perform a boolean difference operation between two meshes.


Perform a boolean intersection operation on two meshes.

PolyDataFilters.boolean_union(other_mesh[, ...])

Perform a boolean union operation on two meshes.

PolyDataFilters.cell_centers([vertex, ...])

Generate points at the center of the cells in this dataset.


Transform cell data into point data.

PolyDataFilters.clean([point_merging, ...])

Clean the mesh.

PolyDataFilters.clip([normal, origin, ...])

Clip a dataset by a plane by specifying the origin and normal.

PolyDataFilters.clip_box([bounds, invert, ...])

Clip a dataset by a bounding box defined by the bounds.


Clip a closed polydata surface with a plane.

PolyDataFilters.clip_scalar([scalars, ...])

Clip a dataset by a scalar.

PolyDataFilters.clip_surface(surface[, ...])

Clip any mesh type using a pyvista.PolyData surface mesh.

PolyDataFilters.collision(other_mesh[, ...])

Perform collision determination between two polyhedral surfaces.


Compute the arc length over the length of the probed line.


Compute a function of (geometric) quality for each cell of a mesh.

PolyDataFilters.compute_cell_sizes([length, ...])

Compute sizes for 1D (length), 2D (area) and 3D (volume) cells.


Compute derivative-based quantities of point/cell scalar field.


Compute the implicit distance from the points to a surface.


Compute point and/or cell normals for a mesh.

PolyDataFilters.connectivity([largest, ...])

Find and label connected bodies/volumes.

PolyDataFilters.contour([isosurfaces, ...])

Contour an input self by an array.

PolyDataFilters.ctp([pass_cell_data, ...])

Transform cell data into point data.

PolyDataFilters.curvature([curv_type, ...])

Return the pointwise curvature of a mesh.

PolyDataFilters.decimate(target_reduction[, ...])

Reduce the number of triangles in a triangular mesh using vtkQuadricDecimation.


Return a decimated version of a triangulation of the boundary.

PolyDataFilters.decimate_pro(reduction[, ...])

Reduce the number of triangles in a triangular mesh.

PolyDataFilters.delaunay_2d([tol, alpha, ...])

Apply a 2D Delaunay filter along the best fitting plane.

PolyDataFilters.delaunay_3d([alpha, tol, ...])

Construct a 3D Delaunay triangulation of the mesh.

PolyDataFilters.edge_mask(angle[, progress_bar])

Return a mask of the points of a surface mesh that has a surface angle greater than angle.

PolyDataFilters.elevation([low_point, ...])

Generate scalar values on a dataset.


Push each individual cell away from the center of the dataset.


Extract all the internal/external edges of the dataset as PolyData.

PolyDataFilters.extract_cells(ind[, ...])

Return a subset of the grid.


Extract edges from the surface of the mesh.

PolyDataFilters.extract_geometry([extent, ...])

Extract the outer surface of a volume or structured grid dataset.

PolyDataFilters.extract_largest([inplace, ...])

Extract largest connected set in mesh.

PolyDataFilters.extract_points(ind[, ...])

Return a subset of the grid (with cells) that contains any of the given point indices.


Extract surface mesh of the grid.

PolyDataFilters.extrude(vector[, capping, ...])

Sweep polygonal data creating a "skirt" from free edges.

PolyDataFilters.extrude_rotate([resolution, ...])

Sweep polygonal data creating "skirt" from free edges and lines, and lines from vertices.

PolyDataFilters.extrude_trim(direction, ...)

Extrude polygonal data trimmed by a surface.

PolyDataFilters.fill_holes(hole_size[, ...])

Fill holes in a pyvista.PolyData or vtk.vtkPolyData object.


Flip normals of a triangular mesh by reversing the point ordering.

PolyDataFilters.geodesic(start_vertex, ...)

Calculate the geodesic path between two vertices using Dijkstra's algorithm.

PolyDataFilters.geodesic_distance(...[, ...])

Calculate the geodesic distance between two vertices using Dijkstra's algorithm.

PolyDataFilters.glyph([orient, scale, ...])

Copy a geometric representation (called a glyph) to the input dataset.


Integrate point and cell data.

PolyDataFilters.interpolate(target[, ...])

Interpolate values onto this mesh from a given dataset.

PolyDataFilters.intersection(mesh[, ...])

Compute the intersection between two meshes.

PolyDataFilters.merge(dataset[, ...])

Merge this mesh with one or more datasets.

PolyDataFilters.multi_ray_trace(origins, ...)

Perform multiple ray trace calculations.

PolyDataFilters.outline([generate_faces, ...])

Produce an outline of the full extent for the input dataset.

PolyDataFilters.outline_corners([factor, ...])

Produce an outline of the corners for the input dataset.

PolyDataFilters.partition(n_partitions[, ...])

Break down input dataset into a requested number of partitions.


Plot boundaries of a mesh.


Plot the curvature.

PolyDataFilters.plot_normals([show_mesh, ...])

Plot the point normals of a mesh.


Sample a dataset along a circular arc and plot it.


Sample a dataset along a resolution circular arc defined by a normal and polar vector and plot it.

PolyDataFilters.plot_over_line(pointa, pointb)

Sample a dataset along a high resolution line and plot.


Transform point data into cell data.

PolyDataFilters.probe(points[, tolerance, ...])

Sample data values at specified point locations.


Project points of this mesh to a plane.

PolyDataFilters.ptc([pass_point_data, ...])

Transform point data into cell data.

PolyDataFilters.ray_trace(origin, end_point)

Perform a single ray trace calculation.


Reconstruct a surface from the points in this dataset.

PolyDataFilters.reflect(normal[, point, ...])

Reflect a dataset across a plane.

PolyDataFilters.remove_points(remove[, ...])

Rebuild a mesh by removing points.

PolyDataFilters.ribbon([width, scalars, ...])

Create a ribbon of the lines in this dataset.

PolyDataFilters.sample(target[, tolerance, ...])

Resample array data from a passed mesh onto this mesh.


Sample a dataset over a circular arc.


Sample a dataset over a circular arc defined by a normal and polar vector and plot it.

PolyDataFilters.sample_over_line(pointa, pointb)

Sample a dataset onto a line.


Sample a dataset onto a multiple lines.


Mark points as to whether they are inside a closed surface.


Return a copy of the dataset with separated cells with no shared points.

PolyDataFilters.shrink([shrink_factor, ...])

Shrink the individual faces of a mesh.

PolyDataFilters.slice([normal, origin, ...])

Slice a dataset by a plane at the specified origin and normal vector orientation.

PolyDataFilters.slice_along_axis([n, axis, ...])

Create many slices of the input dataset along a specified axis.

PolyDataFilters.slice_along_line(line[, ...])

Slice a dataset using a polyline/spline as the path.


Slice a dataset by a VTK implicit function.

PolyDataFilters.slice_orthogonal([x, y, z, ...])

Create three orthogonal slices through the dataset on the three cartesian planes.

PolyDataFilters.smooth([n_iter, ...])

Adjust point coordinates using Laplacian smoothing.

PolyDataFilters.smooth_taubin([n_iter, ...])

Smooth a PolyData DataSet with Taubin smoothing.

PolyDataFilters.split_bodies([label, ...])

Find, label, and split connected bodies/volumes.

PolyDataFilters.streamlines([vectors, ...])

Integrate a vector field to generate streamlines.


Generate evenly spaced streamlines on a 2D dataset.


Generate streamlines of vectors from the points of a source mesh.

PolyDataFilters.strip([join, max_length, ...])

Strip poly data cells.

PolyDataFilters.subdivide(nsub[, subfilter, ...])

Increase the number of triangles in a single, connected triangular mesh.


Increase the number of triangles in a triangular mesh based on edge and/or area metrics.


Return the surface indices of a grid.


Tessellate a mesh.


Texture map this dataset to a user defined plane.


Texture map this dataset to a user defined sphere.

PolyDataFilters.threshold([value, scalars, ...])

Apply a vtkThreshold filter to the input dataset.

PolyDataFilters.threshold_percent([percent, ...])

Threshold the dataset by a percentage of its range on the active scalars array.

PolyDataFilters.transform(trans[, ...])

Transform this mesh with a 4x4 transform.

PolyDataFilters.triangulate([inplace, ...])

Return an all triangle mesh.[radius, scalars, ...])

Generate a tube around each input line.

PolyDataFilters.warp_by_scalar([scalars, ...])

Warp the dataset's points by a point data scalars array's values.

PolyDataFilters.warp_by_vector([vectors, ...])

Warp the dataset's points by a point data vectors array's values.