there are several openscad scripts that will do just that.
This is not just for creating puzzles: http://www.3ders.org/articles/201301...-printing.html
Try that.