DataSetFilters.extract_geometry

DataSetFilters.extract_geometry#

DataSetFilters.extract_geometry(
extent: VectorLike[float] | None = None,
progress_bar: bool = False,
) PolyData[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.

Deprecated since version 0.47.0: Use extract_surface() instead with keyword algorithm=None.

Parameters:
extentVectorLike[float], optional

Specify a (x_min, x_max, y_min, y_max, z_min, z_max) 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.