Grasshopper

algorithmic modeling for Rhino

Hello I am hoping that one of you will be able to tell me how I can move a list of curves vertically until they intersect with one of the points in a list of points.

I have tried Projecting my lines onto the planes that the points exist on, however I am met with the problem of the lines being in a different order than my points. My list of points is sorted by their X coordinators from least to greatest whereas my set of curves has an arbitrary order. So when I project the lines, some lines will move vertically PAST a point and sit on the plane of a point higher up. I want my curves to move until the FIRST point they reach.

In the image I attached you can see that the first two curves are already intersecting with their height markers, and the rest of the curves are on the same plane and need to go up.

Any ideas? 

Thank you!!

Views: 278

Attachments:

Replies to This Discussion

You can also sort the curves the same way you are sorting your points.

For example, you can get the endpoints of your curves (endpoints component), get the X component of the end pts, plug the X components into the Sort component as the key, and input the curves as the Sort Values. The values output should be an ordered list of curves.

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