lstr#

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

Defines a straight line irrespective of the active coordinate system.

Mechanical APDL Command: LSTR

Parameters:
p1str

Keypoint at the beginning of line. If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI)

p2str

Keypoint at the end of line.

Returns:
int

Line number of the generated line.

Notes

Defines a straight line from P1 to P2 using the global Cartesian coordinate system. The active coordinate system will be ignored. The line shape is invariant with the coordinate system after it is generated. Lines may be redefined only if not yet attached to an area.

Examples

Create a cartesian straight line regardless of the coordinate system being in cylindrical.

>>> mapdl.csys(1)
>>> k0 = mapdl.k("", 0, 0, 0)
>>> k1 = mapdl.k("", 1, 1, 1)
>>> lnum = mapdl.lstr(k0, k1)
>>> lnum
1