line_select#

LegacyGeometry.line_select(items, sel_type='S', return_selected=False)#

Select lines using a sequence of items.

Parameters:
itemssequence or None

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

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 line 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 lines [1, 5, 10]

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

Create a new selection of lines from 1 through 20

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

Unselect lines 1 through 20

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

Append to an existing selection of lines

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

Reselect from the existing selection of lines

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

Select no lines

>>> mapdl.geometry.line_select(None)

Select all lines

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