**3. Shape engineering**

162 Reverse Engineering – Recent Advances and Applications

CAD packages that support part re-engineering, feature-based NC toolpath generations, and technical data package preparation. Although, converting data points into NURB surface models has been automated, creating parametric solid models from data points cannot and will not be fully automated. This is because that, despite technical challenges in implementation, the original design intent embedded in the data points must be recovered and realized in the parametric solid model. Modeling decisions have to be made by the designer in order to recover the original design intents. However, designers must be relieved from dealing with tedious point data manipulations and primitive geometric entity constructions. Therefore, the ideal scenario is having software tools that take care of labor intensive tasks, such as managing point cloud, triangulation, etc., in an automated fashion; and offer adequate capabilities to allow designers to interactively recover design intents. Such an ideal scenario has been investigated for many years. After these many years, what can be done with the technology and tools developed at this point? Many technical articles already address auto surfacing. In this chapter, in addition to auto surfacing, we will focus

We will present a brief review and technical advancement in 3D shape engineering and design parameterization for reverse engineering, in which discrete point clouds are converted into feature-based parametric solid models. Numerous efforts have been devoted to developing technology that automatically creates NURB surface models from point clouds. Only very recently, the development was extended to support parametric solid modeling that allows significant expansion on the scope of engineering assignments. In this chapter, underlying technology that enables such advancement in 3D shape engineering and design parameterization is presented. Major commercial software that offers such capabilities is evaluated using practical examples. Observations are presented to conclude this study. Next, we will present a more precise discussion on design parameterization to set

One of the common approaches for searching for design alternatives is to vary the part size or shape of the mechanical system. In order to vary part size or shape for exploring better design alternatives, the parts and assembly must be adequately parameterized to capture

At the parts level, design parameterization implies creating solid features and relating dimensions so that when a dimension value is changed the part can be rebuilt properly and the rebuilt part revealed design intents. At the assembly level, design parameterization involves defining assembly mates and relating dimensions across parts. When an assembly is fully parameterized, a change in dimension value can be automatically propagated to all parts affected. Parts affected must be rebuilt successfully; and at the same time, they will have to maintain proper position and orientation with respect to one another without violating any assembly mates or revealing part penetration or excessive gaps. For example, in a single-piston engine shown in Fig. 1 (Silva & Chang, 2002), a change in the bore diameter of the engine case will alter not only the geometry of the case itself, but also all other parts affected, such as piston, piston sleeve, and even crankshaft. Moreover, they all have to be rebuilt properly and the entire assembly must stay intact through assembly

on solid modeling and design parameterization.

the tone for later discussion in this chapter.

mates, and faithfully reveal design intents.

**2. Design parameterization** 

design intents.

The overall process of shape engineering and parametric solid modeling is shown in Fig. 2, in which four main phases are involved. They are (1) triangulation that converts data points to a polygon mesh, (2) mesh segmentation that separates a polygon mesh into regions based on the characteristics of the surface geometry they respectively represent, (3) solid modeling that converts segmented regions into parametric solid models, and (4) model translation that exports solid models constructed to mainstream CAD systems. Note that it is desired to have the entire process fully automated; except for Phase 3. This is because that, as stated earlier, Phase 3 requires designer's interaction mainly to recover original design intents. These four phases are briefly discussed in the following subsections.

Fig. 2. General process of shape engineering and parametric solid model construction

### **3.1 Triangulation**

The mathematic theory and computational algorithms for triangulation have been well developed in the past few decades. A polygon mesh can be automatically and efficiently created for a given set of data points. The fundamental concept in triangulation is Delaunay triangulation. In addition to Delaunay triangulation, there are several well-known mathematic algorithms for triangulation, including marching cubes (Lorensen et al., 1987), alpha shapes (Edelsbrunner et al., 1983), ball pivoting algorithm (BPA) (Bernardini et al., 1999), Poisson surface reconstruction (Kazhdan et al., 2006), moving least squares (Cuccuru et al., 2009), etc. A few high profile projects yield very good results, such as sections of Michelangelo's Florentine

A Review on Shape Engineering and Design Parameterization in Reverse Engineering 165

The primary surfaces may meet each other along sharp edges or there may be secondary or

Fig. 4. Example of mesh segmentation, (a) an object segmented into many small regions due to a high sensitivity threshold, and (b) regions determined with a low sensitivity threshold

As discussed above, feature-based segmentation provides a sufficient foundation for the classification of simple algebraic surfaces. Algebraic surfaces, such as planes, natural quadrics (such as sphere, cylinders, and cones), and tori, are readily to be fitted to such regions. Several methods, including (Marshall et al., 2004), have been proposed to support

In addition to primitive algebraic surfaces, more general surfaces with a simple kinematic generation, such as sweep surfaces, revolved surfaces (rotation sweep), extrusion surfaces (translation sweep), pipe surfaces, are directly compatible to CAD models. Fitting those surfaces to segmented data points or mesh is critical to the reconstruction of surface models

In some applications, not all segmented regions can be fitted with primitives or CADcompatible surfaces within prescribed error margin. Those remaining regions are classified as freeform surfaces, where no geometric or topological regularity can be recognized. These can be a collection of patches or possibly trimmed patches. They are often fitted with NURB surfaces. Many algorithms and methods have been proposed to support NURB surface

Solid modeling is probably the least developed in the shape engineering process in support of reverse engineering. Boundary representation (B-rep) and feature-based are the two basic representations for solid models. There have been some methods, such as (Várady et al., 1998), proposed to automatically construct B-rep models from point clouds or triangular mesh. Some focused on manufacturing feature recognition for process planning purpose,

blending surfaces which may provide smooth transitions between them.

Fig. 5. A hierarchy of surfaces

such fitting, using least square fitting.

fitting, such as (Tsai et al., 2009).

**3.3 Solid modeling** 

and support of parameterization (Lukács et al., 1998).

Pietà composed of 14M triangle mesh generated from more than 700 scans (Bernardini et al., 1999), reconstruction of "Pisa Cathedral" (Pisa, Italy) from laser scans with over 154M samples (Cuccuru et al., 2009), and head and cerebral structures (hidden) extracted from 150 MRI slices using the marching cubes algorithm (about 150,000 triangles), as shown in Fig. 3.

Fig. 3. Sample projects of scanning and triangulation, (a) Michelangelo's Florentine Pietà, (b) Pisa Cathedral, and (c) head and cerebral structures

Although many triangulation algorithms exist, they are not all fool-proof. They tend to generate meshes with a high triangle count. In addition, these algorithms implicitly assume topology of the shape to be reconstructed from triangulation, and the parameter settings often influences results and stability. A few mesh postprocessing algorithms, such as decimation (for examples, Schroeder, 1997; Hoppe et al., 1993), and mesh smoothness (e.g., Hansen et al., 2005; Li et al., 2009), are worthwhile mentioning for interested readers.

### **3.2 Segmentation**

One of the most important steps in shape engineering is mesh segmentation. Segmentation groups the original data points or mesh into subsets each of which logically belongs to a single primitive surface.

In general, segmentation is a complex process. Often iterative region growing techniques are applied (Besl & Jain, 1988; Alrashdan et al., 2000; Huang & Meng, 2001). Some use noniterative methods, called direct segmentation (Várady et al., 1998), that are more efficient. In general, the segmentation process, such as (Vanco & Brunnett, 2004) involves a fast algorithm for *k*-nearest neighbors search and an estimate of first- and second-order surface properties. The first-order segmentation, which is based on normal vectors, provides an initial subdivision of the surface and detects sharp edges as well as flat or highly curved areas. The second-order segmentation subdivides the surface according to principal curvatures and provides a sufficient foundation for the classification of simple algebraic surfaces. The result of the mesh segmentation is subject to several important parameters, such as the *k* value (number of neighboring points chosen for estimating surface properties), and prescribed differences in the normal vectors and curvatures (also called sensitivity thresholds) that group the data points or mesh. As an example shown in Fig. 4a, a high sensitive threshold leads to scattered regions of small sizes, and a lower sensitive threshold tends to generate segmented regions that closely resemble the topology of the object, as illustrated in Fig. 4b.

Most of the segmentation algorithms come with surface fitting, which fits a best primitive surface of appropriate type to each segmented region. It is important to specify a hierarchy of surface types in the order of geometric complexity, similar to that of Fig. 5 (Várady et al., 1997). In general, objects are bounded by relatively large primary (or functional) surfaces. The primary surfaces may meet each other along sharp edges or there may be secondary or blending surfaces which may provide smooth transitions between them.

Fig. 4. Example of mesh segmentation, (a) an object segmented into many small regions due to a high sensitivity threshold, and (b) regions determined with a low sensitivity threshold

Fig. 5. A hierarchy of surfaces

164 Reverse Engineering – Recent Advances and Applications

Pietà composed of 14M triangle mesh generated from more than 700 scans (Bernardini et al., 1999), reconstruction of "Pisa Cathedral" (Pisa, Italy) from laser scans with over 154M samples (Cuccuru et al., 2009), and head and cerebral structures (hidden) extracted from 150 MRI slices

Fig. 3. Sample projects of scanning and triangulation, (a) Michelangelo's Florentine Pietà, (b)

Although many triangulation algorithms exist, they are not all fool-proof. They tend to generate meshes with a high triangle count. In addition, these algorithms implicitly assume topology of the shape to be reconstructed from triangulation, and the parameter settings often influences results and stability. A few mesh postprocessing algorithms, such as decimation (for examples, Schroeder, 1997; Hoppe et al., 1993), and mesh smoothness (e.g.,

One of the most important steps in shape engineering is mesh segmentation. Segmentation groups the original data points or mesh into subsets each of which logically belongs to a

In general, segmentation is a complex process. Often iterative region growing techniques are applied (Besl & Jain, 1988; Alrashdan et al., 2000; Huang & Meng, 2001). Some use noniterative methods, called direct segmentation (Várady et al., 1998), that are more efficient. In general, the segmentation process, such as (Vanco & Brunnett, 2004) involves a fast algorithm for *k*-nearest neighbors search and an estimate of first- and second-order surface properties. The first-order segmentation, which is based on normal vectors, provides an initial subdivision of the surface and detects sharp edges as well as flat or highly curved areas. The second-order segmentation subdivides the surface according to principal curvatures and provides a sufficient foundation for the classification of simple algebraic surfaces. The result of the mesh segmentation is subject to several important parameters, such as the *k* value (number of neighboring points chosen for estimating surface properties), and prescribed differences in the normal vectors and curvatures (also called sensitivity thresholds) that group the data points or mesh. As an example shown in Fig. 4a, a high sensitive threshold leads to scattered regions of small sizes, and a lower sensitive threshold tends to generate segmented regions that closely

Most of the segmentation algorithms come with surface fitting, which fits a best primitive surface of appropriate type to each segmented region. It is important to specify a hierarchy of surface types in the order of geometric complexity, similar to that of Fig. 5 (Várady et al., 1997). In general, objects are bounded by relatively large primary (or functional) surfaces.

Hansen et al., 2005; Li et al., 2009), are worthwhile mentioning for interested readers.

using the marching cubes algorithm (about 150,000 triangles), as shown in Fig. 3.

Pisa Cathedral, and (c) head and cerebral structures

resemble the topology of the object, as illustrated in Fig. 4b.

**3.2 Segmentation** 

single primitive surface.

As discussed above, feature-based segmentation provides a sufficient foundation for the classification of simple algebraic surfaces. Algebraic surfaces, such as planes, natural quadrics (such as sphere, cylinders, and cones), and tori, are readily to be fitted to such regions. Several methods, including (Marshall et al., 2004), have been proposed to support such fitting, using least square fitting.

In addition to primitive algebraic surfaces, more general surfaces with a simple kinematic generation, such as sweep surfaces, revolved surfaces (rotation sweep), extrusion surfaces (translation sweep), pipe surfaces, are directly compatible to CAD models. Fitting those surfaces to segmented data points or mesh is critical to the reconstruction of surface models and support of parameterization (Lukács et al., 1998).

In some applications, not all segmented regions can be fitted with primitives or CADcompatible surfaces within prescribed error margin. Those remaining regions are classified as freeform surfaces, where no geometric or topological regularity can be recognized. These can be a collection of patches or possibly trimmed patches. They are often fitted with NURB surfaces. Many algorithms and methods have been proposed to support NURB surface fitting, such as (Tsai et al., 2009).

## **3.3 Solid modeling**

Solid modeling is probably the least developed in the shape engineering process in support of reverse engineering. Boundary representation (B-rep) and feature-based are the two basic representations for solid models. There have been some methods, such as (Várady et al., 1998), proposed to automatically construct B-rep models from point clouds or triangular mesh. Some focused on manufacturing feature recognition for process planning purpose,

A Review on Shape Engineering and Design Parameterization in Reverse Engineering 167

*CATIA*, capable of recognizing basic features, such as extrude, revolve, and more recently, sweep. This capability has been applied primarily for support of solid model interchanges between CAD packages with some success, in which not only geometric entities (as has been done by IGESInitial Graphics Exchange Standards) but also parametric features are

One of the major issues revealed in commercial *GFR* software is design intent recovery. For example, the flange of an airplane tubing would be recognized as a single revolve feature, where a profile sketch is revolved about an axis (Fig. 7a). However, current *GFR* implementations are not flexible. As shown in Fig. 7b, without adequate user interaction, the single sketch flange may be recognized as four or more separate features. While the final solid parts are physically the same, their defining parameters are not. Such a batch mode

implementation may not be desirable in recovering meaningful design intents.

Fig. 7. Feature recognition for airplane tubing flange, (a) single revolved feature, and (b)

A feature-based parametric solid model consists of two key elements: a feature tree, and fully parameterized sketches employed for protruding solid features. A fully parameterized sketch implies that the sketch profile is fully constrained and dimensioned, so that a change in dimension value yields a rebuilt in accordance with design intents as anticipated. To the author's knowledge, there is no such method proposed or offered that fully automates the process. Some capabilities are offered by commercial tools, such as *Rapidform*, that support designers to interactively create fully parameterized sketches, which accurately conform to

Since most of the promising shape engineering capabilities are not offered in CAD packages (more details in the next section), the solid models constructed in reverse engineering software will have to be exported to mainstream CAD packages in order to support common engineering assignments. The conventional solid model exchanges via standards, such IGES or STEP AP (application protocols), are inadequate since parametric information, including solid features, feature tree, sketch constraints and dimensions, are completely lost through the exchanges. Although feature recognition capability offers some relief in recognizing geometric features embedded in B-rep models, it is still an additional step that is often labor intensive. Direct solid model export has been offered in some software, such as *liveTransfer*™ module of *Rapidform XOR3* as well as third party software, such as

four features: revolve, extrude, cut, and fillet

the data points and greatly facilitates the solid modeling effort.

*TransMagic*. More will be discussed for *liveTransfer*™.

**3.3.3 Design parameterization** 

**3.4 Solid model export** 

translated.

such as (Thompson, 1999). One promising development in recent years was the geometric feature recognition (*GFR*), which automatically recognizes solid features embedded in the Brep models. However, none of the method is able to fully automate the construction process and generate fully parametric solid models. Some level of manual work is expected.
