algorithmic modeling for Rhino
Hi friends,
I have a list of points. I am trying to have contours, so as you see in the attached image, point#9 has to connect #0, and this has to continue each row. Since I don't have sublists, they connect like a spiral line rather than contours. That is, as you see in the panel, I have just one line rather than having a list of closed curves. If I split the imported list to sub-lists of 10 members, I can get the conturs, but the problem is that the main list that I have has different number of points on each contour line. For example, line 0 has 10 points, line 1 has 15 points, line 2 has 13 points. How can I get contour lines out of a list which is not following any rules to be divided? I appreciate your time and help.
Tags:
you ARE the Lord!! It's amazing! Peter, Do you know what is the problem with the last layer of points? as shown in the image they are like Zigzag!
Yes that's exactly why I've captured that "layer".
In order to sort points for doing some polyline the classic approach (used "internally" in the C#) is:
1. Find a plane that "best" fits (available as native component).
2. Find a sphere that "best" fits (ditto).
3. Intersect and get a curve.
4. Sort the points "along" that curve.
But this works in some situations where the topology is "suitable" (or "cooperative" so to speak)... whilst in some others doesn't (try for instance points distributed along a banana like skin). That said. there's other ways to attempt do that (one of them is a concave [not convex] hull).
For Plan B (out of many) see attached.
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