pyvista.ImageData.area

pyvista.ImageData.area#

property ImageData.area: float[ソース]#

2Dの場合,メッシュの面積を返します.

3Dセルを持つメッシュの場合,0を返します.

戻り値:
float

メッシュの総面積.

2x2の大きさの正方形の面積を求めてください.各方向に5点ずつ記します.

>>> import pyvista as pv
>>> mesh = pv.ImageData(dimensions=(5, 5, 1))
>>> mesh.area
16.0

A mesh with 3D cells does not have an area. To get the outer surface area, first extract the surface using extract_surface().

>>> mesh = pv.ImageData(dimensions=(5, 5, 5))
>>> mesh.area
0.0

球の面積を取得します。離散化誤差により pi とは若干異なります。

>>> mesh = pv.Sphere()
>>> mesh.area
3.13