I had a different idea: for each face, check that all the other vertices lie on one side of this face.
You can verify this by calculating the normal vector for each face (from the cross product), and then calculating the point product for each vector from one vertex (face) to all the others. Signs must be the same.
Algorithms should work, but they may differ during the calculation.
source share