Grasshopper

algorithmic modeling for Rhino

Hello,

I am trying to figure out a way to source the number from the number of items in any given list, so that I can parametrically drive a division.

For example, I have two lists, the first has 100 items in it, and the second has 130 items. I then merge the lists so there are 230 items in a single list, and then perform a series of operations which require all of the points to be grouped. Once these operations are completed I would like to separate the lists back into the original lists based on the number of items in the original lists.

I realize that I can use the list item component to manually divide the list back into its original parts, but I would like to make this function automatic so that I could eventually add a recursive component.

Any help would be greatly appreciated. I think this should be simple, but is stumping me!

-Austin

Views: 1401

Replies to This Discussion

I would highly recommend putting your data in a data tree. Then you could have your items on two different branches - one branch with 130 items and one branch with 100 items. After you're done doing your operation on the tree you could simply split it to obtain a two separate lists again.

//Emil

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service