pyvista.UnstructuredGrid.cast_to_explicit_structured_grid#

UnstructuredGrid.cast_to_explicit_structured_grid()[ソース]#

明示的に構造格子にキャストします.

戻り値:
pyvista.ExplicitStructuredGrid

明示的な構造格子.

エラー処理:
TypeError

非構造格子が 'BLOCK_I', 'BLOCK_J' および 'BLOCK_K' セル配列を持たない場合.

>>> from pyvista import examples
>>> grid = examples.load_explicit_structured()
>>> grid.plot(color='w', show_edges=True, show_bounds=True)
../../../_images/pyvista-UnstructuredGrid-cast_to_explicit_structured_grid-1_00_00.png
>>> grid = grid.hide_cells(range(80, 120))
>>> grid.plot(color='w', show_edges=True, show_bounds=True)
../../../_images/pyvista-UnstructuredGrid-cast_to_explicit_structured_grid-1_01_00.png
>>> grid = grid.cast_to_unstructured_grid()
>>> grid.plot(color='w', show_edges=True, show_bounds=True)
../../../_images/pyvista-UnstructuredGrid-cast_to_explicit_structured_grid-1_02_00.png
>>> grid = grid.cast_to_explicit_structured_grid()
>>> grid.plot(color='w', show_edges=True, show_bounds=True)
../../../_images/pyvista-UnstructuredGrid-cast_to_explicit_structured_grid-1_03_00.png