get_bodynames_from_position#

Modeler2D.get_bodynames_from_position(position: list, units: str = None, include_non_model: bool = True) list#

Retrieve the names of the objects that are in contact with a given point.

Parameters:
positionlist

List of [x, y, z] coordinates for the point.

unitsstr, optional

Units, such as "m". The default is None, in which case the model units are used.

include_non_modelbool, optional

Either if include or not non model objects.

Returns:
list

List of object names.

References

>>> oEditor.GetBodyNamesByPosition

Examples

>>> from ansys.aedt.core.modeler.cad.primitives import GeometryModeler
>>> obj = GeometryModeler()
>>> obj.get_bodynames_from_position(position=[0, 0, 0])