We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
Zeeneseemgcanoam | Wceemae Maseng | 8S ‘Sten
{ cuessiassand lashes besiansiedbassiesbesdlesiessaasuanieay)
Chapter 9 Solids 381
9.7.3 Curved and Faceted B-rep Models
‘We now tum from polyhedral objects to curved objects such as cylinders and spheres. The
same rules and guidelines for houndary modeling discussed thus far apply. The major difference
between the two types of abjects results if closed curved edges or faces exis
‘Consider, for example, the closed cylinder and sphere shown in Figure 9.25. A closed
cylindrical face has one edge and two vertices and a spherical face has one vertex and no edges.
‘The boundary model of a closed cylinder has three faces (lop, bottom, and cylindrical face
iselD), two vertices, and one edge connecting the two vertices. The other “edges” are for
visualization purposes. They are called limbs, virtual edges. or silhouette edges, The boundary
‘model ofa sphere consists of ane face, ane vertex, and no edges.
Figure 9.25. B-ep of a cylinder and a sphere.
If the curved objects are represented by’ storing the equations of curves and surfaces of
edges and faces, respectively, the resulting boundary scheme is known as an exact Berep
scheme. Another alternative isthe approximate or faceted B-rep (sometimes called tesselation
rep In this scheme, any curved face is divided into planar facets.
Figure 9.26 shows a faceted B-rep of u eylinder and sphere. The faceted cylinder is
generated by rotating a line inerementally about the cylinder axis the desired total number of
facets, A faceted sphere is formed in a similar way by rating m connected-line segments about
the sphere axis for a total of sides. Faceted objects, although continuous, are no longer as
smooth as the original curved objects they represent Increasing the numberof facets results in
more accurate representation,
A data structure fora boundary model stors both topology and geometry. The stricture
shown in Figure 9.27 is based on Bq, (9.58) A relational database model is very effective For
implementing such a data structure. Liss for bodies, faces, loops, edges, snd vertices are gener-
sated and stored in tables, Each line in Figure 9.27 represents a pointer inthe database,Zeeneseemgcanoam | Wceemae Maseng | 8S ‘Sten
Ee ae eee EDD
382 Chapter 9 Solids
sa
erence
ose
Figure 9.26 Faceted B-rep of a cylinder and a spher
9.7.4 Building Operations
Equation (9.58) forms the basis upon which to develop building operations ta create B-rep
‘models of complex objects. Fuler operators, which are based on this equation, are not used in
practice. CAD systems use B-rep only as an internal representation scheme for solid models.
CAD designers create models using either the primitive or the features approach, The CAD
software converts users’ input to B-rep forma before storing it in the model database
9.7.5 Remarks
‘The B-rep scheme is popular and has a strong history in computer graphics beeause it i
closely related to traditional drafting. The boundary model requires a large amount of storage
because it stores the explicit definition of the model houndaries, ‘The mode! is defined! by isZeeneseemgcanoam | Wceemae Maseng | 8S ‘Sten
{ cuessiassand lashes besiansiedbassiesbesdlesiessaasuanieay)
Chapter 9 Solids 383
faces, edges, vertices, loops, and genus, which tend to grow Tarly fast for complex models.
Paceted B-rep is not suitable for many applications such as tool path generation,
IN
a)
de 1 ndhing sae ego
Figure 9.27 Data structure for B-rep models.
Constructive Solid Geometry (CSG)
PACSG model based onthe topological nation that a physical abject can be divided into
2 eof primitives basic clemens or shapes) that canbe combined in a eran order following a
Set of res (Boolean epcratons to form the objet. Primitives themselves are considered valid
(CSG mols. Eich primitive is bounded by «set of faces, Faces are hound by ees, and
edges are bounded by vere.
“The database of « CSG model, similar to Berep, stores its topology’ and geometry
Topology is crit vi the rat (Boolean) operons tht combine primitives, Therefore the
valkty of the resulting model s reduced to the validity checks of the used primitives. These
checks are usually simple and are in the form of greer than zero. For example, if the
dimensions ofa block ate grester than zero and the radius and length of a eylinder ar also
reater than zero, combining them produces valid solid. The geometry stored in the database
of CSG mode includes the geometry ofits primitives and rsd motion and transformation
9.8.1 CSG Trees
Data structures of the CSG representation are based on the concept of graphs and tees.
‘That means that the data of the solid model is stored in its database in a tree; we call it the CSGZeeneseemgcanoam | Wceemae Maseng | 8S ‘Sten
Ee ae eee EDD
384 Chapter 9 Solids
tree. A graph is defined 2s a set of nodes connected by a set of rancies (lines). A graph may
have losed loops in its hat i, some branches that connect nodes Form closed regions.
A CSG tree is defined as an inverted, ordered binary tree whove leat nodes are primitives
(or other solids) and interior nodes are regularized set operations. dnveried means tat the tee is
upside down: its root is on the top. Ordered! means that each tee node has a let branch and a
right branch. Binary means that each tee node has only two branches going into it, Unlike
raphs, tees do not have closed loops. We focus on tees because they are widely used in CAD
systems,
Figure 9.28 slams yenctic C50 wee with eight primitives (Py w Ps) and seven Boule
operators (OP; 1o OP}). The CSG tree is shown with its full details, including arrows. In
practice, the arrows are usually noe shown, the leaf nodes are just shown as primitives” names
‘without circles surrounding them, and a line extends fom the tee Oot up to indicate the result
ofthe final solid, Other styles of showing a CSG tree may replace primitive names by their
sketches as well as showing each intermediate subsolid that results from an operator in the
stream of the tee branches.
QO ®& CO ®&
Figure 9.28 CSG tree of a solid.
‘The total number of nodes in a CSG tee of a given sold is directly related to the number
of primitives the solid is decomposed to. The number of primitives decides automatically the
number of Boolean operations required to construct the solid IF a solid bas pri
there are (n 1) Boolean operations for a total of @n-~ 1) nodes in its CSG tree. The balanced
distribution of these nodes in the tree isu desired characteristic. A halanced tree is defined as a
tree whose left and right subtrees have almost an equal number of nodes, that is, the absolute
value ofthe difference (nj ~ng) is us minimal as possible where
ities, then
ny tmy = 20-2 0.0)
‘The root node isnot included in Eq. (9.60). n, and ng are the numberof nodes ofthe left and
right subtrees, respectivelyZeeneseemgcanoam | Wceemae Maseng | 8S ‘Sten
{ cuessiassand lashes besiansiedbassiesbesdlesiessaasuanieay)
Chapter 9 Solids 385
[A perfect tree is one whosen, ng is equal to zero. A perfect te results only if the
‘numberof primitives is even, The following equation applies toa perfect tre:
y= ng = nt eon)
Each sublree has 1/2 leaf nodes (primitives) and (w ~2V/2 interior nodes (Boolean operations).
Figure 9.28 shows a perfect tre.
‘The creation of a balanced, unbalanced, or perfect CSG mee depends solely om the users
tnd how they decompose a soli into its primitives. The genera rule to create balanced tees is
to star to build the model from an almost central position and branch out in cwo opposite
directions or vice versa: that is. start from two opposite postions and meet in a central one.
Application algorithms must traverse a CSG tre, that is, they pass through the ree and
visit each of is nodes. The order in which the nodes are visited ina traversal is clearly from the
first node tothe last one. However, there is no such natural linear onder forthe nodes of a tee.
‘Thus, different oerings ure possible for different cases
‘There exist three main traversal methods: preotder, in order, and postorder, Sometimes,
these methods are referred to as prefix, infix, and postfix traversal, The methods ae all defined
recursively so that traversing a binary tre involves visiting the root andl traversing its left and
right subirees. The only difference among the methods isthe order in which these three oper-
tions are performed.
‘The postfix traversal is the most efficient to use. To traverse a CSG tree in postoder:
Traverse the left suberee in postorder
2.Traverse the right subtree in postorder and
S.Visit the root
‘Many CAD systems create and display a CSG tree (also known as manager tee oF tree
manager) for each model that a CAD designer creates. The tee saves the history of the model
that is, the steps of its creation, Some systems, such as SolidWorks and ProfE, display the tree
‘when the designer opens apart file. Other systems, sueh as CATIA, require the user to open the
tree window via command,
neither cuse, the designer can use the tee in various ways
a. Trace the ereation steps. The designer ean walk up and down the tee by clicking
any of its leaves or subsolids, Bach time the designer clicks a lea ora subsoli, the
CAD system highlights the comresponding geomeiry in its display window
>. Bait a feature or a primitive. When the designer selects a feature from the tree
follovred by an editing operation, the CAD system activates the Feature sketch plane
snd parameters, allowing the designer to change/modify any values and re-create the
feature
«. Prume the tree. The designer can move an entire tree branch toa new location up oF
ddown the tree, or can delete the entre branch, However, the designer should beZeenaseengcanjoam | WGvomaie Maseng | 9 orhetc
Ee ae eee EDD
386 Chapter 9 Solids
careful because moving or deleting branches may result in creating invalid solids
Which cause the CAD system to crash, Pruning the tree by reordering its nodes is
sometimes useful because changing the order of solid operations can overcome the
failures. This is the case when the solid model is intricate and has very large and
very small dimensions
For example, illeting an edge between two complex faces may fail if we doin one
order, butt may work in another order. Jn such a case, we simply swap the leaves of
the (wo faces, and regenerate the solid, hoping that the flleting process sueceed.
siraica how to use COG trees that CAD aysicms provide
‘Skstch » CSG tree,
Sketch the CSG te fr each ofthe 999 sods shown blow,
‘The 0 C86 Hes of 5nd tes eo
Example 9.9 discussion:
‘This example illustrates hove we can ereate perfectly balanced CSG trees Ifthe solid are
symmetric, as they are in this example, we can create a perfect CSG tre ifthe made! is divided