When I found "trisection of a cube" by Erikjuh, I clearly wanted to design mine under openscad.
After few iterations here is the result as a customizable "twisted puzzles factory".
Just download the code and open it, you'll see how powerfull openscad is. You can, if you prefer, use the customizer to build your cube. (see instructions)
I found theoritical help