Get the curve length at the specified point on the curve

Hi all,

Pls check the posted image.

how can i get the length of the curve at the specified point using VB.Net.

i am making a Rhino Automating plugin.
I am using the script object code is :

Public obj As Object = RhUtil.RhinoApp.GetRhinoScriptInterface()
Public RScript As RhinoScript4.IRhinoScript = CType(obj, RhinoScript4.IRhinoScript)

Is it possible to get what i have shown in the image by using script object or by any other method in Vb.Net ??
i am using VS 2008

Hi Louis,

you might pass a subdomain to the curve length method. The domain comes from the two points on the curve and must be non decreasing. Below two examples, in RhinoScript and Python.

SubCurveLength.rvb (828 Bytes)
SubCurveLength.py (754 Bytes)

c.

1 Like

clement … thnx for your reply.

I am trying to do this in VB.Net not in RhinoVBScript.
I have done this in RVB but in .Net it gives me error

Since you are automating Rhino externally, you will need to use the CurveLength method, which is found on the RhinoScript object.

http://4.rhino3d.com/5/rhinoscript/curve_methods/curvelength.htm

Hi Dale

I used the curvelength command only but when try to get the curvedomain it fails so i used this :

    Dim AT = New Object() {-1, dClosePt}
    len2SPt = RScript.CurveLength(baseCurve, , AT)

and this works for me :smile: