- Mapdl.lang(nl1='', p3='', ang='', phit='', locat='', **kwargs)#
Generate a straight line at an angle with a line.
APDL Command: LANG
Generates a straight line (PHIT-P3) at an angle (ANG) with a line NL1 (P1-P2). The location of PHIT on the line is automatically calculated. Line P1-P2 becomes P1-PHIT and new lines PHIT-P2 and PHIT-P3 are generated. Line divisions are set to zero (use LESIZE, etc. to modify).
PHIT is positioned closest to LOCAT for the given angle, ANG. To ensure better performance, it is recommended that LOCAT be input, even if it is 0.
The program uses an iterative procedure to position PHIT. The procedure is not exact, with the result that the actual value of ANG will sometimes differ slightly from the specified value.
Number of the line to be hit (touched by the end of the new line). If negative, assume P1 (see below) is the second keypoint of the line instead of the first.
Keypoint at which generated line must end.
Angle of intersection of generated line PHIT-P3 with tangent to line P1-P2 at PHIT. If 0 (default), the generated line is tangent to NL1 toward end P1; if 90, the generated line is perpendicular to NL1. If 180, the generated line is tangent to NL1 toward end P2. ANG can be any value, but is adjusted to the corresponding acute angle with respect to LOCAT. See “Notes” for a discussion of accuracy.
Number to be assigned to keypoint generated at hit location (defaults to lowest available keypoint number [NUMSTR]).
Approximate location of PHIT in terms of the ratio of the distance along the line (NL1) to the length of the line. LOCAT can range from 0 to 1. If LOCAT is blank, the point will be located with less speed and accuracy, and an arbitrary location may result.
Line number of the generated line.
Create a line from a line from (0, 0, 0) to (1, 0, 0) to a keypoint at (1, 1, 1) at an angle of 60 degrees.
>>> k0 = mapdl.k("", 0, 0, 0) >>> k1 = mapdl.k("", 1, 0, 0) >>> lnum = mapdl.l(k0, k1) >>> k2 = mapdl.k("", 1, 1, 0) >>> lnum = mapdl.lang(lnum, k2, 60) >>> lnum 2
- Return type: