How to Randomly Select Trees (and not branches)

The goal is to merge a Tree with a random set of Tree. ( So the possible output would be two set of tree) Like the picture below.

Is it possible?


gh.gh (35.1 KB)

Something like this could do the trick


gh.gh (35.8 KB)

By the way, 2 small advices :slight_smile:

  • Your model is currently 200 000+ meters away from Rhino’s origin, which can lead to slower calculation and less precise results. You might want to bring the model closer to the center.
  • Having different depth level of branches within one datatree is (I think) never a good thing… I’m speaking of this

It’ll be a lot easier for you if you find another way that keeps same depth level within one tree :slight_smile:
It comes from a merge that you do earlier in the definition. You could either flatten the inputs (not outputs) of the merge, or use entwine (flatten mode). I believe entwine will be more suited in your case.

Cheers !

3 Likes

Thank you for all the tips. really helped! :slight_smile:

1 Like