Smooth-Surface Approximation and Reverse Engineering
Smooth-Surface Approximation and Reverse Engineering
Smooth-Surface Approximation and Reverse Engineering
Objectmodel
Surfaceintca~scction
Figure 7. Flowchart of reverse engineering Figure 2. 3D plot ot scanned points on turbine-blade die
model
,,'1
Boundary detection
Boundary detection is the primary step in reverse
engineering wherein the total array of input data is
divided into several regions. Each of these regions is
devoid of any sharp change in shape, and consists of
a single feature. This procedure is sometimes automatically
performed in laser scanning machines s. In the case
where shape detection is not inbuilt into the software
of the measurement machine, one can apply the edge
operators used in computer-vision techniques• A
difference formulation of the edge operators, such as
the Laplacian Gaussian operator V2G, can be applied
to detect a change in shape 6. Here, the z coordinate
at each of the points scanned takes the place of
grey-level intensity at the pixels of an image. Edges are
identified by detecting the zero crossings, and nodes
Ga gR1111
on neighboring edges are connected to obtain the
boundaries. The efficiency of this algorithm depends
on the particular edge operator selected and the nature
of the data.
The following example provides an insight into the
boundary-detection method. A turbine-blade die wax
model was scanned for 3000 (60 x 50) points on a
Sheffield Cordax RS-30 CMM. The edges were detected
by convoluting the z coordinates of the measurement
points with the V2G operator using a 6-point mask.
Figure 2 shows the primal sketch of the scanned points,
and Figure 3 shows the3D plot of the points with zero
crossings at the boundaries after the use of the V2G
operator. The blade model was then divided into
regions, as shown in Figure 4. Points belonging to each
region were identified• Region 1 was the blade profile
surface, and a B-spline surface was fitted to it.
Region4
Figure 4. Detected regions in turbine-blade die
Parameterization
Parameterization is the process of assigning parameter Along each track, chord-length parameterization is
values to the measurement data points in each region. applied to assign u values. The same procedure is
Given an ordered set of points Pij(xii, Yii, zij), the repeated for tracks defined by u = 0 and 1 to assign
parameter value (ui, vi) can be assigned by chord-length the v values. The v parameters for the interior points
parameterization 1'7 or equal-increment parameter- are assigned by linear interpolation•
ization 8. Chord-length parameterization is used in this
paper, because it bears a close relationship to the actual
Selection of knots
spacing of the data points. In the scanning of a surface,
points are generally taken along lines aligned with one The designer chooses the number of knots, or, in other
of the machine axes. These lines are called 'tracks'. words, the number of spline segments in both
1
MI'i(u) -- /]'i- ~i-1 '~i-1 ~ u ~ '~'i
(4b) ~--3 ~-2 ~-1 0 ~i-4 ~i-3 ~i--2 ~i-1 ~i
= 0 otherwise U .~
Let the B-spline basis function Mi(u) be defined in the Figure 5. Rectangular regions created by knots
u parametric direction with knots 2i_4, ~i-3, 2i-2, 2i-1 [The basis function is nonzero over 16 adjacent regions.]
wherej = 1, 2,..., k + 4. Once the optimal parameters = XTPX + YtPY + ZrPZ (11)
are determined, the problem is reduced to that of
finding the coefficients c~, c~, c~ in the observation The average error is defined by
Equations 6a-c. The Householder transformation of [m~ ]1/2
matrix 1" can handle the solution better in the ear = ~, ( e r ) 2 / m n (12)
r=q
rank-deficient cases and when 1" is very ill conditioned,
but the computation time is doubled. F(ur, vr) is the objective function for the nonlinear
least-square minimization problem with u~, v r,
r = 1, 2 . . . . , mn, as the variables. Simple bounds are
Parameter optimization
imposed on the parameter values at the points internal
Hoschek 2 describes a linearized approach to the to a region, and constraints are imposed at the
optimization of the parameters with the object of boundary points of the region of interest. That is, u i = 0
making the error vectors normal to the fitted surface. or 1 and vi - 0 or 1 at the edges of the parametric
In his method, each error vector is projected onto the space, and 0 < u i < 1 and 0 < vi < 1 for the internal
tangent at the point on the fitted surface that points. This nonlinear least-square problem may be
corresponds to the measured point. The projected solved by the modified Levenberg-Marquardt method
length after normalization yields the change in and an active set strategy with numerically computed
parameter values. Pratt I mentions a similar algorithm, Jacobians. In all the cases tried so far, the average error
but he solves nonlinear equations in making the error eav decreases significantly after only a few iterations.
vectors normal at the respective points. In both of The following example illustrates the surface-fitting
these methods, the parameter values are sought after procedure, and compares the above-mentioned
a specified number of iterations, and the surface is optimization method with Hoschek's method with
refitted during every iteration. respect to computational efficiency. The data points
This paper uses a different method for parameter for this example were obtained by scanning a wax
optimization. The difference between the measured model of a surface patch designed at CATIA (Dassault
data points and the corresponding points on the fitted systems) and machined on a Cincinnati Milacron
surface is minimized in the least-squares sense, and no machining center. The scanning was performed on the
refitting of the surface (which is computationally costly) Cordax CMM. The data consisted of 100 points: ten
is required. An explicit expression for the sum of the points on each of the ten section curves. The original
squares of the error vectors is obtained, and it is then surface was designed with 4th- and 5th-order splines
minimized, with the parameters as the variables, by in the two parametric directions.
the use of a nonlinear least-squares minimization Table 1 shows the total error value before and after
technique. optimization for different numbers of knots selected,
The error components in x at each point are obtained with the CPU time used. The optimization procedure
in matrix form: is carried out for up to ten iterations. It may be observed
that there are several ways to design a surface for a
Ex = x -- T ( T t T ) - I T t X = [I -- T(TTT)-ITT]X = PX prescribed tolerance. For example, a tolerance value
(9a) of, say, 5.0 x 10 -3 mm can be achieved in various
ways. Starting with a higher number of knots may
where P -- [I -- T(TTT)-ITT]. The elements of vector require fewer iterations (four iterations for I x 1 knots,
Ex are the x components of the error at every point three for2 x 2 a n d 2 x 3, and one for3 x 4 a n d 4 x 5
e;, r = 1, 2 , . . . , m n . cases). However, the CPU time increases with the
The y and z components of the error are similarly increase in the number of knots for a given number
obtained in the matrix form as of iterations. On the other hand, if one starts with fewer
knots, more iterations are required to attain the same
Fy = py (9b)