algorithmic modeling for Rhino
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.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by