Hello everyone
More refinement on the first idea of Lee:
calculate the Cartesian equation of each face and make it unitaire.
The face is oriented out according to the situation of the centroid.
Solving the point in each equation we have 6 value quickly. The value tells us if the point is in the skin (0), outside (+) or inside (-). Analyzing the 6 values very quickly know the situation of the point on the 6 faces forming the
hexahedron iregular!. the 6 faces can be any shape and be at any angle. It is only necessary to form a plane. It will be a step further handle warped faces
I send a Assistant coach and a simple base dwg to this process. The hexahedron has been outlined as a 3DPOLY (yellow) 8 vertices according to the scheme of the first post. Different red and green lines for training and 3 color point clouds according to 3 level .
The LSP includes the algorithm of the minimum sphere that goes by 8 points, used to eliminate points quickly when you have to check thousands.
Everything is clearly for the better (Alpha version?).
I hope you find it useful.
A greeting from Madrid.
PS.:Different routines and sub-functions are downloaded from the forum and those of the authors. I just use them.