Motivation: (a) Which operators are available helps us to plan how to complete the design of a part....

48
Motivation: (a) Which operators are available helps us to plan how to complete the design of a part. (b) Understand the mathematical basis, to help us to decide when to use it when not to use it, understand, if it fails, why decide how to avoid failures. Operators in CAD Systems

Transcript of Motivation: (a) Which operators are available helps us to plan how to complete the design of a part....

Motivation:

(a) Which operators are available helps us to plan

how to complete the design of a part.

(b) Understand the mathematical basis, to help us

to decide when to use it

when not to use it,

understand, if it fails, why

decide how to avoid failures.

Operators in CAD Systems

Use:

(a) Building any 3D model

(b) Viewing any 3D model

Types of affine transformations of interest

object transformations

coordinate transformations

1. Transformations

Mathematical Tool: matrices

Affine transformations

translations rotations

Shape/size of an entities isinvariant with respect to translation and rotation

=> We need only study translation, rotation of a point (vertex)

Vertex = Point, column vector: [ x, y, z]T =xyz

x = P in fixed frame oxyzx’ = P in frame o’x’y’z’(translated w.r.t oxyz by –t): r’ = x’

Translation

Object transformation Coordinate transformation

Move r = [x, y, z]T

by t = [tx, ty, tz]T :

r’ = r + t,

x

yz

o

Pt

rr’

tx

tz ty

t

x

yz

o

P

-txx’

y’z’

o’x’

x

yz

o

Pt

rr’

x

yz

o

Pt

rr’

tx

tz ty

t

tx

tz ty

t

x

yz

o

P

-txx’

y’z’

o’x’

x

yz

o x

yz

o

P

-txx’

y’z’

o’x’

Rotation

Rotations in the XY plane

Rotation of P by angle about the oz : matrix A: Rot(z,q)

x

y

o

Pr

r’

sinr

cosr

y

xr

rAy

xA

r

r

rr

rr

sin(r

cos(r

y

x

sin

cos

cossin

sincos

sincoscossin

sinsincoscos

)

)

'

'r'

x

y

o

Pr

r’

x

y

o

Pr

r’

sinr

cosr

y

xr

rAy

xA

r

r

rr

rr

sin(r

cos(r

y

x

sin

cos

cossin

sincos

sincoscossin

sinsincoscos

)

)

'

'r'

Object transformation Rot(z, ) == Coordinate transformation by Rot( z, - q )

Matrix formulas

r),(

100

0cossin

0sincos

'

'

'

zRot

z

y

x

z

y

x

r'

r),(

cos0sin

010

sin0cos

'

'

'

yRot

z

y

x

z

y

x

r'

r),(

cossin0

sincos0

001

'

'

'

xRot

z

y

x

z

y

x

r'

2.1. Scaling

Property: Uniform scaling does not change the topology of the

part

Use: to shrink / expand size of a part

Uniform scaling: Multiply each coordinate in BREP by the scaling factor

Operation: Map vertex, v( x, y, z) -> v’( sx, sy, sz)

Non-Uniform scaling scaling each coordinate, v( x, y, z) by different scaling factors, (sx, sy, sz)

2.2. Non-uniform scaling

Applications of Non-uniform scaling:(a) Mold design from part(b) Clothing and Footwear design, …

Transformed coordinates: v’(sxs, syy, szz).

Question:Does the topology of the part change ?

Composition of Transformations

Point in E3 as [x y z 1]T 4x4 matrices for transformations

Translation

11000

100

010

001

1

'

'

'

z

y

x

c

b

a

z

y

x

Scaling

11000

000

000

000

1

'

'

'

z

y

x

s

s

s

z

y

x

z

y

x

Rot( X, )

11000

0cossin0

0sincos0

0001

1

'

'

'

z

y

x

z

y

x

Rotation about an arbitrary axis

u =[u1 u2 u3] = unit vector along given axis

Rotation by angle about u

11000

0)1(cossin)cos1(sin)cos1(

0sin)cos1()1(cossin)cos1(

0sin)cos1(sin)cos1()1(cos

1

'

'

'

23

23132213

13222

22321

21332121

21

z

y

x

uuuuuuuu

uuuuuuuu

uuuuuuuu

z

y

x

r

r’

u

O

[x y z]T

[x’ y’ z’]T

Arbitrary rotation of Coordinate frame

r = [x y z 1]T a point in OXYZ

Oxyz = A new coordinate frame

What are the coordinates of the point in Oxyz?

(u1, u2, u3), (v1, v2, v3), (w1, w2, w3): DCs of u, v, w in OXYZ

OX

Y

Z

x

y

z

r

rx

ry

rz

r’z

r’y r’x

11000

0

0

0

1

333

222

111

'

'

'

z

y

x

z

y

x

r

r

r

wvu

wvu

wvu

r

r

r

OX

Y

Z

x

y

z

r

rx

ry

rz

r’z

r’y r’x

OX

Y

Z

x

y

z

r

rx

ry

rz

r’z

r’y r’x

11000

0

0

0

1

333

222

111

'

'

'

z

y

x

z

y

x

r

r

r

wvu

wvu

wvu

r

r

r

Concatenation of Transformations

Successive transformations:(i) Translate [-5 0 –5](ii) Rotate(Y, 45)(iii) Translate [5√2 0 15]

A

1000

152/102/1

0010

02/102/1

1000

5100

0010

5001

1000

02/102/1

0010

02/102/1

1000

15100

0010

25001

Summary

1. affine transformations: preserve collinearity

2. Affine transformations useful in CAD

3. Matrices are useful to compute transformations

4. Translations, Rotations, Scaling

5. 4x4 matrices can represent all three of these

6. A series of transformation resultant transformation multiply corresponding matrix in reverse order

Operators in CAD: Boolean operators

Boolean operations: U*, ∩*, -*

inputs: regular 2-manifold solid(s)outputs: regular 2-manifold solid(s)

Problem:

f2: One loop or two ?

+e1 -e1

+e1-e1

e1: Two co-edges ? Three ? Four ?

f1: One loop or two ?A

B

e1

f1

f2

(A -* B) is not a 2-manifold

f2: One loop or two ?f2: One loop or two ?

+e1 -e1+e1 -e1

+e1-e1 +e1-e1

e1: Two co-edges ? Three ? Four ?

f1: One loop or two ?f1: One loop or two ?A

B

e1

f1

f2

(A -* B) is not a 2-manifold

A

B

e1

f1

f2

(A -* B) is not a 2-manifold

Operators in CAD: Sweeping

linear and non-linear sweep

Use: solid shapes from 2D sketches

INPUTS:Profile (2D sketch, one or more loops)Sweep path (continuous, bounded curve)

OUTPUT:regular 2-manifold solid

Geometric Problem:all vertices, edges, faces of output easy to

generate (i) fix sketch in frame OXYZ(ii) move OXYZ along sweep-path

rotation determined by tangency, torsion

Operators in CAD: Sweeping..

sketch

(a) Linear sweep normal to sketch (b) Linear sweep oblique to sketch

sketch

(a) Linear sweep normal to sketch (b) Linear sweep oblique to sketch

A:= sweep outer loopB:= sweep inner loop(s)

Out := A -* B

Operators in CAD: Sweeping...

axis

circular sweep path(270°) (360°)

sketch

(c) Circular sweep

axis

circular sweep path(270°) (360°)

sketch

axis

circular sweep path(270°) (360°)

sketch

(c) Circular sweep

sketch

(d) Complex sweep path

sweep path

sketch

(d) Complex sweep path

sweep path

Other names: Extrude, Extrude-cut

Operators in CAD: Topological problems in Sweeping

(i) sweep path not smooth (C0, C1)(ii) self-intersection of the swept shape

Example 1. How to generate shape?

OR

Operators in CAD: Topological problems in Sweeping..

Example 2. How to generate shape?

Profile maintains orientationw.r.t. global frame

Profile maintains orientation w.r.t. path

FAILS!

Operators in CAD: Chamfer, Fillet

INPUTS:Surfaces S1 and S2 that share an edge, E

Special cases of Blending

Interfaces between (B, S1), an (B, S2) are continuous

OUTPUT:Blending surface, B, between S1 and S2; E will vanish

chamfer: C0 fillet, round: C1

Operators in CAD: Chamfer

Typical Uses:angled recess at the end of a holeangled edge to of shaft for ease of assembly

chamfer along linear edge

chamfer along arc

screw-surface mates with/without chamferschamfer along linear edge

chamfer along arc

screw-surface mates with/without chamfers

Operators in CAD: Chamfer computations

(a) For each edge, create chamfer cross-section: a ‘triangle’

(b) sweep the section of each edge along the corresponding edge

(c) fill ‘gaps’ at vertices (filler shapes)

(d) Boolean (Part -* solid shape) for each solid shape and filler shape

PROBLEM:

what if neighboring faces are curved?

Operators in CAD: Chamfer…

Geometry, Topological Problems

Green edge difficult to chamfer, sincechamfer geometry will destroy thetriangular dark face.

Concavely connected curved face (red edge)is not C1, difficult to ‘merge’ the two chamferscorresponding to the two green edges

Green edge difficult to chamfer, sincechamfer geometry will destroy thetriangular dark face.

Concavely connected curved face (red edge)is not C1, difficult to ‘merge’ the two chamferscorresponding to the two green edges

step (a): cross-sectionstep (c): filling “gaps”step (d) poor/changed topology

Operators in CAD: Fillet, Round

Same as Chamfer, except:Geometric section used in Circular arc

Fillet

Round

Fillet

Round

Operators in CAD: Blending

General case of Chamfers, Fillets and Rounds

USES:Smooth the edge shared between two (spline) surfacesMerge two surfaces that are close, but not touching

INPUTS:Two surfaces, and shared/blending edgesBlend radius

Operators in CAD: Blending..

(a) blending intersecting(complex) surfaces

(b) blending non-intersecting(complex) surfaces

(a) blending intersecting(complex) surfaces

(b) blending non-intersecting(complex) surfaces

Operators in CAD: Blending...

blend-edge

section plane perpendicularto blend edge

normal view ofsection plane

blend arc

blend surface:sweep blend arc along blend edge

blend-edge

section plane perpendicularto blend edge

normal view ofsection plane

blend arc

blend surface:sweep blend arc along blend edge

Problems:1. If edge is not C1, then sweep of blend arc is not C0

2. How to store the surface equation ?

Blend computation: Rolling Ball Method

Operators in CAD: Tapers and drafts...

Main Use:manufacturing related features: casting or molding

INPUTS:(a) face / faces to be drafted(b) a neutral plane, that

intersects the faces being drafted

cross-section of the drafting faces on the neutral face unchanged (c) the draft angle

OUTPUT:(a) Modified part geometry

Operators in CAD: Tapers and drafts...

Draft F1, F2, F3 by 15°Green section shows neutral plane

Cylindrical faces:F1 F2 F3

Draft F1, F2, F3 by 15°Green section shows neutral plane

Cylindrical faces:F1 F2 F3

Examples

Operators in CAD: Tapers and drafts...

Opposite faces (green outline) to be drafted by 15°

Neutral faces (green outline)

A complex draft

Opposite faces (green outline) to be drafted by 15°

Neutral faces (green outline)

A complex draft

Examples (4th example is special!)

Operators in CAD: Tapers and drafts...

Opposite faces (green outline) to be drafted by 15°

Neutral faces (green outline)

A complex draft

Opposite faces (green outline) to be drafted by 15°

Neutral faces (green outline)

A complex draft

Example 4:INPUTS:(a) Face(s) to be drafted (b) Draft line (c) Draft angle (d) Neutral plane

Operators in CAD: Tapers and drafts...

Draft method:

(i) Intersect the neutral plane with the draft faces, to get a series of edges (or a loop) that must stay fixed;

(ii) Each point, p on the fixed loop belongs to a Draft face, F.

(iii) For each point p, form the drafted edge:(a) P = plane through p, with normal = NF X NN

(b) Intersect P with F to get drafting edge, ep.(c) Rotate ep by the drafting angle in plane P, to get the drafted

edge

Operators in CAD: Tapers and drafts...

This Draft method works for (some) non-planar draft-lines

NF

NN

p

P

drafted planes

intersection line

neighboring planedrafting line

drafted line

NF

NN

p

P

drafted planes

intersection line

neighboring planedrafting line

drafted line

Operators in CAD: Tapers and drafts...

(a) draft feature results in non-manifold geometry

Draft failures

10

20

draft angle: 44

draft angle: 45

X X

Operators in CAD: Tapers and drafts...

Draft failures

(b) draft face intersection with neighboring face ill-defined

neutral face

45° Draft extends partially beyond neighboring face

neighboring faceneutral face

45° Draft extends partially beyond neighboring face

neighboring face

Requires intersection after draft generation

Operators in CAD: Tapers and drafts...

Draft failures

(c) draft face intersection with neighboring face ill-defined

neutral face

45° Draft extends partially beyond neighboring face

neighboring faceneutral face

45° Draft extends partially beyond neighboring face

neighboring face

NON-PLANAR

ill-defined geometry

Operators in CAD: Surface operations: Offsets

Inputs: Surface S, offset distance, r, offset direction

Computation: for each point p on the base surface

Normal = Np

Offset point of p := p + r Np

surface

offset

offset

Planar surface:

Operators in CAD: Surface offsets, cylindrical surface

q = a + xÛ

(q - p).Û = 0

(a +xÛ – p).Û = 0

x = (p – a).Û

Offset point:po = p + r (p - q)/|(p – q)|

surface

offset

offset

Û

x

yz

a

pq

Operators in CAD: Surface operations

Surface offsets: BSpline surface

For each point, p offset point po = p + rN

Surface equation: p = p(u, v)

Tangent vectors:

),( vupu

pu

),( vupv

pv

Normal vector: ||

^

vu

vu

pp

ppN

Offset surface equation: p(u, v) + r N(u, v)NOT

Bspline

Bspline

pu

pv

Operators in CAD: Surface operations

Find a grid of points on the surface,For each point of grid, offset point po = p + rNFit a new BSpline surface through grid po

BSpline offset is UNSTABLE !

poorgeometry

Operators in CAD: Surface operations

Surface offsets:

Inputs: Surface S, offset distance, r, offset direction

Computation: for each point p on the base surface

Normal = Np

Offset point of p := p + r Np

surface

offset

offset

Planar surface:

Operators in CAD: Offset -- interpretations

intersecting facestrimmed

non-intersecting facesextended

non-intersecting facesextended

Operators in CAD: Trimming

Trimming operation is based on intersection

R

BTrim R by B

Trim B by R R must beEXTENDED

Operators in CAD: Trimming

BSpline surface trimming

Intersection curveCurve extension

Operators in CAD: Shelling

Convert a solid to a “shell”

Examples

shell all

don’t shelltop face

don’t shelltop, left faces

don’t shellleft, front faces

Operators in CAD: Shelling

Shell computation:

For each face f, compute offset face, fo

Intersect each pair of offset facesRe-compute BREP of solid [topologically difficult]

Operators in CAD: Lofting/ Skinning

Use a series of (2D) “guide” profilesPut a “skin”: surface that interpolates each guide profile

Example

Operators in CAD: Lofting/ Skinning

Lofting computation:

Complex, involving BSpline surfaces

Instability:

skinned surface not smooth

self intersection: fails

Guide curves:

possible i

mprovement