area_select#

Geometry.area_select(items, sel_type='S', return_selected=False)[source]#

Select areas using a sequence of items.

Parameters:
itemssequence, str, None

List, range, or sequence of integers of the areas you want to select. If None or 'NONE', no areas will be selected. If ‘ALL’, selects all areas.

sel_typestr, optional

Selection type. May be one of the following:

  • 'S': Select a new set (default)

  • 'R': Reselect a set from the current set.

  • 'A': Additionally select a set and extend the current set.

  • 'U': Unselect a set from the current set.

return_selectedbool, optional

Return the area numbers selected. Optional, and can be disabled for performance. Default False.

Returns:
np.array

Numpy array of keypoint numbers if return_selected=True.

Return type:

Optional[ndarray[Any, dtype[int32]]]

Examples

Create a new selection of areas [1, 5, 10]

>>> mapdl.geometry.area_select([1, 5, 10])

Create a new selection of areas from 1 through 20

>>> mapdl.geometry.area_select(range(1, 21))

Unselect areas 1 through 20

>>> mapdl.geometry.area_select(range(1, 21), sel_type='U')

Append to an existing selection of areas

>>> mapdl.geometry.area_select([1, 2, 3], sel_type='A')

Reselect from the existing selection of areas

>>> mapdl.geometry.area_select([3, 4, 5], sel_type='R')

Select no areas

>>> mapdl.geometry.area_select(None)

Select all areas

>>> mapdl.geometry.area_select('ALL')