11 july 2002 reverse engineering 1 dr. gábor renner geometric modelling laboratory, computer and...

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: beatrice-norris

Post on 12-Jan-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

44Reverse EngineeringReverse Engineering11 July 200211 July 2002

Conventional engineering partsConventional engineering parts

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

55Reverse EngineeringReverse Engineering11 July 200211 July 2002

Free-form objects

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

66Reverse EngineeringReverse Engineering11 July 200211 July 2002

Artistic objectsArtistic objects

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

77Reverse EngineeringReverse Engineering11 July 200211 July 2002

Natural objectNatural object

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

88Reverse EngineeringReverse Engineering11 July 200211 July 2002

Natural objects

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

99Reverse EngineeringReverse Engineering11 July 200211 July 2002

Natural objects

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 1111

TriangulationTriangulation

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

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 1212

TriangulationTriangulation

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

1313Reverse EngineeringReverse Engineering11 July 200211 July 2002

Decimation Decimation

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

1414Reverse EngineeringReverse Engineering11 July 200211 July 2002

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

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

1515Reverse EngineeringReverse Engineering11 July 200211 July 2002

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

FIAT

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

1818Reverse EngineeringReverse Engineering11 July 200211 July 2002

Object and decimated meshObject and decimated mesh

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

2323Reverse EngineeringReverse Engineering11 July 200211 July 2002

Planarity filtering

Angular deviationNumerical curvatures

Remove data points aroundsharp edges

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

2424Reverse EngineeringReverse Engineering11 July 200211 July 2002

Dimensionality filtering using Dimensionality filtering using the Gaussian spherethe Gaussian sphere

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

2525Reverse EngineeringReverse Engineering11 July 200211 July 2002

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

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

2727Reverse EngineeringReverse Engineering11 July 200211 July 2002

Planarity and dimensionality Planarity and dimensionality filteringfiltering

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

2828Reverse EngineeringReverse Engineering11 July 200211 July 2002

Planarity and dimensionality Planarity and dimensionality filteringfiltering

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

3030Reverse EngineeringReverse Engineering11 July 200211 July 2002

Computing best fit rotational axis

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

3434Reverse EngineeringReverse Engineering11 July 200211 July 2002

Apex and axis filteringApex and axis filtering

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 3737

Constrained fittingConstrained fitting

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

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 3838

Constrained profilesConstrained profiles

Translational profileRotational profile

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

4545Reverse EngineeringReverse Engineering11 July 200211 July 2002

Using auxiliary objectsUsing auxiliary objects

1a 1b

2a 2b

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

4646Reverse EngineeringReverse Engineering11 July 200211 July 2002

Simple part reconstructionSimple part reconstruction

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

4747Reverse EngineeringReverse Engineering11 July 200211 July 2002

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

with blends

without blends

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 4949

Reconstruction of free-form shapes

Surfacestructure

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

11 July 200211 July 2002 Reverse EngineeringReverse Engineering 5050

Reconstruction of free-form shapes

Curvatureplot

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

5151Reverse EngineeringReverse Engineering11 July 200211 July 2002

Advanced Surface Fitting (BMW model)

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

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: 11 July 2002 Reverse Engineering 1 Dr. Gábor Renner Geometric Modelling Laboratory, Computer and Automation Research Institute

5353Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reconstructing free-form features (vrrb blend)

Global surface fitting

Functional decomposition- stable regions- constrained fitting

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

5454Reverse EngineeringReverse Engineering11 July 200211 July 2002

Reconstructing free-form features(free-form step)

Global surface fitting Functional decomposition

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

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