The IRIT solid modeling system supports Boolean operations between polyhedra objects. Freeform objects will be automaticaly converted to a polygonal representation when used in Boolean operations. The +, *, and - are overloaded to denote Boolean union, intersection and subtraction when operating on geometric entities. - can also be used as an unary operator to reverse the object orientation inside out.
Example:
resolution = 20;
B = box(vector(-1, -1, -0.25), 2, 1.2, 0.5);
C = con2(vector(0, 0, -1.5), vector(0, 0, 3), 0.7, 0.3);
D = convex(B - C);
E = convex(C - B);
F = convex(B + C);
G = convex(B * C);
tr = rotx( -90 ) * roty( 40 ) * rotx( -30 );
All = list( D * tr * trans( vector( 0.6, 0.5, 0.0 ) ),
E * tr * trans( vector( 3.0, 0.0, 0.0 ) ),
F * tr * trans( vector( -2.0, 0.0, 0.0 ) ),
G * tr * trans( vector( 0.7, -1.0, 0.0 ) ) )
* scale( vector( 0.25, 0.25, 0.25 ) )
* trans( vector( -0.1, -0.3, 0.0 ) );
view_mat = rotx( 0 );
view( list( view_mat, All ), on );
save( "booleans", list( view_mat, All ) );
A complete example to compute the union, intersection and both differences of a box and a truncated cone.
There are several flags to control the Boolean operations. See IRITSTATE command for the "InterCrv", "Coplanar", and "PolySort" states.