ansys.mapdl.core.Mapdl.spline#

Mapdl.spline(p1='', p2='', p3='', p4='', p5='', p6='', xv1='', yv1='', zv1='', xv6='', yv6='', zv6='', **kwargs)#

Generates a segmented spline through a series of keypoints.

Mechanical APDL Command: SPLINE

Parameters:
p1str

Keypoints through which the spline is fit. At least two must be defined. If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).

p2str

Keypoints through which the spline is fit. At least two must be defined. If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).

p3str

Keypoints through which the spline is fit. At least two must be defined. If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).

p4str

Keypoints through which the spline is fit. At least two must be defined. If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).

p5str

Keypoints through which the spline is fit. At least two must be defined. If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).

p6str

Keypoints through which the spline is fit. At least two must be defined. If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI).

xv1str

Location (in the active coordinate system) of the head of the “slope vector” corresponding to the slope at the P1 end of the spline. The tail of the vector is at the origin of the coordinate system.

yv1str

Location (in the active coordinate system) of the head of the “slope vector” corresponding to the slope at the P1 end of the spline. The tail of the vector is at the origin of the coordinate system.

zv1str

Location (in the active coordinate system) of the head of the “slope vector” corresponding to the slope at the P1 end of the spline. The tail of the vector is at the origin of the coordinate system.

xv6str

Location of the head of the “slope vector” corresponding to the slope at the P6 (or the last keypoint if fewer than six specified) end of the spline.

yv6str

Location of the head of the “slope vector” corresponding to the slope at the P6 (or the last keypoint if fewer than six specified) end of the spline.

zv6str

Location of the head of the “slope vector” corresponding to the slope at the P6 (or the last keypoint if fewer than six specified) end of the spline.

Returns:
list
List of line numbers generated.

Notes

Warning

This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.

The output from this command is a series of connected lines (one line between each pair of keypoints) that together form a spline. Note that solid modeling in a toroidal coordinate system is not recommended.

Examples

Create a spline with 5 keypoints.

>>> k0 = mapdl.k('', 0, 0, 0)
>>> k1 = mapdl.k('', 0.2, 0.2, 0)
>>> k2 = mapdl.k('', 0.4, 0.3, 0)
>>> k3 = mapdl.k('', 0.6, 0.5, 0)
>>> k4 = mapdl.k('', 0.8, 0.3, 0)
>>> lines = mapdl.spline(k0, k1, k2, k3, k4)
>>> lines
[1, 2, 3, 4]