kl#

Mapdl.kl(nl1='', ratio='', nk1='', **kwargs)[source]#

Generates a keypoint at a specified location on an existing line.

APDL Command: KL

Parameters:
nl1

Number of the line. If negative, the direction of line (as interpreted for RATIO) is reversed.

ratio

Ratio of line length to locate keypoint. Must be between 0.0 and 1.0. Defaults to 0.5 (divide the line in half).

nk1

Number to be assigned to keypoint generated at division location (defaults to lowest available keypoint number [NUMSTR]).

Returns:
int

Keypoint number of the generated keypoint.

Return type:

int

Examples

Create a keypoint on a line from (0, 0, 0) and (10, 0, 0)

>>> kp0 = (0, 0, 0)
>>> kp1 = (10, 0, 0)
>>> knum0 = mapdl.k("", *kp0)
>>> knum1 = mapdl.k("", *kp1)
>>> lnum = mapdl.l(knum0, knum1)
>>> lnum
1