algorithmic modeling for Rhino
I have a seemingly simple question about organizing points in a Curve | Line intersection. I have some complex curves that are being intersected by lines X times, this will always result in an odd number of intersections and I should be able to call the events in order.
My question is: How do I sort these to draw new lines from pt(0) to pt(1) then from pt(2) to pt(3) until the end of the intersection array ( (X-1) to (X) ) for each of the sets of intersections? I'm very familiar with Rhinoscript and know how this would work in that interface but I'm struggling to find the functions in GHopper.
Thx All!
DH
Tags:
Try to build ConvexHull(Mesh tab) around intersection points and then sort your points with SortAlongCurve tool(Vector tab, curve to sort along - convex hull polyline) and create polyline from this points.....
Surely you mean even, not odd? The points returned by Line|Curve intersection are ordered along the curve, not the line. This seems like a stupid thing to do, I never noticed it before and I can't now remember whether there was a reason not to order them along the line.
At any rate, they have to be re-ordered. The easiest way to create line segments between points 1&2, 3&4, 5&6 etc. is to create polylines, explode them, then cull every other segment.
--
David Rutten
david@mcneel.com
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