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
  • x (float) – X-coordinate in the active coordinate system

  • y (float) – Y-coordinate in the active coordinate system

  • z (float) – Z-coordinate in the active coordinate system

Return type

int

Returns

int – Keypoint number

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
>>> from ansys.mapdl.core.inline_functions import Query
>>> mapdl = launch_mapdl()
>>> mapdl.prep7()
>>> mapdl.k(1, 0, 1, 2)
>>> mapdl.k(2, 1, 2, 0)
>>> mapdl.k(3, 2, 0, 1)
>>> q = Query(mapdl)
>>> q.kp(1., 1., 1.)
1