Grasshopper

algorithmic modeling for Rhino

Hello,

Relative Item requires an input such as {+1}[-1]. How can I make the +/- and two integers variables subject to sliders? Sad to say, but I'm completely baffled by formatting in Gh. Thanks.

Views: 1090

Replies to This Discussion

the {} numbers are the path, and the [] are the index. a useful component is 'tree statistics' , which will give you a path list, this can be used as an input for a tree item. 

Thank you Mark but I am interested in the actual mechanics of character manipulation in order to compose the statement above. The component tool-tips in the Text menu are not exactly self-explanatory. Though naturally lazy, I searched and there are not a lot of examples floating out there for formatting in general; maybe it's just me...

you can compose the text by inputting a number sequence, from the number component, into a txt component. it will convert to text for you, then try feeding that to the relative path.

also, you might like this discussion:

http://www.grasshopper3d.com/forum/topics/lists-sets-strings-trees

and

http://www.grasshopper3d.com/forum/topics/relative-item-component-b...

Get these as well as a "guideline". Notify if you need far more complex rel-items examples (or split tree).

Attachments:

Thank you Peter. I wish I knew about these methods much earlier - and I even managed to find the answer to my question amongst the treasure trove!

Well rel-item(s) is rather very simple: imagine cloning a tree: on the left you have the OEM, on the right the clone (with the shifted indices with regard branches and/or items) . So you pick one thing from the left and another from the right and do business.

The equivalent via the Dark Side is:

Point3d p1 = SomeTree1.Branch(i1,i2,i3, ...)[j1];

Point3d p2 = SomeTree2.Branch(k1,k2,k3 + shift1 ,...)[j2 + shift2];

If you are really brave see this attached as well (requires a triple espresso [min]). If you can master this ... there's nothing that can stop you (but the Dark Side better IS, he he).

Attachments:

A triple espresso, a seven percent solution, and a bed of nails. Thanks.

The only way the hard way IS.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service