Grasshopper

algorithmic modeling for Rhino

Grabbing given index number from Data Tree with branches of different length?

Hello all,

I currently divided different length lines by a fixed length. This thus created more points on the longer curves, and the tree contains branches with different amount of items.

Some branches have 2 items, some branches 3, etc.

Now I want to connect all same number points with a poly line.

But when I list item index 3 for examples, it also grabs items from the branches that have 2 items. How can I avoid this?

Thanks

Views: 558

Attachments:

Replies to This Discussion

Flip Matrix is your friend. Just have to find the beginning of your list now ;)

Good luck!

Jonny

Thank you,

I actually tried that, but I am afraid the end point is not right, that crossing line should not be connected, there should all be kind of circumferences.

You can close the polyline then remove the longest segment, but that only works for the inner two polylines where there actually is a longest segment. Not sure what logic you could use for the other curves.

I don't see a 'List Item' or 'PLine (Polyline)' in your code?  Did you try setting 'List Item Wrap (W)' to false?

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service