kbetw#

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

Creates a keypoint between two existing keypoints.

APDL Command: KBETW

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 (e.g., 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.

Parameters:
kp1

First keypoint.

kp2

Second keypoint.

kpnew

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

type_

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).

value

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.

Return type:

int

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