Generate a mesh from unsorted points (eight points)

49 Views Asked by At

I'm trying to generate a mesh from eight points. The challenge is that I don't know the order/label of the points, and I want it to work regardless of variations in the shape (see example below). Example boxes The example image shows what kind of mesh I want to create, but the only thing I have to go on is each point's position. It's easy to do this manually, but it really seems impossible to do with a script/function.

Any tips/ideas on how to solve this would be greatly appreciated! :)

Not that it matters as for the solution of this problem, but I'm using python in Maya.