Component#
- class ansys.mapdl.core.component.Component(type_: Literal['NODE', 'NODES', 'ELEM', 'ELEMS', 'ELEMENTS', 'VOLU', 'AREA', 'LINE', 'KP'], items_: Tuple[str, Tuple[int] | List[int] | ndarray[Any, dtype[int64]]])#
Component object
Object which contain the definition of a component.
- Parameters:
Examples
To create a component object
>>> mycomp = Component("NODES", [1, 2, 3]) >>> mycomp Component(type='NODES', items=(1, 2, 3))
To index the content of the component object:
>>> mycomp[0] 1 >>> mycomp[1] 2
To access the type of the entities:
>>> mycomp.type "NODES"
Convert to list:
>>> list(mycomp) [1, 2, 3]
Methods
Component.count
(value, /)Return number of occurrences of value.
Component.index
(value[, start, stop])Return first index of value.
Attributes
Return the ids of the entities in the component.
Return the type of the component.