kbetw#

Keypoints.kbetw(kp1='', kp2='', kpnew='', type_='', value='', **kwargs)#

Creates a keypoint between two existing keypoints.

Mechanical APDL Command: KBETW

Parameters:
kp1str

First keypoint. If KP1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).

kp2str

Second keypoint.

kpnewstr

Number assigned to the new keypoint. Defaults to the lowest available keypoint number.

type_str

Type of input for VALUE.

  • RATIO - Value is the ratio of the distances between keypoints as follows: ( KP1 - KPNEW )/( KP1 - KP2 ).

  • DIST - Value is the absolute distance between KP1 and KPNEW (valid only if current coordinate system is Cartesian).

valuestr

Location of new keypoint, as defined by Type (defaults to 0.5). If VALUE is a ratio ( Type = RATIO) and is less than 0 or greater than 1, the keypoint is created on the extended line. Similarly, if VALUE is a distance ( Type = DIST) and is less than 0 or greater than the distance between KP1 and KP2, the keypoint is created on the extended line.

Returns:
int

Keypoint number of the generated keypoint.

Notes

Placement of the new keypoint depends on the currently active coordinate system ( csys ). If the coordinate system is Cartesian, the keypoint will lie on a straight line between KP1 and KP2. If the system is not Cartesian (for example, cylindrical, spherical, etc.), the keypoint will be located as if on a line (which may not be straight) created in the current coordinate system between KP1 and KP2. Note that solid modeling in a toroidal coordinate system is not recommended.

Examples

Create a keypoint exactly centered between two keypoints.

>>> k0 = mapdl.k("", 0, 0, 0)
>>> k1 = mapdl.k("", 1, 0, 0)
>>> k2 = mapdl.kbetw(k0, k1)
>>> k2
3