You are on page 1of 34

Chapter 9

SOLIDS

9.1 Introduction
• Solid models are known to be complete,
valid, and unambiguous representation
of objects.
• A valid object is one that does not have
dangling edges or faces.
• An unambiguous solid has one and only
one interpretation.
• Automation support.

1
Isolated Boundaries of a Solid
(Figure 9.8, p.354)

A Typical Solid
• CAD system offer two approached to creating
solid models: primitives and features, (sketching).

2
9.2 Geometry and Topology

• A solid model of an object consists of both the


topological (拓樸)and geometrical(幾何) data of the
object.
• Geometry (sometimes called metric information) is
the actual dimensions that define the entities of the
object.
• Topology (sometimes called combinatorial structure
組合結構) is the connectivity and associativity of the
object entities.

Difference Between Geometry and Topology

3
Nonuniqueness of Solid Models
The Primitive Approach
• While solid
models are
complete and
unambiguous,
they are not
unique.
• A object may
be constructed
in various
ways.

Nonuniqueness of Solid Models


The Feature Approach

4
9.3 Solid Entities

1. Block
2. Cylinder
3. Cone
4. Sphere
5 Wedge
6 Torus

Boolean Operation

5
9.4 Solid Representation
• A solid model is
defined
mathematically as a
point set in 3D
Euclidean space (E3).
• Closure of solid

kS = iS ∪ bS

Mathematical Properties of
a Solid Model
• Rigidity
• Homogeneous three-dimensional-Solid
boundaries must be in contact with the
interior. No isolated or gangling
boundaries.
• Finiteness and finite describability
• Closure under rigid motion and regularized
Boolean operation.
• Boundary determinism

6
Isolated Boundaries of a Solid
(Figure 9.8, p.354)

9.5 Fundamentals of Solid Modeling


• Set theory
• Reqular set (r-set) – A regular set is defined as a
set which is geometrically closed. A set S is
regular if and only if: S=kiS
• Reqularized set operation

P ∪* Q = ki ( P ∪ Q )
P ∩* Q = ki ( P ∩ Q )
P −* Q = ki ( P − Q )
c* P = ki ( cP )

7
Set Reqularity

Regular Set Operator


( Nonregular Sets)

8
Regular Set Operator
(Regular Sets)

Example 9-5

9
10
9.5.3 Set Membership Classification
M [ X , S ] = ( X in S , X on S , X out S )

Ray-Casting Method
odd/even rule

11
Line/Polygon Classification for B-rep

• Utilizing a line/edge intersection routine, find the


boundary crossing P1 and P2.
• Sort the boundary crossings according to any
agreed direction for L.
• Classify L with respect to R.

Line/Polygon Classification for CSG rep

12
Solid Model Representation (P.370)
• Half Space
• Boundary Representation (B-rep)
• Constructive Solid Geometry (CSG)
• Sweep
• Voxel Representation
• Oct-tree Representation

Hybrid Representation

CSG model

modeler
Boundary evaluation

B-Rep model

Graphics
routines

Display

13
Voxel Representation

Example of a Voxel Represented


Model

14
Decomposition Model Structure

• A solid model can be described


approximately as an aggregate of simple
solid such as cubes. A solid model
described in this way is called
decomposition model.
• Drawbacks:
Memory space
Approximation method.

Oct-tree Representation

15
9.6 Half Space

16
9.7 Boundary Representation (B-rep)
• Boundary representation is one of the most
popular and widely used schemes to create solid
models.
• Faces
• Edges
• Vertices
• Loops
• Handles

17
Effect of Topology and Geometry
on Boundary Model

Types of Polyhedral Objects

18
Definition of a Face

Traversal of Face’s Loops

19
Euler-Poincare Equation
Closed Polyhedral Object:
F − E + V − L = 2( B − G )
S1 → F = 3, E = 3, V = 2, L = 0, B = 1, G = 0
V : Vertices, E : Edges, V : Vertices,
3 − 3 + 2 − 0 = 2(1 − 0)
L : Loops, B : Bodies, G : Genus (Through Hole)
S 2 → F = 10, E = 18, V = 12, L = 2, B = 1, G = 0
10 -18 + 12 - 2 = 2(1- 0)
Open Polydedral and 2D polygonal Object:
F − E +V − L = B − G

Euler Operator

20
Euler Operators

B-rep of a Cylinder and a Sphere

21
22
B-rep Data Structure of a Solid

Winged-edge Data Structure

23
Winged-edge Data Structure

9.8 Constructive Solid Geometry


• CSG tree

24
CSG Tree
• A CSG tree is defined as an inverted, ordered
binary tree whose leaf nodes are primitives (or
other solid) and interior nodes are regularized
set operations.
• Binary Tree
• If a solid has n primitives, then there are (n-1)
Boolean operations for a total (2n-1) nodes in its
CSG tree.
• Balanced tree: (nL-nR) is as minimal as possible,
where (nL+nR=2n-2)
• A perfect tree is nL-nR=0,nL=nR=n-1

CSG Tree of a Solid

25
Traverse of CSG Tree
Postfix travel
• Traverse the left subtree in postorder
• Traverse the right subtree in postorder, and
• Visit the root

26
Tree traversal
In this binary tree,
V = visit, L = left, R = right
Preorder (VLR) traversal yields: A, H, G, I, F, E, B, C, D
Postorder (LRV) traversal yields: G, F, E, I, H, D, C, B, A
In-order (LVR) traversal yields: G, H, F, I, E, A, B, D, C
Level-order traversal yields: A, H, B, G, I, C, F, E, D

VLR: preorder, + a b
LRV: postorder, a b +
LVR: inorder, a + b

V
+
data
L R
a b left_child right_child

27
Arithmetic Expression using Binary Tree
ƒ Arithmetic Expression: A / B * C * D + E
Inorder traversal (infix expression)
A/B*C*D+E +

Preorder traversal (prefix expression)


* E
+**/ABCDE
Postorder traversal (postfix expression) D
*
AB/C*D*E+
Level order traversal / C
+*E*D/CAB
A B

Pre-order (Prefix) Traversal


visit(node)
print node.value
if node.left != null then visit(node.left)
if node.right != null then visit(node.right)
print node.value

Preorder (VLR) traversal yields: A, H, G, I, F, E, B, C, D

28
Post-order (Postfix) Traversal
visit(node)
if node.left != null then visit(node.left)
if node.right != null then visit(node.right)
print node.value

Postorder (LRV) traversal yields: G, F, E, I, H, D, C, B, A

In-order (Infix) traversal


visit(node)
if node.left != null then visit(node.left)
print node.value
if node.right != null then visit(node.right)

In-order (LVR) traversal yields: G, H, F, I, E, A, B, D, C

29
level order traversal
visitlevel(S)
T = Set()
for each node in S
print node.Value
if (node->left != null)
T.insert(node->left)
if (node->right != null)
T.insert(node->right)
if (T.empty() != true)
visitlevel(T)

visit(root)
S = Set()
S.insert(root)
visitlevel(S)

Level-order traversal yields: A, H, B, G, I, C, F, E, D

Representation of Trees
ƒ List Representation: 括號法
• ( A ( B ( E ( K, L ), F ), C ( G ), D ( H ( M ), I, J ) ) )
• The root comes first, followed by a list of sub-trees degree of a node

B C D

E F G H I J

K L M

30
Representation of Trees
(A(B(H)(J))(C(D)E(G))(F))

A
A
E B C
H J D G F
B C H J D E F

CSG Tree Structure

31
Basic Elements

32
9.8.5 The Neighborhood Concept

33
9.9 Sweep

34

You might also like