Grasshopper

algorithmic modeling for Rhino

I have a single curve that I get from Rhino which comprises out of 2 curves. Namely a line and a curve. Depending on how the single curve is fliped in Rhino after I explode and use LIST component and choose item "0" it could be either of the two curves.

My only constant is that my LINE will always be the shortest between the two curves. I want my shortest LINE to always be ITEM "0" on the list.

So how can I make a condition that checks that Item "0" is the shortest LINE and if it is not, then FLIP the curve, so that it will be item "0".

My image attached shows what I have so far. (not much)

I would really be thankful for some help with this.

Views: 342

Attachments:

Replies to This Discussion

Never mind, I figured it out, it was actually so simple.
how did you solve it?
I sadly have not been able to use Grasshopper in quite a long while, and don't even have a working version on my pc right now.

My best guess right now is that I first measured the length of all the curves in the curve parameter and used Sort list component to rearrange the curves in a new list according to their lengths making the shortest curve item '0' and second shortest curve item '1' etc.

I can imagine there are many approaches to this problem depending on additional factors. Hope that helps, sorry can't make an image.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service