Grasshopper

generative modeling for Rhino

Victor Leung

Sorting points/curves according to their location into tree branches

I got a bunch of planner closed curves, they are all parallel in space, having different height (Z position).

Is there a not VB way that can analyze those z positions, and sort the curves into a tree structure.

So that I got a tree, with multiple branches, each branch contain one or more planer curves which have the same z value.

Thanks

Tags: analysis, curve, sort, structure, tree

Views: 170

Reply to This

Replies to This Discussion

this ought to work..
Attachments:
Tks a lot, this works very well.

Despite there in your upload, there is a mis-connect, the B input of the final compare should be fed by the plane component output instead of the sorted output.

But its a very nice tweak, a sort, shift, compare, cull sequence, I've never thought of that.
glad it worked. cheers. help others when you can
Hi Andrei,
I used your def. to help with a problem I'm having sorting points based on their z value, it does divide the list the way i need it, however it doesn't reorganize the list based on the z values, it keeps the same order just divides the list. I need what the sort points component does but for z values that i can then input into your def. to achieve the list division. Thank you for any help.
-Boris

it's the weirdest thing! the equality compare component doesn't give the right answer unless i pass the data through a panel first. maybe it's a bug or something...
anyway, this should work (attachment):
Attachments:

RSS

Translate

Search Grasshopper

Members

  • Vladimir
  • jorudan
  • Paul Sohi
  • Ivan Kiryakov
  • Marco Caprani
  • Sameer Kumar
  • Hannes Löschke
  • Peter Kluck
  • Igor
  • Agnes Tan
  • Pieter Segeren
  • David Rutten

Photos

  • Add Photos
  • View All

© 2012   Created by Scott Davidson.   Powered by .

Badges  |  Report an Issue  |  Terms of Service