l#
- Lines.l(p1='', p2='', ndiv='', space='', xv1='', yv1='', zv1='', xv2='', yv2='', zv2='', **kwargs)#
Defines a line between two keypoints.
Mechanical APDL Command: L
- Parameters:
- p1
str 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).- p2
str Keypoint at the end of line.
- ndiv
str Number of element divisions within this line. Normally this field is not used; specifying divisions with lesize, etc. is recommended.
- space
str Spacing ratio. Normally this field is not used, as specifying spacing ratios with the lesize command is recommended. If positive,
SPACEis the nominal ratio of the last division size (atP2) to the first division size (atP1). If the ratio is greater than 1, the division sizes increase fromP1toP2, and if less than 1, they decrease. IfSPACEis negative, then |SPACE| is the nominal ratio of the center division size to those at the ends.- xv1
str Location (in the active coordinate system) of the head of the “slope vector” corresponding to the slope at the
P1end of the line. The tail of the vector is at the origin of the coordinate system.- yv1
str Location (in the active coordinate system) of the head of the “slope vector” corresponding to the slope at the
P1end of the line. The tail of the vector is at the origin of the coordinate system.- zv1
str Location (in the active coordinate system) of the head of the “slope vector” corresponding to the slope at the
P1end of the line. The tail of the vector is at the origin of the coordinate system.- xv2
str Location of the head of the “slope vector” corresponding to the slope at the
P2end of the line.- yv2
str Location of the head of the “slope vector” corresponding to the slope at the
P2end of the line.- zv2
str Location of the head of the “slope vector” corresponding to the slope at the
P2end of the line.
- p1
- Returns:
intThe line number of the generated line.
Notes
Warning
This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.
Defines a line between two keypoints from
P1toP2. The line shape may be generated as “straight” (in the active coordinate system) or curved. The line shape is invariant with coordinate system after it is generated. Note that solid modeling in a toroidal coordinate system is not recommended. A curved line is limited to 180°. Lines may be redefined only if not yet attached to an area.Examples
Create a line between the two keypoints (0, 0, 0) and (1, 0, 0)
>>> k0 = mapdl.k("", 0, 0, 0) >>> k1 = mapdl.k("", 1, 0, 0) >>> lnum = mapdl.l(k0, k1) >>> lnum 1