Here is the typical problem that I find makes 3D CSG difficult :-
say I have a 3D box which is adjacent to a flat surface.
each of 4 corners may be supposed to be touching the surface.
however if the surface is at an angle then computing the distance from each corner to the surface involves a degree of rounding error.
the worst case is when the box is as close to the surface as possible, each corner may appear to be on one side of the surface or the other, but not actually exactly on it.
determining the intersection of the box with the surface requires the comparison of each side of the box to the surface.
what makes matters worse is that the same corner may appear on either side of the surface depending on which side of the box is used to calculate the position.
rather than try and explain any further a few pretty images
from wiki may at least give an idea as to what the heck CSG even is ..
Union
Difference
Intersection
