Grasshopper

algorithmic modeling for Rhino

Hello everyone!

I'm struggling with a data tree problem again.

I have a tree ( i call it FirstTree for this explanation) with 3 branches. Each branch has different type of geometry, and different number of items.

I want to obtain, via Tree Branch component, another tree, in wich the branch 1 will contain the items of branches 1 y 2 of the FirstTree, the branch 2 will contain the items of branches 2 y 3 of the firstTree, and the branch tree will contain the items of branches 1,2 and 3 (all) of the FirstTree.
But, i had no succes. The new tree doesnt get the expected items in its branches, repeating items instead of put the items that i want.

thanks in advance for any information or help.

Views: 1354

Attachments:

Replies to This Discussion

Does it have to be via the [Tree Branch] component? You could use [Split Tree] and [Entwine]:

--

David Rutten

david@mcneel.com

Tirol, Austria

David, 

thank you very much.

I need a solution that will work  with no need to put a Split Tree component for each branch of the first tree. The number of branches in the firs tree will be variable from one file to other.

So the output tree contains branches that in turn contain all the items in original branches:

  1. (1 & 2)
  2. (2 & 3)
  3. (3 & 4)
  4. ( ...... )
  5. ( ...... )
  6. ( N-1, N)

and the last branch contains all items from all branches?

--

David Rutten

david@mcneel.com

Tirol, Austria

David,

yes, im trying to create sets for further boolean operations with breps. In this example i was trying to simplify the problem to its minimun expression.
I have a tree with a variable number of branches, it depends on the  file. Each of them can have one or two items. 

I want to get the items in branch 1 and branch 2 of the first tree, and create a set for a Solid Intersection with another set that  contains items of the  branches 3 and 4 of the first tree...and so on....until all branches are intersected

So long as your path data always has a single index ({1},{2},{3}...{n}) this should scale. If you have data with more complex indices it will be a bit trickier, but still should be possible with native components...

Attachments:

David,

You did it! Very clever of you. Today I learnt something more about grasshopper!

And thank you very much  for the explanations; otherwise I would not have understood.

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