Grasshopper

algorithmic modeling for Rhino

Recursion or Nested Loops within a Tree inside a VB.net component

           Hello all; Given a certain tree, I´m trying to iterate across the branches in order to get this new tree structure, without any success. Probably this must have a recursive solution, but I can´t find it ... any ideas? Thanks in advance and congrats for the forum.

Views: 1493

Attachments:

Replies to This Discussion

Wow this is tricky. Not giving up yet though.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I found a solution, but it's pretty ugly. It definitely feels like there should be a clean recursive way to solve this, but I couldn't think of it.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

("pretty-ugly" that is how my last girlfriend used to call me)

It is really cool, despite the huge but nice and brilliant piece of script... I will try to find a clean and short recursive solution, but this works perfectly.

I´m so glad you took little of your precious time to solve this issue; i was stuck... thank you very (very) much, David. Soon I will post the definition I am working on ( it is about topological distribution of nodes, and transferency values) if it´s handy for somebody here in the forum.

My apologies for the time you spent, and thank you again.

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