The bodies involved in Boolean operations are often referred to as a
blank body and a
tool body. The blank body is the body on which to perform the operation and the tool body is the body with which to perform the operation. This is analogous to a "tool" machining portions of a "blank." There are three basic Boolean operations (illustrated in Figure 1-1):
|
|
Unite
|
Creates a body that contains all points that are in either of the two input bodies. This joins the tool body and the blank body.
|
|
Intersect
|
Creates a body that contains all points that are common to both the two input bodies. The result is all points that are in both the tool body and the blank body.
|
|
Subtract
|
Creates a body that contains all points that are in the blank body but not in the tool body. This is the difference of the points in the tool body from the points in the blank body.
|
|
|
|
Figure 1-1. Boolean Operations
|
|
Each Boolean operation (unite, intersect, subtract) is separated into four stages:
|
|
|
1.
|
Intersect all of the faces and edges of both bodies and build an intersection graph, which is a data structure defining the intersection of the bodies. This is described in the section
Intersection Graph.
|
|
|
2.
|
Imprint the intersection graph onto both bodies, often splitting faces in the process.
|
|
|
3.
|
Determine what data (faces, shells, edges, etc.) from both bodies to keep and discard, then discard the unnecessary data.
|
|
|
4.
|
Join (or un-join) the bodies along the intersection edges, and correctly organize any new shells and lumps.
|
|
The
Boolean Component also provides a
chop operation, which chops the blank body with the tool body. It returns the body formed by simultaneously subtracting the tool from the blank, and the body formed by intersecting the tool with the blank. Although the same results can be obtained by performing the intersection and subtraction separately, the chop is more efficient. The "leftovers" from the chop can be saved or discarded. Figure 1-2 illustrates the chop operation using the Scheme command
bool:chop.
|
|
|
|
Figure 1-2. Chop
|