Grasshopper

algorithmic modeling for Rhino

Hello,

simple question that I'm just not seeing an answer to because i've been looking at it too long.  I have two lists, one of 4 items (points) and the other list of 1 one item (single point).  I want to add the list of one item to the end of the list of 4 items.  It has to be at the end, and that's what I can't figure out.,

Thanks,

Views: 10828

Replies to This Discussion

I know that, without working with trees, you can do this by sending the first list to a new component, a "point" component for example, and then, holding shift, add the second list (this is done in the order that you want the points) and then right click on the input of the new "point" component and click on "flatten", this should work.
I think I would just use the [Merge] component (in the Logic>tree toolbar), plug the first list into a and the second into b, this way you know what order they will be in (b comes after a)... --Mitch
I find that with the latest version of grasshopper, basically since trees and branches were introduced, if you don't flatten in cases like this then it never works out how it used to or how you would think it should work.
Thanks Mitch and Adam,

Yes I see the problem now with respect to the 'tree branches'. The list of four items had three branches, where as the list of one item had only two branches. When trying to merge those two lists, the different number in branches causes the problem. Flattening the lists and then merging the lists will work, but I then loose the branch information, which i will need in the future. Another way was to graft a branch to the list of one item to make that list also equal three branches, then merge the lists. This also works but keeps the branch information.

Thanks again - it's good to know they're people out there to help out..

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