Grasshopper

algorithmic modeling for Rhino

Hi,
I'm doing a simple larger than check but instead of shifting one input list i thought I'll iterate it in Python. However I'm having trouble keeping a tree structure in my result.

Found:

http://www.grasshopper3d.com/forum/topics/python-multi-dimensional-...

where they use GH_Path() but can't seem to get that to work. Any Ideas?

Views: 1076

Attachments:

Replies to This Discussion

Hi Peter

the more straightforward solution to this is:

If possible, it is usually wiser to let Grasshopper handle tree iteration logic in its normal way, and only take care of the actual algorithm. Replicating tree iteration completely is very difficult, and often less efficient than what you would get for free from Grasshopper.

This code shows how to convert a list of lists into a DataTree, and vice versa. There are also several other pages with examples, like on this page

Thanks

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service