Continuing the discussion from How to create a brick type (or square) mesh from point cloud?:

Imagine four groups of points (see one of them below) on top of each other:

. . . . .

. . . . .

. . . . .

. . . . .

The distances are not necessarily equal. I need the final mesh to look like the Rubik’s cube (i.e. a group of cube-like zones side by side).

I thought to first make a quadratic mesh out of each layer and then connect each two layers together. Please see the attached image.

The problem is that after generating the quadratic mesh, I don’t know how to connect them together so that the result is a closed mesh and looks like what I need.

Thank you so much