pyvista.Plotter.add_silhouette#
- Plotter.add_silhouette(
- mesh: NumpyArray[float] | DataSet | MultiBlock | _vtk.vtkAlgorithm | _vtk.vtkAlgorithmOutput,
- color: ColorLike | None = None,
- line_width: float | None = None,
- opacity: float | None = None,
- feature_angle: float | None = None,
- decimate: float | None = None,
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:
- mesh
DataSet
| vtkAlgorithm Mesh or mesh-producing algorithm for generating silhouette to plot.
- color
ColorLike
,optional
Color of the silhouette lines.
- line_width
float
,optional
Silhouette line width.
- opacity
float
,optional
Line transparency between
0
and1
.- feature_angle
float
,optional
If set, display sharp edges exceeding that angle in degrees.
- decimate
float
,optional
Level of decimation between
0
and1
. Decimating will improve rendering performance. A good rule of thumb is to try0.9
first and decrease until the desired rendering performance is achieved.
- mesh
- 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()