GMFC
4/12/99
1
GEOMETRIC MODELING: A First Course
Copyright © 19951999 by Aristides A. G.
Requicha
Permission is hereby granted to copy this document for individual student use at USC,
provided that this notice is included in each copy.
6.5 Boolean Operations
This section discusses several problems related to computing BReps of solids that are
combined by regularized set operations, usually called simply
Boolean operations
.
6.5.1 Boundary Evaluation and Merging
Regularized set operations have precise mathematical definitions, and therefore the
evaluation of
S
=
A
⊗
B
is a welldefined mathematical problem. Here
A
,
B
, and hence
S
are
r
sets, and
⊗
is a regularized set operator (union, difference or intersection). We saw
in Section 6.1 that a mathematical problem may have many computational versions,
depending on the representations selected for the input and output. If the input and output
representations are CSG trees, the problem is trivial: the output CSG tree consists simply
of the input subtrees joined by a new operator node. As a more interesting example, there
are efficient algorithms for computing Boolean operations when the input and output are
represented by octrees. In this text, we focus on Boolean opeartion calculations that involve
BReps, because these are the most common and important versions of the general problem.
The algorithms to be discussed are all based on a fundamental fact: boundaries may be
destroyed, but they cannot be created by Boolean operations. In precise terms, this can be
expressed as follows.
Boundary Inclusion Relationship:
∂
(
A
⊗
B
)
⊆ ∂
A
∪ ∂
B
.
This is easy to prove rigorously. It implies that the BRep of a solid
S
that results from one
or more Boolean operations can be computed by first generating a superset of its boundary
as the union of the boundaries of the sets being combined, and then discarding those
portions of the superset that are not
on
S
. This is an instance of a commonlyused
algorithmic paradigm called
generateandtest
.. In pseudocode the algorithm is as follows.
Algorithm 6.5.1.1
Generate a sufficient set of tentative faces F
for each
F
do
{
FwrtS = ClassFaceSol(F,S);
AddToBRep(Fons); }
Generation of tentative faces is guided by the boundary inclusion relationship discussed
above. Testing is done by set membership classification. Not shown in the pseudocode
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentGMFC
4/12/99
2
above (and in the algorithms to be discussed in the next subsections) is a cleanup phase, in
which adjacent faces lying on the same surface are merged, and links required by the
specific BRep scheme being used are established. (It is possible to clean up as you go, by
using a sophisticated
AddToBRep
routine. This makes the code harder to understand, and
will be ignored in this text.)
A sufficient set of faces is any set that includes
∂
S
. The boundary inclusion relationship
immediately suggests that we use the faces of
A
and the faces of
B
to compute the BRep of
S
=
A
⊗
B
. If we do that, we have a boundary merging problem, which can be defined as
follows.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '09
 REQUICHA
 Polyhedron, Intersection, Faces, boundary inclusion relationship

Click to edit the document details