PolyDataFilters.extrude(vector, capping=False, inplace=False, progress_bar=False)

Sweep polygonal data creating a “skirt” from free edges.

This will create a line from vertices.

This takes polygonal data as input and generates polygonal data on output. The input dataset is swept according to some extrusion function and creates new polygonal primitives. These primitives form a “skirt” or swept surface. For example, sweeping a line results in a quadrilateral, and sweeping a triangle creates a “wedge”.

The skirt is generated by locating certain topological features. Free edges (edges of polygons or triangle strips only used by one polygon or triangle strips) generate surfaces. This is true also of lines or polylines. Vertices generate lines.

vectornumpy.ndarray or sequence

Direction and length to extrude the mesh in.

cappingbool, optional

Control if the sweep of a 2D object is capped.

inplacebool, optional

Overwrites the original mesh in-place.

progress_barbool, optional

Display a progress bar to indicate progress.


Extruded mesh.


Extrude a half circle arc.

>>> import pyvista
>>> arc = pyvista.CircularArc([-1, 0, 0], [1, 0, 0], [0, 0, 0])
>>> mesh = arc.extrude([0, 0, 1])
>>> mesh.plot(color='tan')

Extrude and cap an 8 sided polygon.

>>> poly = pyvista.Polygon(n_sides=8)
>>> mesh = poly.extrude((0, 0, 1.5), capping=True)
>>> mesh.plot(line_width=5, show_edges=True)