Magic folding cube - proof of concept

Last year, my wife made a magic folding cube as a Xmas gift of my daughter.

Magic folding cube

I made this 3DP version first to prove it may work after printing. It has a obvious gap between cubes so you may see how it works.

Magic folding cube

A version with a small gap is Magic folding cube.

Magic folding cube.