Grasshopper

algorithmic modeling for Rhino

I have a set of curves, each with a group of points, and I need to re-order those points on each curve in order to draw a spline between them. Is there a way to sort the data within each branch so that I can go for instance from:
{0;0} (0,1,2,3)
{0;1} (0,1,2,3)
to:
{0;0} (0,2,1,3)
{0;1} (0,2,1,3)

Alternately, I assume I could flatten my tree, sort it, and then turn it back into a tree, but I can't figure out this last step. I've tried the graft component, but it makes each point it's own branch where as I will need 4 points per branch.

Any suggestions?

Views: 1034

Replies to This Discussion

I haven't tried this out so not 100% sure it would work, but I think you could use the "List Item" component with the list (0,2,1,3) as the index input.

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