Grasshopper

algorithmic modeling for Rhino

Branching info and simplify tree, how to efficiently match branches?

I have a list of vectors, and i want to duplicate the first and last vector in the list. I extract the first vector by using the list item component, and the last, by reversing the list and using the same component.

I would like the merge these so that my original list:

(A,B,C,D,E,F)

looks like

(A,A,B,C,D,E,F,F)


What i don't understand is how branching info works. Whenever my list (with branches) passes through a component, it's number shifts. When i try to merge them, i can't get them to merge into a single branch but i get something like this:

{1:0}
A,A,B,C,D,E,F
{1:0:0}
F

Mainly because the last item passed through reverse component. So far i'm solving this by adding a list split component, which i split at index 0. Is this the proper way to do it?

Views: 141

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service