Returns a 3-D vector that is the tangent to a curve at a parameter.
Rhino.CurveTangent (strObject, dblParameter [, intIndex])
strObject |
Required. String. The object's identifier. |
dblParameter |
Required. Number. The parameter to evaluate. |
intIndex |
Optional. Number. If strObject identifies a polycurve object, then intIndex identifies the curve segment of the polycurve to query. |
Array |
A 3-D vector if successful. |
Null |
If not successful, or on error. |
Const rhObjectCurve = 4
Dim strObject, arrPoint, dblParam, arrNormal
strObject = Rhino.GetObject("Select a curve", rhObjectCurve)
If Not IsNull(strObject) Then
arrPoint = Rhino.GetPointOnCurve(strObject)
If IsArray(arrPoint) Then
dblParam = Rhino.CurveClosestPoint(strObject, arrPoint)
arrNormal = Rhino.CurveTangent(strObject, dblParam)
Rhino.Print Rhino.Pt2Str(arrNormal)
End If
End If