Grasshopper

algorithmic modeling for Rhino

Hi all;

I would like to know if there is anyway to reference a line by its length?

I have a set of lines with different lengths and I would like to select those with specific length.

Thanks!

Views: 1396

Replies to This Discussion

Lines in Rhino or lines in Grasshopper?

Either way you have to get all curves into one list, then measure their lengths and pick the one that best resembles the desired length. This will be problematic, as lengths are floating point numbers, so you cannot simply use the equality component. After all the length of the curve you want may well be 4.9999999999999998 instead of exactly 5.

My advice is to measure all lengths, subtract the desired length, take the absolute of that difference, sort by these absolute values and then pick the first curve in that sorted list.

I hope to help you

Attachments:

Yes really helpful! thank you

Thanks David perfect

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service