Grasshopper

algorithmic modeling for Rhino

Hey everyone,

I'm trying to get the length of a bezier crv made in a VB component:

Dim bezCurve As New BezierCurve(pts)
Dim bezCrvOut As NurbsCurve = bezCurve.ToNurbsCurve

Dim crv_length As Double = bezCrvOut.GetLength()

bezCrv = bezCrvOut
lenOut = crv_length

Am I doing something wrong? When I take the curve output and measure its length I get 164, but I'm getting lenOut = 0.

Thanks,

Brian

Views: 305

Replies to This Discussion

Hi Brian,
This should have worked. Will have to dig deeper to see why the length is returning false (or zero).

If I try a small variation of your code, I can get it to work as expected:
Dim bezCurve As New BezierCurve(pts)
Dim nc As New NurbsCurve(bezCurve.ToNurbsCurve())

crvOut = nc
lenOut = nc.GetLength()

I hope this will help for now.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service