*curveaddpoint

Adds a new point in the curve.

Syntax

*curveaddpoint curve_id index xvalue yvalue

Type

HyperMesh Tcl Modify Command

Description

Adds a new point in the curve.

Inputs

curve_id
The ID of the curve.
index
The point number (point numbering starts with 1) after which the new point needs to be added.
0 - If point needs to be added at the beginning.
xvalue
The x coordinate of the point.
yvalue
The y coordinate of the point.

Examples

To add a new point with x and y values to a curve with ID curve_id having N number of points:

At the beginning:
*curveaddpoint($curve_id, 0, $ xvalue, $ yvalue)
After the second point:
*curveaddpoint($curve_id, 2, $ xvalue, $ yvalue)
At the end (i.e., after Nth point):
*curveaddpoint($curve_id, [hm_curve_getnumberofpoints $curve_id], $ xvalue, $ yvalue)