Grasshopper

algorithmic modeling for Rhino

Adding branches at the end of each branch of a tree

Hello guys,

I'm a newbie at Grasshopper and I got a problem with the tree structure.

Basically, I have two trees :

{A,B,C}

{1,2,3,4,6}

And I'd like to get a two-level tree where A,B,C would contain {1,...,6}; and I'd like to do it for any number of branches in any of the tree.

I think that using a VB script would be the easiest way to achieve this but once again, i'm having trouble handling the various commands of vb scripts...

Is there a particular plugin that does this automitaclly or should I throw something together.

I tried to use path mappers but it's a single input and i'd like to somehow merge my two trees together...

Thank you in advance!

Adrien

Views: 1511

Replies to This Discussion

Hello Adrien,

Can you explain what you are after a little bit better?

What are ABC and 12346? Items? Paths? If so, how many items do they contain? What will the resulting paths be?

even better, why don't you post the file in question and explain your request on it?

Hello nikos,

Thanks for your answer,

I attached a screenshot of the part I'm having trouble with.

I have a tree (tree 1) with a variable number of branches (depending on what I do before) but with 4 items in each branch. It's a single-level tree : {A},{B},...,{n}

I have another tree (tree 2) with variable number of branches and with for 5 to 7 items in each branch (caracteristics of different types of bridges). It's a single-level tree : {1},{2},...,{p}

And I'd like to get a two-level tree (tree 3) with resulting paths like :

{{A,1},{A,2},...,{A,n}}

{{B,1},{B,2},...,{B,n}}

...

{{n,1},{n,2},...,{n,p}}

I don't know if that's to write the paths but as you can see on the screenshot, I've done the operation (a bit artificially) for the two first branches of tree 1, using path mappers.

The problem is that the number of branches in tree 2 is variable so I can't use path mappers...

Thanks for your help!

Adrien

Based on your screenshot I understand this is the data structure you want:

Attachments:

Thanks nikos!

It works perfectly!

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