- PolyDataFilters.extrude_trim(direction, trim_surface, extrusion='boundary_edges', capping='intersection', inplace=False, progress_bar=False)#
Extrude polygonal data trimmed by a surface.
The input dataset is swept along a specified direction forming a “skirt” from the boundary edges 2D primitives (i.e., edges used by only one polygon); and/or from vertices and lines. The extent of the sweeping is defined where the sweep intersects a user-specified surface.
Direction vector to extrude.
Surface which trims the surface.
Control the strategy of extrusion. One of the following:
The default is
"boundary_edges", which only generates faces on the boundary of the original input surface. When using
"all_edges", faces are created along interior points as well.
Control the strategy of capping. One of the following:
The default is “intersection”.
Overwrites the original mesh in-place.
Display a progress bar to indicate progress.
Extruded mesh trimmed by a surface.
Extrude a disc.
>>> import pyvista >>> import numpy as np >>> plane = pyvista.Plane(i_size=2, j_size=2, direction=[0, 0.8, 1]) >>> disc = pyvista.Disc(center=(0, 0, -1), c_res=50) >>> direction = [0, 0, 1] >>> extruded_disc = disc.extrude_trim(direction, plane) >>> extruded_disc.plot(smooth_shading=True, split_sharp_edges=True)