40
1 CMPUT 498 Solid Modeling Lecturer: Sherif Ghali Department of Computing Science University of Alberta

Solid modeling in CADCAM

  • Upload
    mit

  • View
    123

  • Download
    10

Embed Size (px)

DESCRIPTION

solid-modeling

Citation preview

Page 1: Solid modeling in CADCAM

1

CMPUT 498Solid Modeling

Lecturer: Sherif Ghali Department of Computing Science

University of Alberta

Page 2: Solid modeling in CADCAM

2

Representations

• Constructive Solid Geometry (CSG)– interior as well as surfaces are defined– special rendering algorithms– solid is always valid

• Boundary representation (B-rep)– (oriented) surfaces only are defined– raster scan algorithms suffice for rendering– solid validity should be verified

• A modeler could use one or both

Page 3: Solid modeling in CADCAM

3

Sweeping/extrusion

Page 4: Solid modeling in CADCAM

4

Modeling operations

Page 5: Solid modeling in CADCAM

6

CSG primitives

• examples are: parallelepiped, sphere, cylinder, cone, torus, triangular prism

• defined in a local coordinate system require a transformation to the world coordinate system

Page 6: Solid modeling in CADCAM

7

Regularized boolean operations• examples in 2D• set-theoretic boolean operations vs. regularized boolean operations• a point p is an interior point in a solid if a sufficiently small ball

centered at p is wholly inside the solid• set-theoretic boolean op’s followed by closure of interior result in a

regularized boolean op

Page 7: Solid modeling in CADCAM

8

CSG Tree

U

Page 8: Solid modeling in CADCAM

9

CSG treeparameters vs. structure

• The shape of the object can vary depending on the parameters and not only on the structure of the tree

Page 9: Solid modeling in CADCAM

10

Nodes in a CSG tree

• Leaf nodes:– instantiated solid primitives

• Interior nodes:– transformation nodes– regularized boolean operations nodes

• Material information stored outside the tree (possibly also at root node)

Page 10: Solid modeling in CADCAM

11

Point/solid classification

• Determine whether a given point is inside, on the surface, or outside a CSG solid

• Method:– Propagate query down the tree– determine answer at leaves– propagate answer up the tree

• Practice in lower dimensions:– 1D: primitive is an interval– 2D: primitive is a polygon

Page 11: Solid modeling in CADCAM

12

Propagation

• Downward propagation:– node is a boolean operation

• pass on to child nodes– node is a transformation node

• apply the inverse of the transformation– node is a solid (leaf node)

• classify point w.r.t solid

Page 12: Solid modeling in CADCAM

13

Propagation

• Upward propagation:– node is a boolean operation

– node is a transformation node• pass to parent

Page 13: Solid modeling in CADCAM

14

Neighborhood

• The neighborhood of a point p w.r.t. a solid S is the intersection with S of an open ball of infinitesimal radius centered at p

Page 14: Solid modeling in CADCAM

15

Neighborhood at faces, edges, and vertices

Page 15: Solid modeling in CADCAM

16

Refined upward propagation

• Maintain neighborhood information– face: plane equation– edge: wedges: pairs of plane equations– vertices: sets of edges

Page 16: Solid modeling in CADCAM

17

Edge neighborhood

• Merging edge neighborhood can produce:– two wedges– a single wedge– a face

Page 17: Solid modeling in CADCAM

18

Vertex neighborhood

• Merging vertex neighborhood can produce:– a vertex– an edge– a face

Page 18: Solid modeling in CADCAM

19

Face neighborhood

• Merging face neighborhoods produces an edge, unless the two faces are coplanar, resulting in a full ball, a face, or an empty ball

Page 19: Solid modeling in CADCAM

20

CSG Rendering

• Ray tracing:– illumination model relying on recursion to determine

reflection, refraction, and shadows, and using ray casting to compute visibility

• Ray casting:– determining the visible surface given a ray (a ray is a

half line)• Phong shading:

– determining rendering colour using material properties, the location of the viewer, light sources, and the surface normal vector

Page 20: Solid modeling in CADCAM

21

CSG Ray Casting

Page 21: Solid modeling in CADCAM

22

CSG Ray Casting

Page 22: Solid modeling in CADCAM

24

Redundancy

Page 23: Solid modeling in CADCAM

26

Boundary representations

• B-reps are described by:– Topological information:

• vertex, edge, and face adjacency– Geometric information:

• embedding in space: location of vertices, edges, faces, and normal vectors

Page 24: Solid modeling in CADCAM

27

Boundary representations• We study:

– closed, oriented manifolds embedded in 3-space• A manifold surface:

– each point is homeomorphic to a disc• A manifold surface is oriented if:

– any path on the manifold maintains the orientation of the normal

• An oriented manifold surface is closed if:– it partitions 3-space into points inside, on, and outside the

surface• A closed, oriented manifold is embedded in 3-space

if:– Geometric (and not just topological) information is known

Page 25: Solid modeling in CADCAM

28

Boundary representations• Non-manifold

surfaces

• Non-oriented Manifolds

• Non-closed oriented manifolds Moebius strip

(unbounded) cone,(unbounded) cylinder,(unbounded) paraboloid,

Klein bottle

paraboloid hyperbolic paraboloid

Page 26: Solid modeling in CADCAM

29

Euler- Poincaré equation

• V – E + F – 2 = 0– no holes or interior voids in one solid

• V – E + F – 2(1 – G) = 0– any number of handles

• V – E + F – (L – F) – 2(S – G) = 0– any number of loops and shells

Page 27: Solid modeling in CADCAM

30

Euler-Poincaré equation• V – E + F – 2 = 0• V – E + F – 2(1 – G) = 0• V – E + F – (L – F) – 2(S – G) = 0

• V: # of vertices• E: # of edges• F: # of faces• G: genus• L: # of loops (a.k.a. ring)• S: # of shells

Page 28: Solid modeling in CADCAM

31

Leonhard Euler (1707 – 1783)Henri Poincaré (1854 – 1912)

Page 29: Solid modeling in CADCAM

32

Genus

• Genus zero

• Genus one

• Genus two

Page 30: Solid modeling in CADCAM

33

Genus two solids

Page 31: Solid modeling in CADCAM

35

(extended) Euler- Poincaré example

•V – E + F – (L – F) – 2(S – G) = 0• V: 24

• E: 36

• F: 16

• G: 1

• L: 18

• S: 2

• 24 – 36 + 16 – (2) – 2(2 – 1) = 0

Page 32: Solid modeling in CADCAM

36

Euler operators

• mvfs

• mev

Page 33: Solid modeling in CADCAM

37

Euler operators

• mef

• kemr

Page 34: Solid modeling in CADCAM

38

Euler operators

Page 35: Solid modeling in CADCAM

39

Euler operators

Page 36: Solid modeling in CADCAM

40

Euler operatorskfmrh

Page 37: Solid modeling in CADCAM

41

Page 38: Solid modeling in CADCAM

42

Euler operators

Page 39: Solid modeling in CADCAM

43

Convex combinations and Simplicial complexes

for a set of linearly independent points:

for three points:

for two points:

Page 40: Solid modeling in CADCAM

62

Reference