Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reverse Engineering to Trimmed Splines

Similar presentations


Presentation on theme: "Reverse Engineering to Trimmed Splines"— Presentation transcript:

1 Reverse Engineering to Trimmed Splines

2 Common Surface Representations
NURBS Industry Standard Compact Representation Intuitive Shape Control Polygon Meshes MMCS-July 2004

3 MOTIVATION Digitizing Geometry Reverse Engineering
CAD Entertainment Reverse Engineering Manipulate existing objects Create new objects from existing objects Model objects otherwise difficult to model MMCS-July 2004

4 Point Cloud Data Characteristics Problems Large data sets
Holes in the Geometry Problems Significant Noise Particularly Lidar data sets Missing data MMCS-July 2004

5 Our Approach Smooth to remove noise Fill holes Parameterize
Regularize boundaries Fill holes Scanning artifacts Intrinsic to model Parameterize Determine knot vectors Fit with blended local weighted least squares We have used triangular meshes because We can obtain the boundary easily 2. We have many good methods for parameterizing meshes- by preserving angles . … We can utilize that 3. Use MLS for smoothing, filling holes and regularizing boundary For our method to work on point clouds, We can use floaters meshless parameterization for dealing directly with point clouds MMCS-July 2004

6 Examples 1 abstract surface
2 segmented from Lidar model reconstructions MMCS-July 2004

7 Smoothing Find the local neighborhood of each point
Project each point onto the surface obtained using MLS approximation about that point MMCS-July 2004

8 MLS Projection Step 1: Find local reference domain:
For a data point r, q = r + nt needs origin (q) and normal (n) that minimize  is a Gaussian weighting function a non linear optimization problem Solved using Powell minimization to find the suitable n and t Initial guess for (n,t) by making t=0 and solving the above equation for n MMCS-July 2004

9 MLS- Projection Step 2 – Find coefficients of polynomial g that minimizes q is the origin in the local coordinate system for r, (xi, yi) is the projection of pi into the coordinate plane for r  is the weighting function Step 3 – Projected point for r is q+g(0,0)n MMCS-July 2004

10 Hole Filling To ensure that spline fit exists and is well conditioned
Local method Introduce points to fill the hold Project each point onto its MLS surface Danger of over lap in holes whose shapes are poorly behaved. Working on solution to that problem. We want to insert new points to fill the hole closing into the hole from the boundary. So we select an edge in the boundary and get the neighbouring points of that edge. Now we find a local reference plane for these points and parameterize them by projecting hte points ont this plane. Now introduce the new point in the parameterization first. We now fit a quadratic polynomial surface and evaluate the suface at the point we introduced in hte l;ocal parameteriation in order to get teh point on hte a ctual surface. Now to triangulate it, we associate it with the closest edge to make a new triangle. MMCS-July 2004

11 Hole Filling – Curve Example
MMCS-July 2004

12 Hole Filling An example MMCS-July 2004

13 Hole Filling MMCS-July 2004 Adding a new point:
Do a weighted PCA to find the best fit plane plane for this neighborhood. Now parameterize the point set (the point and its neighborhood) by projecting onto the PCA plane. To these points fit a bi-quadratic polynomial surface (doing a moving least squares fit about this point). Evaluate the surface we obtain at the parameter value corresponding to the point of interest. This is the MLS projection onto the surface and is the new point in the point set. MMCS-July 2004

14 Triangulated Meshes Must then extend original mesh with new triangles in former hole or poor boundary Process triangulates consistently Second pass eliminates small angles and makes boundary smoother When we want to triangulate too- . Introduce point in the parametric domain . Find the MLS projection- the actual point on the surface . Make it a part of the actual triangulation MMCS-July 2004

15 Triangulation Step 2 Unfilled Hole Step 1 Unfilled Hole
Filled and Triangulated In step 1: We want to eliminate extremely small angles in the boundary and make it smoother. Or we could call it “more convex” Step 2: Introduce a new point along every face along the perpendicular bisector of the face In this step the point is not added if any of the following conditions is violated The point lies outside the area enclosed by the hole in the parametric domain. To check if this is satisfied, basically, currently, I am taking all those edges – one of whose vertices likes in the neighborhood under consideration and checking if the new point is on the right side of this edge in the parametric domain. (This is done by comparing it with the third vertex which forms a triangle with this edge ) The point is too close to an already inserted point/ one of the original vertices of the mesh. MMCS-July 2004

16 Parameterization Harmonic maps MMCS-July 2004 Fixing the boundary-
For nearly circular objects – we have used chord length parameterization along a square to fix boundary For objects with nearly square boundary (for instance a triangular piece at the end cut off) – we have projected the boundary and completed the parametric domain by adding new points. For Rectangle like objects: We have specified the corner four points that map to the corners of the parametric domain and used chord length in-between Another idea in mind: to map the boundary to a convex polygon and fill the remaining part of the rectangular domain with new data. MMCS-July 2004

17 Parameterization MMCS-July 2004
Parameterization: Harmonic maps- the corner four points have been fixed MMCS-July 2004

18 Knot Vector Determination
Adaptive – based on data Hierarchical subdivision of parametric domain with low degree local fit Extend knots across domain for tensor product To every patch, we fit a cubic least squares parametric surface. And measure the distance between the point set and the fitted surface. If this is high, we subdivide the domain into 4 pieces. This is done until either the error is low enough, or the number of points is less than a certain number Now do a moving least squares evaluation at the mid point of each of these cells. And average the coefficients corresponding to the corners of each of these cells. MMCS-July 2004

19 Blended Local Fit Weighted least squares over neighborhood of each knot ‘interval’ Weigh boundary data more heavily Blend coefficients MMCS-July 2004

20 Blending Local Fits MMCS-July 2004
Parameterization: Harmonic Maps- boundary parameterization obtained by projection onto PCA plane MMCS-July 2004

21 Blending local fits- Error
Here the green points are the actual points in the input point cloud The blue points are the closest points on the surface The red lines are drawn to show the error between each corresponding green and blue point MMCS-July 2004

22 Parametric Domain Completion
A similar procedure to filling holes. Find points in the parametric domain, going radially outwards from the boundary. For every point and every edge in the boundary, a new point is introduced. If any of these points is to close to its neighbors, it is not ignored (removed) We do not need to worry about triangulation here- since we do not need the triangulation any more (we need it only before the parameterization stage- as we are currently using mesh parameterization techniques). Harmonic Map with boundary fixed by projecting the actual boundary Data Added in the parameterization to get a rectangular domain MMCS-July 2004

23 Data Completion MMCS-July 2004
The first figure is the bean model before completing parametric domain- and the second and third models- after fitting a spline surface. MMCS-July 2004

24 Examples: APC scans Engine Cover The tank model Wheel MMCS-July 2004

25 Segmented Data from APC
MMCS-July 2004

26 Engine Cover MMCS-July 2004
The first is the original mesh- the second the filled mesh and the third the fitted surface MMCS-July 2004

27 Trimming the fit MMCS-July 2004

28 In Conclusion + Uses MLS for smoothing and filling in data
+ Knot vector selection data dependent + Works with partial data to create good surface fit. Intended for use with trimmed surface representations - Near boundaries, tangent motion as well as normal motion causes errors – need better smoothing techniques - Parametrization methods need further work Will complete further analysis of quality of fit. MMCS-July 2004

29 MMCS-July 2004

30 MMCS-July 2004

31 Trimmed NURBS MMCS-July 2004
Trimmed surfaces for the tank model. Here the trim curve was obtained by fitting a high degree spline curve (order 7) to the data points. And the surface has been rendered by doing a boolean with the extruded trim curve. MMCS-July 2004

32 Parameterization- Harmonic Maps
Attempts to minimize the energy functional Weight between a pair of vertices with indices i, j is given by In the first equation, hi and hj are the parameter values for the points i and j respectively. k1 k2 i j MMCS-July 2004

33 Triangulating Hole (For meshes)
Step 1: Eliminate extremely small angles along the border by introducing a new triangle and make the boundary smoother Step 2: Introduce new point for each edge in the border and simultaneously add it to the closest triangle. Repeat Step 1 and Step 2 until you have a boundary with just 3 vertices. When we want to triangulate too- . Introduce point in the parametric domain . Find the MLS projection- the actual point on the surface . Make it a part of the actual triangulation MMCS-July 2004

34 Knot Intervals The corresponding points in the point cloud
The above figures show the parameterization of the wheel model The corresponding points in the point cloud Hierarchical Subdivision of Parametric Domain MMCS-July 2004

35 Data Fitting Moving Least Squares
Least Squares Fit Moving Least Squares fit at point (xj , yj) We use the Gaussian weighting function h is decided based on the average point spacing The way moving least squares is solved: Instead of At A x= At b we have At w A x= At w b where w is a diagonal matrix containing all the weights MMCS-July 2004

36 Blending Local Fits Basis Functions: Evaluated in the interval 0 to 1
Evaluated in the interval a to b These are the basis we are using for fitting locally For a tensor product surface, {f(0,0),f(0,1),f(0,2),f(0,3)} x {f(0,0),f(0,1),f(0,2),f(0,3)} are used- MMCS-July 2004

37 Blending local Fits-Blending control points
An attempt to show the blending process: Each colored rectangle is a colored cell from the previous slide Consider the yellow piece to the left when - we evaluate the MLS fit at the black point at the center, the local control mesh has 16 points associated with the 16 dots shown in the figure to the left (in the parametric domain). Also there are not the right ratios- when the knot spacing is not uniform The figure to the right shows the blending process- when we look at 4 such neighboring cells, the center control point is the average of the corresponding control points of each cell. Associating a knot vector: I don’t seem to be doing the right thing really- Right now (for these results)what I have done is If u0 u1 ….. Un are the ends of the interval I am doing u0 u0 u0 u0 u2 u3 u4… un-2 un un un un (We actually seem to know the knot value and we want the corresponding parameter values) MMCS-July 2004

38 Blending Local Fits MMCS-July 2004
In this particular example projection has been used for parameterization MMCS-July 2004

39 Blending local Fits MMCS-July 2004
Parameterization: Harmonic maps- boundary is mapped by chord length along a unit square. MMCS-July 2004

40 Blending Local Fits- Error
Distance from the surface Just a graph shwpingn the error of various points . The distance values are normalized with the distance of the farthest point Point Index MMCS-July 2004

41 Parameterization MMCS-July 2004
Using harmonic maps- boundary fixed by specifying the last four points MMCS-July 2004

42 Reverse Engineering Manipulate existing objects
Create new objects from existing objects Model objects otherwise difficult to model Images obtained from: MMCS-July 2004

43 MLS Projection MMCS-July 2004
We are using the MLS projection process in two places – smoothing and hole filling/extending boundary. In het above figure, r is the point we ant to project. We want to find the plane h (determined by q and n). Q is the projection of r onto the reference plane. MMCS-July 2004


Download ppt "Reverse Engineering to Trimmed Splines"

Similar presentations


Ads by Google