reverse engineering

55
1 Reverse Engineering Reverse Engineering 11 July 2002 11 July 2002 Reverse Engineering Reverse Engineering Dr. G Dr. G ábor Renner ábor Renner Geometric Modelling Laboratory, Geometric Modelling Laboratory, Computer and Automation Research Institute Computer and Automation Research Institute

Upload: alva

Post on 16-Jan-2016

76 views

Category:

Documents


0 download

DESCRIPTION

Reverse Engineering. Dr. G ábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute. Reverse Engineering. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Reverse Engineering

11Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reverse EngineeringReverse Engineering

Dr. GDr. Gábor Rennerábor Renner

Geometric Modelling Laboratory,Geometric Modelling Laboratory,

Computer and Automation Research Institute Computer and Automation Research Institute

Page 2: Reverse Engineering

22Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reverse Engineering

set data point CAD model measured data boundary representation (incomplete, noisy, outliers) (accurate and consistent)

intelligent 3D Scanner • interpret the structure of data points in order to create

an appropriate computer representation allowing redesign of objects

applications– no original drawing or documentation– reengineering for constructing improved products– reconstruct wooden or clay models– incorporate, matching human surfaces, etc.

Page 3: Reverse Engineering

33Reverse EngineeringReverse Engineering11 July 200211 July 2002

Classifying objects

conventional engineering objects– many faces; mostly simple geometry– f(x,y,z)=0, implicit surfaces:

• plane, cylinder, cone, sphere, torus

– sharp (or blended) edges free - form shapes

– small number of faces; complex geometry– r = r(u,v), piecewise parametric surfaces, – smooth internal subdividing curves

artistic objects natural surfaces

Page 4: Reverse Engineering

44Reverse EngineeringReverse Engineering11 July 200211 July 2002

Conventional engineering partsConventional engineering parts

Page 5: Reverse Engineering

55Reverse EngineeringReverse Engineering11 July 200211 July 2002

Free-form objects

Page 6: Reverse Engineering

66Reverse EngineeringReverse Engineering11 July 200211 July 2002

Artistic objectsArtistic objects

Page 7: Reverse Engineering

77Reverse EngineeringReverse Engineering11 July 200211 July 2002

Natural objectNatural object

Page 8: Reverse Engineering

88Reverse EngineeringReverse Engineering11 July 200211 July 2002

Natural objects

Page 9: Reverse Engineering

99Reverse EngineeringReverse Engineering11 July 200211 July 2002

Natural objects

Page 10: Reverse Engineering

1010Reverse EngineeringReverse Engineering11 July 200211 July 2002

Basic Phases of REBasic Phases of RE

1. data acquisition1. data acquisition 2. pre-processing2. pre-processing

• triangulation,triangulation,• decimationdecimation• merging multiple viewsmerging multiple views

3. segmentation3. segmentation 4. surface fitting4. surface fitting 5. CAD model creation5. CAD model creation

Page 11: Reverse Engineering

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 1111

TriangulationTriangulation

Page 12: Reverse Engineering

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 1212

TriangulationTriangulation

Page 13: Reverse Engineering

1313Reverse EngineeringReverse Engineering11 July 200211 July 2002

Decimation Decimation

Page 14: Reverse Engineering

1414Reverse EngineeringReverse Engineering11 July 200211 July 2002

Merging point clouds Merging point clouds (registration) - 1(registration) - 1

Page 15: Reverse Engineering

1515Reverse EngineeringReverse Engineering11 July 200211 July 2002

Merging point clouds Merging point clouds (registration) - 2(registration) - 2

FIAT

Page 16: Reverse Engineering

1616Reverse EngineeringReverse Engineering11 July 200211 July 2002

SEGMENTATION: separate subsets of data points; each point region corresponds to the pre-image of a particular face of the object

“chicken and egg” problem• given the geometry, selecting point sets is easy• given the pointsets, fitting geometry is easy

to resolve this we need:• interactive help• iterative procedures• restricted object classes

segmentation and surface fitting are strongly coupled: hypothesis tests

Segmentation and surface fitting

Page 17: Reverse Engineering

1717Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reconstructing conventional engineering objects - 1

basic assumptions• relatively large primary surfaces

– planes, cylinders, cones, spheres, tori

• linear extrusions and surfaces of revolution• relatively small blends

“accurate” reconstruction ”without” user assistance

Page 18: Reverse Engineering

1818Reverse EngineeringReverse Engineering11 July 200211 July 2002

Object and decimated meshObject and decimated mesh

Page 19: Reverse Engineering

1919Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reconstructing conventional engineering objects - 2

the basic structure can be determined direct segmentation

• decompose the point cloud into regions

a sequential approach using filters• find “stable” regions• discard “unstable” triangular strips, by detecting sharp

edges and smooth edges• simple regions• composite, smooth regions

Page 20: Reverse Engineering

2020Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reconstructing conventional engineering objects - 3

sharp edges (and edges with small blends)• computed by surface-surface intersection

smooth edges • assure accuracy and tangential continuity • surface/surface intersections would fail in the

almost tangential situations• explicitly created by constrained fitting of multiple

geometric entities

Page 21: Reverse Engineering

2121Reverse EngineeringReverse Engineering11 July 200211 July 2002

Direct segmentation - 1

basic principle• 1. based on a given environment compute

an indicator for each point • 2. based on the current filter exclude

unstable portions and split the region into smaller ones

• 3. if simple region: done• 4. if linear extrusion or surface of

revolution: create a 2D profile• 5. if smooth, composite region: compute

the next indicator and go to 1

Page 22: Reverse Engineering

2222Reverse EngineeringReverse Engineering11 July 200211 July 2002

Direct segmentation - 2

planarity filter: detect sharp edges and small blends dimensionality filter: separate

• planes• cylinders or cones, linear extrusions, composite

conical-cylindrical regions• spheres or tori, surfaces of revolution, composite

toroidal-spherical regions direction filter: separate

• cylinders, linear extrusions, composite conical regions apex filter: separate cones axis filter: separate

• spheres, tori, surfaces of revolution

Page 23: Reverse Engineering

2323Reverse EngineeringReverse Engineering11 July 200211 July 2002

Planarity filtering

Angular deviationNumerical curvatures

Remove data points aroundsharp edges

Page 24: Reverse Engineering

2424Reverse EngineeringReverse Engineering11 July 200211 July 2002

Dimensionality filtering using Dimensionality filtering using the Gaussian spherethe Gaussian sphere

Page 25: Reverse Engineering

2525Reverse EngineeringReverse Engineering11 July 200211 July 2002

Dimensionality filtering - An example.Dimensionality filtering - An example.

Page 26: Reverse Engineering

2626Reverse EngineeringReverse Engineering11 July 200211 July 2002

Dimensionality filteringDimensionality filtering

• based on the number of points in two concentric spheres

• separate data points by their dimensionality

D0: planesD1: cylinders-cones-transl. surfsD2: tori-spheres-rot. surfs

Page 27: Reverse Engineering

2727Reverse EngineeringReverse Engineering11 July 200211 July 2002

Planarity and dimensionality Planarity and dimensionality filteringfiltering

Page 28: Reverse Engineering

2828Reverse EngineeringReverse Engineering11 July 200211 July 2002

Planarity and dimensionality Planarity and dimensionality filteringfiltering

Page 29: Reverse Engineering

2929Reverse EngineeringReverse Engineering11 July 200211 July 2002

Detect translational and rotational symmetries

translational direction

• normal vectors ni of a translational surface are perpendicular to a common direction

• minimise ni,d2

rotational axis

• normal lines of a rotational surface (li, pi) intersect a common axis

i - angle between the normal line li and the plane containing the axis and the point pi

• various measures, in general: a non-linear system

Page 30: Reverse Engineering

3030Reverse EngineeringReverse Engineering11 July 200211 July 2002

Computing best fit rotational axis

Page 31: Reverse Engineering

3131Reverse EngineeringReverse Engineering11 July 200211 July 2002

Conical - cylindrical regionConical - cylindrical region

direction estimation detects cylinders and composite linearextrusions, rest: composite conical region

Page 32: Reverse Engineering

3232Reverse EngineeringReverse Engineering11 July 200211 July 2002

Conical composite regionConical composite region

fit a least squares pointto the tangent planes tocompute the apex

Page 33: Reverse Engineering

3333Reverse EngineeringReverse Engineering11 July 200211 July 2002

Toroidal - spherical regionToroidal - spherical region

estimate a localaxis of revolution

if largest eigenvalue(almost) zero ->sphere

otherwise torus orsurface of revolution

Page 34: Reverse Engineering

3434Reverse EngineeringReverse Engineering11 July 200211 July 2002

Apex and axis filteringApex and axis filtering

Page 35: Reverse Engineering

3535Reverse EngineeringReverse Engineering11 July 200211 July 2002

Surface fitting

given a point set and a hypothesis - find the best least squares surface

simple analytic surfaces - f(s,p) = 0• s: parameter vector, p: 3D point

minimise Euclidean distances - true geometric fitting algebraic fitting - minimise f(s,pi )2

approximate geometric fit - f / | f ’| ‘faithful’ geometric distances (Pratt 1987, Lukács et al.,

1998): unit derivative on the surface sequential least squares

• based on normal vector estimations

• series of linear steps

• reasonably accurate, computationally efficient

Page 36: Reverse Engineering

3636Reverse EngineeringReverse Engineering11 July 200211 July 2002

Constrained fitting Constrained fitting

needed for various engineering purposes fitting smooth profile curves for linear extrusions

and surfaces of revolution refitting elements of smooth composite regions

for B-rep model building• good initial surface parameters from segmentation• set of constraints• edge curves - explicitly computed

beautify the model• resolve topological inconsistencies• rounded values, perpendicular faces, concentric axis

Page 37: Reverse Engineering

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 3737

Constrained fittingConstrained fitting

Page 38: Reverse Engineering

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 3838

Constrained profilesConstrained profiles

Translational profileRotational profile

Page 39: Reverse Engineering

3939Reverse EngineeringReverse Engineering11 July 200211 July 2002

Constrained fitting problemConstrained fitting problem

primary surfaces:primary surfaces: s s S S parameter set:parameter set: aa point sets:point sets: p p P Pss

individual weight:individual weight: ss

k k constraint equations:constraint equations: {c {cii}} findfind aa, , which minimizeswhich minimizes f f

whilewhile c=0 c=0

c(a) = 0

Constraints: tangency, perpendicularity, concentricity, symmetry, etc..

Page 40: Reverse Engineering

4040Reverse EngineeringReverse Engineering11 July 200211 July 2002

Constrained fitting techniques Constrained fitting techniques

standard solution: Lagrangian multipliers, standard solution: Lagrangian multipliers, n+kn+k equations, multidimensional Newton-Raphson equations, multidimensional Newton-Raphson

problem: constraints contradict or not problem: constraints contradict or not independentindependent

preferred solution: sequential constraint preferred solution: sequential constraint satisfaction constraints sorted by satisfaction constraints sorted by prioritypriority

c(a) = 0c(a) = 0 and and f(a) = min.f(a) = min. is solved simultaneously is solved simultaneously by iterationby iteration

Page 41: Reverse Engineering

4141Reverse EngineeringReverse Engineering11 July 200211 July 2002

Constrained fitting - 2 Constrained fitting - 2

linear approximation forlinear approximation for c, c, quadratic forquadratic for f f

in matrix formin matrix form

wherewhere

Page 42: Reverse Engineering

4242Reverse EngineeringReverse Engineering11 July 200211 July 2002

Efficient representation Efficient representation

signed distance functionsigned distance function

the function to be minimizedthe function to be minimized

middle term needs to be computed only oncemiddle term needs to be computed only once

Page 43: Reverse Engineering

4343Reverse EngineeringReverse Engineering11 July 200211 July 2002

Fitting a circle - an exampleFitting a circle - an example

centercenter o, o, radiusradius r, r, pointpoint p p Euclidean distance function:Euclidean distance function: |p - o| - r |p - o| - r faithful approximation:

terms are now separated

alternative parameters with a constraint:

Page 44: Reverse Engineering

4444Reverse EngineeringReverse Engineering11 July 200211 July 2002

Equations for constrained fitting Equations for constrained fitting of circlesof circles

circles (lines) - in Pratt’s form (1987) circles (lines) - in Pratt’s form (1987)

tangency constraintstangency constraints

Page 45: Reverse Engineering

4545Reverse EngineeringReverse Engineering11 July 200211 July 2002

Using auxiliary objectsUsing auxiliary objects

1a 1b

2a 2b

Page 46: Reverse Engineering

4646Reverse EngineeringReverse Engineering11 July 200211 July 2002

Simple part reconstructionSimple part reconstruction

Page 47: Reverse Engineering

4747Reverse EngineeringReverse Engineering11 July 200211 July 2002

Final CAD (B-rep) modelFinal CAD (B-rep) model

with blends

without blends

Page 48: Reverse Engineering

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 4848

Functional decomposition:

primary surfaces + features

P0

P3

P4

P5

P6

P7

P8S1

P10

P1

P2

S2

ST(S1,S2)

Ignore area

Reconstruction of free-form shapes

Page 49: Reverse Engineering

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 4949

Reconstruction of free-form shapes

Surfacestructure

Page 50: Reverse Engineering

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 5050

Reconstruction of free-form shapes

Curvatureplot

Page 51: Reverse Engineering

5151Reverse EngineeringReverse Engineering11 July 200211 July 2002

Advanced Surface Fitting (BMW model)

Page 52: Reverse Engineering

11 July 200211 July 2002 Reverse EngineeringReverse Engineering

Free form surface fittingFree form surface fitting

Functional:Functional:

F F F

F u v

F v u

lsq sm

lsq i ii

n

i

sm uu uv vvv

v

u

u

( ) ( ( , ) )

( )min

max

min

max

S S P

S S S S

1

2

2 2 2 d d

Initialization:Initialization: • data point parametersdata point parameters• knot-distributionknot-distribution• smoothing weight (smoothing weight ())

F minimizationF minimization ParametercorrectionParametercorrection Knot-insertionKnot-insertion Smoothing weight opt.Smoothing weight opt.

Page 53: Reverse Engineering

5353Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reconstructing free-form features (vrrb blend)

Global surface fitting

Functional decomposition- stable regions- constrained fitting

Page 54: Reverse Engineering

5454Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reconstructing free-form features(free-form step)

Global surface fitting Functional decomposition

Page 55: Reverse Engineering

5555Reverse EngineeringReverse Engineering11 July 200211 July 2002

Conclusion

RE: a complex process, approaches differ by model type, quality of measured data sets and ‘a priori’ assumptions

free-form objects: functional decomposition - some user assistance needed

conventional engineering objects: direct segmentation - basically automatic• smooth edges

• accurate surfaces - linear extrusions - surfaces of revolution

• constrained fitting