l2ang#
- Lines.l2ang(nl1='', nl2='', ang1='', ang2='', phit1='', phit2='', **kwargs)#
Generates a line at an angle with two existing lines.
Mechanical APDL Command: L2ANG
- Parameters:
- nl1
str Number of the first 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. IfNL1= P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).- nl2
str Number of the second line to be hit. If negative, assume
P3is the second keypoint of the line instead of the first.- ang1
str Angle of intersection (usually zero or 180) of generated line with tangent to first line.
- ang2
str Angle of intersection (usually zero or 180) of generated line with tangent to second line.
- phit1
str Number to be assigned to keypoint generated at hit location on first line (defaults to lowest available keypoint number ( numstr )).
- phit2
str Number to be assigned to keypoint generated at hit location on second line (defaults to lowest available keypoint number ( numstr )).
- nl1
- Returns:
intLine number of the generated line.
Notes
Generates a straight line (
PHIT1-PHIT2) at an angle (ANG1) with an existing lineNL1(P1-P2) and which is also at an angle (ANG2) with another existing lineNL2(P3-P4). If the angles are zero the generated line is tangent to the two lines. ThePHIT1andPHIT2locations on the lines are automatically calculated. LineP1-P2becomesP1-PHIT1,P3-P4becomesP3-PHIT2, and new linesPHIT1-P2,PHIT2-P4, andPHIT1-PHIT2are generated. Line divisions are set to zero (use lesize, etc. to modify).Examples
Create two circles and join them with a line.
>>> k0 = mapdl.k("", 0, 0, 0) >>> k1 = mapdl.k("", 0, 0, 1) >>> k2 = mapdl.k("", 0, 0, 0.5) >>> carc0 = mapdl.circle(k0, 1, k1) >>> carc1 = mapdl.circle(k2, 1, k1) >>> lnum = mapdl.l2ang(carc0[0], carc1[0], 90, 90) >>> lnum 9