get_areas#
- LegacyGeometry.get_areas(quality=1, return_as_list=False)#
Get active areas from MAPDL represented as
pyvista.PolyData
or a list ofpyvista.UnstructuredGrid
.- Parameters:
- quality
int
,optional
Quality of the mesh to display. Values are between 1 (worst) and10 (best).
- quality
- Returns:
pv.PolyData
orList
[pv.UnstructuredGrid
]pv.PolyData grouping all meshes representing the active surface areas selected by
ASEL
. Ifreturn_as_list=True
, areas are returned as a list ofpv.UnstructuredGrid
.
- Return type:
Examples
Return a single merged mesh.
>>> area_mesh = mapdl.geometry.get_areas(quality=3) >>> area_mesh UnstructuredGrid (0x7f14add95ca0) N Cells: 24 N Points: 30 X Bounds: -2.000e+00, 2.000e+00 Y Bounds: 0.000e+00, 1.974e+00 Z Bounds: 5.500e-01, 5.500e-01 N Arrays: 4
Return a list of areas as individual grids
>>> areas = mapdl.geometry.get_areas(quality=3, return_as_list=True) >>> areas [UnstructuredGrid (0x7f14add95040) N Cells: 12 N Points: 20 X Bounds: -2.000e+00, 2.000e+00 Y Bounds: 0.000e+00, 1.974e+00 Z Bounds: 0.000e+00, 0.000e+00 N Arrays: 4, UnstructuredGrid (0x7f14add95ca0) N Cells: 12 N Points: 20 X Bounds: -2.000e+00, 2.000e+00 Y Bounds: 0.000e+00, 1.974e+00 Z Bounds: 5.500e-01, 5.500e-01 N Arrays: 4, ...