Sorting point question

good evening everybody,

I came across a problem today.

-I have x amount of points

-out of this pool of points I would like to extract just the points at the perimeter

-then connect those points with a closed polyline ,creating an outline.

It is easy with the example shown but becomes tedious if you have to deal with 50000 points.

I would appreciate if someone could help me with this problem.

Thank you!!!
sort (4.3 KB)
sort point.3dm (167.3 KB)

How do you define “perimeter”? If you imagine stretching a rubber band around the set of points you end up with a convex hull, which can be arrived at with a built-in component (Mesh->Triangulation):

Maybe this helps:

Here is one potential approach. But it is not automated. To be automated you need to create script capable of iterations and you also need to find and unknown value for each iteration. Maybe somebody has a better idea? (8.4 KB)

@Baris Interesting link :slight_smile: I had a bit of fun trying to implement alpha shapes (non-convex hull) using native GH components, it’s probably robust enough for the planar case: (13.6 KB)

Another test case:


Damn this is clever :slight_smile:

Yeah, it’s quite an elegant construction :slight_smile: - here’s the paper I referred to
(Although I’m not sure if the above corresponds 100% to a standard alpha shape algorithm…)

So many people use Voronoi and Delaunay stuff just for aesthetic purposes without realising there’s some really useful maths behind it :smile:


You gave me a very nice toy to play with this weekend :slight_smile: Thank you mate!

1 Like

How about the AlphaShape plug-in:

1 Like

Good morning Everybody,

just woke up and saw your posts.
thank you for your interest in this subject.

qythiums approach is elegant indeed.

qythium and everybody else

Thank you for your support !!!

Yeah, I saw that plugin in the forum posts Baris linked to above, but didn’t like the idea of linking to a solution which requires people to sign up on an officially-discontinued forum and wait a day or two to be accepted into the closed Milkbox group ( never understood the rationale for this ).

And especially so for a one-off compiled .gha plugin, which severely limits the portability of the solution where it looks like a simple C# scripting component would have sufficed.

True. And once accepted… where the hell is the download link anyways :smiley:

alphaShape.gha (22.5 KB)

1 Like

Yeah I know. It was just a joke :slight_smile: