pyvista.DataSetFilters.extract_geometry#

DataSetFilters.extract_geometry(
extent: Sequence[float] | None = None,
progress_bar=False,
)[source]#

Extract the outer surface of a volume or structured grid dataset.

This will extract all 0D, 1D, and 2D cells producing the boundary faces of the dataset.

Note

This tends to be less efficient than extract_surface().

Parameters:
extentsequence[float], optional

Specify a (xmin, xmax, ymin, ymax, zmin, zmax) bounding box to clip data.

progress_barbool, default: False

Display a progress bar to indicate progress.

Returns:
pyvista.PolyData

Surface of the dataset.

Examples

Extract the surface of a sample unstructured grid.

>>> import pyvista as pv
>>> from pyvista import examples
>>> hex_beam = pv.read(examples.hexbeamfile)
>>> hex_beam.extract_geometry()
PolyData (...)
  N Cells:    88
  N Points:   90
  N Strips:   0
  X Bounds:   0.000e+00, 1.000e+00
  Y Bounds:   0.000e+00, 1.000e+00
  Z Bounds:   0.000e+00, 5.000e+00
  N Arrays:   3

See Surface Smoothing for more examples using this filter.