pyvista.DataSetFilters.extract_points

pyvista.DataSetFilters.extract_points#

DataSetFilters.extract_points(
ind: int | VectorLike[int] | VectorLike[bool],
adjacent_cells: bool = True,
include_cells: bool = True,
progress_bar: bool = False,
)[ソース]#

指定されたポイントインデックスのいずれかを含みます(セルの)グリッドのサブセットを返します.

パラメータ:
indsequence[int]

抽出されるポイントインデックスのシーケンス.

adjacent_cellsbool, default: True

If True, extract the cells that contain at least one of the extracted points. If False, extract the cells that contain exclusively points from the extracted points list. Has no effect if include_cells is False.

include_cellsbool, default: True

セルを返すかどうかを指定します.

progress_barbool, default: False

進行状況を示す進行状況バーを表示します.

戻り値:
pyvista.UnstructuredGrid

サブ選択されたグリッド.

Z座標が0より大きい球体のすべての点を抽出します

>>> import pyvista as pv
>>> sphere = pv.Sphere()
>>> extracted = sphere.extract_points(
...     sphere.points[:, 2] > 0, include_cells=False
... )
>>> extracted.clear_data()  # clear for plotting
>>> extracted.plot()
../../../_images/pyvista-DataSetFilters-extract_points-1_00_00.png