I think of this as Constructive-Solid-Geometry (CSG). Hopefully you can find some help here.
http://www.alsprogrammingresource.com/csg.html
Well, I had a bunch of links for you, but I can only post one. Seems like a site this well monitored wouldn't need this restriction, but oh well.http://createuniverses.blogspot.com/2009/09/qtcsg-constructive-solid-geometry.html
Searchhttp://www.nigels.com/research/
Also search google for Constructive-Solid-Geometry Solid Geometry as a start.
HTH