General Information

On of the crucial operation in any solid modeling environment is the ability to perform Boolean operations among different geometric objects. The interface of the library is defined in include/bool_lib.h. This library supports only Boolean operations of polygonal objects. The Boolean operations of OR, AND, SUBtract, NEGate, CUT, and MERGE are supported via the BoolOperType typedef:

BoolOperType Meaning
BOOL_OPER_OR Union of two geometrical objects
BOOL_OPER_AND Intersection of two geometrical objects
BOOL_OPER_SUB The difference of two geometrical objects
BOOL_OPER_NEG Unary Inside-out of one geometrical object
BOOL_OPER_CUT Boundary of one object outside the other
BOOL_OPER_MERGE Simple merge without any computation

The BoolOperType typedef is used in two dimensional Boolean operations invoked via Boolean2D. Three dimensional Boolean operations are invoked via BooleanXXX where XXX is one of OR, AND, SUB, NEG, CUT or MERGE, denoting the same as in the table above.

In addition several state functions are available to control the way the Boolean operations are conducted. Functions to enable the dump of (only) the intersection curves, to handle coplanar polygons, and to set the axis along which the sweep is performed are provided.

All globals in this library have a profix of Bool.