Grasshopper

algorithmic modeling for Rhino

This is probably an easy question, and am probably overlooking something simply.  

 

Basically I have 3 separate lists of data, that are all flat, and would like to combine them into 1 data tree with 3 branches.  Is there an easy way to build your data tree.  I tried the create branch component, but that seems to only create a branch, how to do you assign that data to it?  Thanks

 

Dennis

Views: 13357

Replies to This Discussion

There's probably a more elegant solution, but without scripting this works well...
Attachments:
How about this:
Cool.  I guess I didn't think of flattening an already flat list.  Actually I another way I figured out how was use the path mapper.  Something like this.  Thanks to both of you.
Attachments:
pretty sure you do not need the (i) in the path mapper for this particular operation.  Somehow I like the flatten tree component's path input over the operation of the pathmapper for simple things like this.  But, to each their own ;)
You are probably right.  I am fairly new to the path mapper, so trying to work out the correct syntax.  You method is actually what I imaged the create branch component would look like where you tell it the branch number and have an input for the data to be attached to that branch.
Never thought of the flatten that way.  Nice!

is there a way to create a data tree with the flatten component for multiple path.

for example i have a list created with the series component and would like this data copies on path {2,4,...} using notation or a list of numbers ?

seems the flatten component only take one path ?

thank you in advance

Yes, flatten takes a single path and puts all data in the tree into that one path.

I don't quite understand what you're after, but if you want to change the paths of an existing tree (without changing the number of paths) you can use the [Replace Paths] component.

Thank you. David

Was hoping it was a way to use notation to create multiple path in order to modify a data tree.

What i am trying to do is:

To find a simple way to move the Y coordinate of a list of pts organize in a data tree without losing the data structure. To create a folding surface as per image attach.

1. Replace items (to create a gradient) / Like the weight culling example.

Path {0} replace all indexes with a new value (a)

Path {1} replace 90% indexes with a new value (a)

Path {2} replace 80% indexes ...

2. Decrease value (a) in relation to path number

3.  After Replace the above items value with

for even path number {0,2,...} replace items with a negative number

Did not find a easy way to create data tree that would achieve the above inside GH.

Point 2 & 3 are easy but i could not found a simple solution for points 1.

At the moment the only way i found is to create the list in Excell manually and import/ export or to create a list on indices for each path.

Any hint appreciated.

Might need to wait for the number slider or path mapper to accept input or notation ?

best

Stephane

Attachments:

Found a simpler way using sort Keys.

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