algorithmic modeling for Rhino
Hi,
I need to extract the relative position of each vertex on a polyline made of straight lines.
In this sense, the start point has an l/L ratio (relative position) of 0 , the end point has an l/L ratio of 1, and I need to get that ratio for all the other points.
To get the parameters of these points on the polyline, I found nothing else than the "Discontinuity" component.
The problem is that if two consecutive segments are aligned, the vertex that they share will be ignored.
I'm sure there is a more robust way to do this, but I can't figure it out :(
Cheers,
Tags:
Updated GH with inset component to include the first vertex value of 0...
Hi Joe,
Thanks a bunch !
I suppose that it works because the list of exploded segments is consistent with their location in the polyline.
I didn't know that the "Mass addition" component had this helpful "Partial results output" ; nice .
Cheers,
Just two more things:
1. You can get the same results if you use [discontinuity] and change the L input to "analytic"
2. The t parameter on polylines is a bit strange. The curve's domain is divided in equal parts between control points. That's why you get equal intervals from 0 to 1 no matter where the points are located. This is actually normal behavior but I think it doesn't give you the result you wanted.
If you want an l/L ratio you will have to do this manually:
edit:
just saw Joe's definition which does the same as mine but much faster... so only thing to keep from my post is that (t) is not l/L.
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