DataSetFilters.shrink#
- DataSetFilters.shrink( ) PolyData | UnstructuredGrid[source]#
Shrink the individual faces of a mesh.
This filter shrinks the individual faces of a mesh rather than scaling the entire mesh.
- Parameters:
- Returns:
pyvista.PolyData|pyvista.UnstructuredGridDataset with shrunk faces. A
PolyDatagives aPolyData; every other dataset gives anUnstructuredGrid.
Examples#
Download Python source code | Download Jupyter notebook
First, plot the original cube.
Now, plot the mesh with shrunk faces.
>>> shrunk = mesh.shrink(0.5)
>>> shrunk.clear_data() # cleans up plot
>>> shrunk.plot(show_edges=True, line_width=5)
Used In#
API Examples
CubeFacesSource.shrink_factor(1 use)Global Configuration(1 use)download_quadratic_pyramid(1 use)download_tetrahedron(1 use)