Grasshopper

algorithmic modeling for Rhino

combine lists into separate branches and then re-separate

Hi,

I have two lists:

list 1:

a

b

c

d

list 2:

w

x

y

z

i want to end up with a tree with 2 branches that look like this:

{0}

1. a

2. b

3. c

4. d

{1}

1. w

2. x

3. y

4. z

so then I want to do a number of operations on both branches, and then re-separate them.

I tried to play with the flip matrix node, but I am dealing with lists with different lengths, and I am not sure how to handle all the steps in between so that the end result can easily be separated.

thanks,

Dimitar

Views: 5331

Replies to This Discussion

"Entwine" and "split tree" can do such a thing. See attached

the "?" in the "{0;?}"  split mask expression is a wildcard, it means "any single character".

partition list can work as well.

thanks for the reply. I forgot to mention that I am dealing with initial data that is already in branches, and i cannot entwine it correctly yet.

How would I accomplish mergins these two lists that I can later split to do, for example ruled surfaces?

You can then skip the entwine and use a path mapper like this on every lists :

List 0 : from {A} to {0;A} (you'll have to simplify the A list first and make sure it will always have two indexes)

List 1 : from {A} to {1;A} (idem)

Then, you merge the two result do your operation and split tree in the end.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service