Grasshopper

algorithmic modeling for Rhino

I have a quick question about counting Lists and Arrays.

 

I have a component input called crv.  I want to count the number of curves coming in.

But, sometimes I also want to sort the curves, and add them to respective lists.  At that point, each time I add a curve, it seems to (from my understanding) create a new array within the list.

 

Correct me if I am wrong, but isn't everything an array in the grasshopper componenet?  If I say;

 

Dim pts as Point3d

 

I am essentially creating an array called 'pts.'  Right?

 

Questions:

1.  How do I count arrays of objects (like curves, points, etc.) in VB?

2.  How do I count the number of arrays within lists?  Since each time I add a member to a list, it is given the index 0.

 

Regards,

Matt

 

 

Views: 618

Replies to This Discussion

No. Data in parameters is stored in IGH_DataStructure, which is basically a data tree. However when you declare your own data you get exactly what you ask for.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

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