ansys.mapdl.core.Mapdl.kbetw#
- Mapdl.kbetw(kp1='', kp2='', kpnew='', type_='', value='', **kwargs)#
Creates a keypoint between two existing keypoints.
Mechanical APDL Command: KBETW
- Parameters:
- kp1
str First keypoint. If
KP1= P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).- kp2
str Second keypoint.
- kpnew
str Number assigned to the new keypoint. Defaults to the lowest available keypoint number.
- type_
str Type of input for
VALUE.RATIO- Value is the ratio of the distances between keypoints as follows: (KP1-KPNEW)/(KP1-KP2).DIST- Value is the absolute distance betweenKP1andKPNEW(valid only if current coordinate system is Cartesian).
- value
str Location of new keypoint, as defined by
Type(defaults to 0.5). IfVALUEis a ratio (Type= RATIO) and is less than 0 or greater than 1, the keypoint is created on the extended line. Similarly, ifVALUEis a distance (Type= DIST) and is less than 0 or greater than the distance betweenKP1andKP2, the keypoint is created on the extended line.
- kp1
- Returns:
intKeypoint number of the generated keypoint.
Notes
Placement of the new keypoint depends on the currently active coordinate system ( csys ). If the coordinate system is Cartesian, the keypoint will lie on a straight line between
KP1andKP2. If the system is not Cartesian (for example, cylindrical, spherical, etc.), the keypoint will be located as if on a line (which may not be straight) created in the current coordinate system betweenKP1andKP2. Note that solid modeling in a toroidal coordinate system is not recommended.Examples
Create a keypoint exactly centered between two keypoints.
>>> k0 = mapdl.k("", 0, 0, 0) >>> k1 = mapdl.k("", 1, 0, 0) >>> k2 = mapdl.kbetw(k0, k1) >>> k2 3