- DataSetFilters.extract_surface(pass_pointid=True, pass_cellid=True, nonlinear_subdivision=1, progress_bar=False)#
Extract surface mesh of the grid.
Adds a point array
"vtkOriginalPointIds"that idenfities which original points these surface points correspond to.
Adds a cell array
"vtkOriginalPointIds"that idenfities which original cells these surface cells correspond to.
If the input is an unstructured grid with nonlinear faces, this parameter determines how many times the face is subdivided into linear faces.
If 0, the output is the equivalent of its linear counterpart (and the midpoints determining the nonlinear interpolation are discarded). If 1 (the default), the nonlinear face is triangulated based on the midpoints. If greater than 1, the triangulated pieces are recursively subdivided to reach the desired subdivision. Setting the value to greater than 1 may cause some point data to not be passed even if no nonlinear faces exist. This option has no effect if the input is not an unstructured grid.
Display a progress bar to indicate progress.
Surface mesh of the grid.
Extract the surface of an UnstructuredGrid.
>>> import pyvista >>> from pyvista import examples >>> grid = examples.load_hexbeam() >>> surf = grid.extract_surface() >>> type(surf) <class 'pyvista.core.pointset.PolyData'>
See the Extract Surface for more examples using this filter.