kp#

Query.kp(x, y, z)#

Return keypoint closest to coordinate (x, y, z).

Number of the selected keypoint nearest the x, y, z point.

In the active coordinate system, lowest number for coincident keypoints.

Parameters:
xfloat

X-coordinate in the active coordinate system

yfloat

Y-coordinate in the active coordinate system

zfloat

Z-coordinate in the active coordinate system

Returns:
int

Keypoint number

Return type:

int

Examples

In this example we construct a simple triangle of keypoints in 3D and then find the keypoint closest to the point (1, 1, 1).

>>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl()
>>> mapdl.prep7()
>>> mapdl.k(1, 0, 1, 2)
>>> mapdl.k(2, 1, 2, 0)
>>> mapdl.k(3, 2, 0, 1)
>>> mapdl.queries.kp(1., 1., 1.)
1