larea#

Lines.larea(p1='', p2='', narea='', **kwargs)#

Generates the shortest line between two keypoints on an area.

Mechanical APDL Command: LAREA

Parameters:
p1str

First keypoint of line to be generated. If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).

p2str

Second keypoint of line to be generated.

nareastr

Area containing P1 and P2, or area to which generated line is to be parallel.

Returns:
int

Line number of the generated line.

Notes

Generates the shortest line between two keypoints, P1 and P2, both of which lie on an area. The generated line will also lie on the area. P1 and P2 may also be equidistant (in global Cartesian space) from the area (and on the same side of the area), in which case a line parallel to the area is generated.

Examples

Generate a line on a square between its two corners.

>>> k0 = mapdl.k("", 0, 0, 0)
>>> k1 = mapdl.k("", 1, 0, 0)
>>> k2 = mapdl.k("", 1, 1, 0)
>>> k3 = mapdl.k("", 0, 1, 0)
>>> a0 = mapdl.a(k0, k1, k2, k3)
>>> lnum = mapdl.larea(k0, k2, a0)
>>> lnum
1