Grasshopper

algorithmic modeling for Rhino

Sort path/branch by average on contents. Stumped....

Hi thoughtful people.  

I am currently trying to order 2 branches of floats by their average WITHOUT changing the order of the contents of the list.  I am sure this is a simple task, but I am finding it evasive.

The 2 branches I am dealing with are simply the endpoints of a collection of curves.  Because they are generated as sections cut from a brep, their direction is very unreliable, regardless of the direction of the brep normal.  I wish the start point to always have a higher Z value than the end point.

Any helpful suggestion would be amazing.  Thanks!

-Ben

Views: 410

Replies to This Discussion

Try using flip curve with a "guide curve" that is straight up and down in the Z axis, before grabbing the curve end points. 

Hot damn! Thanks! I was concerned with the "planarity", but I could use either end point as the starting point for the guide line.  Thanks again for the clear solution, it worked out great.

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