Grasshopper

algorithmic modeling for Rhino

I'm having trouble accessing Perpendicular Frames derived from a Curve.  I may (or may not) be successfully getting the frames into an array but I certainly can't get them out.  Any ideas?  Perhaps I'm going about this in the wrong way altogether...  Here's the code:

 

Dim myDouble As New List(Of Double)
    myDouble.Add(.5)

    Dim arrPlane As Plane()
    arrPlane = myCrv.GetPerpendicularFrames(myDouble)

    Dim myPlanes As New List (Of Plane)
    myPlanes.Add(arrPlane(0)) 'ERROR IS HERE I THINK!

    A = myPlanes

Views: 302

Replies to This Discussion

If you want to add more than one item at a time to a List, you need to use AddRange() instead of Add().

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks David.  Unfortunately replacing Add with AddRange only reveals a further problem with my script.  I get the following error:

 

Error: Value of type 'Rhino.Geometry.Plane' cannot be converted to 'System.Collections.Generic.IEnumberable(Of Rhino.Geometry.Plane)'.

 

Any ideas?  Many thanks!

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