Polygon from points


Screenshot 2024-04-20 164212
Screenshot 2024-04-20 164239
The points are the end points of lines which are in the form of hyperboloid. I want to connect these points to create a polygon. When I tried to connect using poly line , i don’t get a polygon. Please help me with this.

Hi @ICHAN ,

Please upload your GH file.

Given that this is likely a an issue with the points being sorted incorrectly I would do the following:

  1. Connect your points into a Fit Circle component
  2. Connect your points into the Sort Along Crv component and…
  3. connect the Circle from the first step into that node as well
  4. Plug the output of the sort along Crv component into a Polyline component

You should now have the result you are looking for.

1 Like

try this
there’s two methods. one uses delaunay triangulation, the other orders the points by angle. both methods are really only viable when the points could define a convex polygon.
convex_polyline_from_disordered_points.gh (16.5 KB)

1 Like

Hi @ICHAN ,

Here’s an easy way (2 nodes):

Model Space (gray lines represent unsorted points order, blue polyline is the shape you seek):

Graph Space:

You can also use Convex Hull or Fit Line in place of Fit Circle, depending on what shapes and sorting methods you want:

I hope that helps

20240420_Hyperboloid_Sorting_Vertices_Response_01a.gh (6.4 KB)

1 Like


it is working now after doing like this. Thanks for the reply. Will definitely try your ways.

1 Like