Adds an interpolated curve object. based on surface parameters, that lies on a specified surface. Note, this function will not create periodic curves, but it will create closed curves.
Rhino.AddInterpCrvOnSrfUV (strObject, arrPoints)
strObject |
Required. String. The surface object's identifier. |
arrPoints |
Required. Array. An array of 2-D surface parameters. The array must contain at least two sets of surface parameters. |
String |
The identifier of the new object if successful. |
Null |
If not successful, or on error. |
Const rhObjectSurface = 8
Dim strObject, arrDomU, arrDomV, u0, u1, v0, v1
strObject = Rhino.GetObject("Select surface to draw curve on", rhObjectSurface)
If VarType(strObject) = vbString Then
arrDomU = Rhino.SurfaceDomain(strObject, 0)
u0 = arrDomU(0)/2
u1 = arrDomU(1)/2
arrDomV = Rhino.SurfaceDomain(strObject, 1)
v0 = arrDomV(0)/2
v1 = arrDomV(1)/2
Rhino.AddInterpCrvOnSrfUV strObject, Array(Array(u0,v0), Array(u1,v1))
End If