[SOLVED] How to get intersection areas?

CSG

For example this Another CSG solution
Or this Solid geometry (not hollow) - #6 by justry

You could also write special purpose code for cubes, but CSG is for any geometry type.