pyvista.Plotter.add_silhouette#

Plotter.add_silhouette(
mesh,
color=None,
line_width=None,
opacity=None,
feature_angle=None,
decimate=None,
)[source]#

Add a silhouette of a PyVista or VTK dataset to the scene.

A silhouette can also be generated directly in add_mesh. See also Silhouette Highlight.

Parameters:
meshpyvista.DataSet | vtk.vtkAlgorithm

Mesh or mesh-producing algorithm for generating silhouette to plot.

colorColorLike, optional

Color of the silhouette lines.

line_widthfloat, optional

Silhouette line width.

opacityfloat, optional

Line transparency between 0 and 1.

feature_anglefloat, optional

If set, display sharp edges exceeding that angle in degrees.

decimatefloat, optional

Level of decimation between 0 and 1. Decimating will improve rendering performance. A good rule of thumb is to try 0.9 first and decrease until the desired rendering performance is achieved.

Returns:
pyvista.Actor

Actor of the silhouette.

Examples

>>> import pyvista as pv
>>> from pyvista import examples
>>> bunny = examples.download_bunny()
>>> plotter = pv.Plotter()
>>> _ = plotter.add_mesh(bunny, color='lightblue')
>>> _ = plotter.add_silhouette(bunny, color='red', line_width=8.0)
>>> plotter.view_xy()
>>> plotter.show()
../../../_images/pyvista-Plotter-add_silhouette-1_00_00.png