Rhino python equivalent to Matlab 'boundary'


#1

Does anyone have any suggestions on how to produce a polyline boundary from a set of points, much like Matlab’s ‘boundary’ function? It’s important that the result is not ‘self-crossing’. I’ve tried ‘SortPointList’ with little success.
The result in Matlab can be seen in the attached image:


#2

There is a component in GH you can call:

import ghpythonlib.components as ghc
curve, _, _ = ghc.ConvexHull(points)

(Menno Deij - van Rijswijk) #3

Except that the convex hull is not what is in the picture, it is concave on the left.


#4

Yes, but Matlab’s boundary function is a convex hull with points added. So, I guess a convex hull is the closest starting point you can have out of the box…


#5

Thanks guys, I think this is the perfect starting point!