### Mesh - List of operations

Good cell quality of meshes translate into accurate results within optimum time after computation. But more often than not, we get a mesh output, which is far from accuracy. There are number of factors affecting a mesh, that might compromise with the final result. This chapter focuses on the various shortcomings of a mesh and their repair algorithms.

##### Mesh Decimation/Simplification

Mesh decimation/simplification is the method of reducing the number of elements used in a mesh while maintaining the overall shape, volume and boundaries preserved as much as possible. It is a type of algorithm that aims to transform a given mesh into another with fewer elements (faces, edges and vertices). The decimation process usually involves a set of user-defined quality criteria, that maintains specific properties of the original mesh as much as possible. This process reduces the complexity of a mesh.

##### Mesh Hole-Filling

To analyze a mesh model, it must be complete. Often, some mesh models carry holes in them, which must be filled. The unseen areas of the model appear as holes, which are aesthetically unsatisfying and can be a hindrance to algorithms that expect a continuos mesh. The Fill Hole command fills the holes and gaps in the mesh.

Note – The Fill Hole command only works on triangulated mesh and not tetrahedral mesh

##### Mesh Refinement

Certain situations arise which makes us concerned about the accuracy a model in certain areas. Such scenarios prompt us to have fine mesh in those areas to ensure accurate results. However, creating a surface mesh of the entire model with a fine mesh size may ask for unnecessary hours to analyze the fine mesh in those regions where the results are not as important to you. The answer to this issue is the usage of refinement points.

A refinement point identifies a region or volume of space in which a finer mesh has to be generated. Mesh refinement can be defined by identifying an absolute size for the local mesh. Mesh refinement ends up in creating more number of elements in the specified region of the model.

##### Mesh Smoothing

Mesh smoothing is also known as mesh relaxation. Sometimes it is necessary to modify that mesh after a mesh generation. It is achieved either by changing the positions of the nodes or by removing the mesh altogether. Mesh smoothing results in the modification of mesh point positions, while the topology remains as it is.

### Mesh Generation Algorithms

In the previous session, we have learned what Mesh is and the various aspects upon which a mesh can be classified. Mesh generation requires expertise in the areas of meshing algorithms, geometric design, computational geometry, computational physics, numerical analysis, scientific visualization and software engineering to create a mesh tool.

Over the years, mesh generation technology has evolved shoulder to shoulder with increasing hardware capability. Even with the fully automatic mesh generators there are many cases where the solution time is less than the meshing time. Meshing can be used for wide array of applications, however the principal application of interest is the finite element method. Surface domains are divided into triangular or quadrilateral elements, while volume domain is divided mainly into tetrahedral or hexahedral elements. A meshing algorithm can ideally define the shape and distribution of the elements.

A key step of the finite element method for numerical computation is mesh generation algorithms. A given domain is to be partitioned it into simpler ‘elements’. There should be few elements, but some portions of the domain may need small elements so that the computation is more accurate there. All elements should be ‘well shaped’. Let us take a walkthrough of different meshing algorithms based of two common domains, namely quadrilateral/hexahedral mesh and triangle/tetrahedral mesh.

##### Algorithm methods for Quadrilateral or Hexahedral Mesh

Grid-Based Method

The grid based method involves the following steps:

• A user defined grid is fitted on 2D & 3D object. It generates quad/ hex elements on the interior of the object.
• Some patterns are defined for boundary elements followed by forming a boundary element by applying boundary intersection grid.
• This results in the generation of quadrilateral mesh model.

Medial Axis Method

Medial axis method involves an initial decomposition of the volumes. The method involves few steps as given below:

• Consider a 2D object with hole.
• A maximal circle is rolled through the model and the centre of circle traces the medial object.
• Medial object is used as a tool for automatically decomposing the model in to simple meshable region.
• Series of templates for the region are formed by the medial axis method to fill the area with quad element.

Plastering method

Plastering is the process in which elements are placed starting with the boundaries and advancing towards the centre of the volume. The steps of this method are as follows:

• A 3D object is taken.
• One hexahedral element is placed at boundary.
• Individual hexahedral elements are projected towards the interior of the volume to form hexahedral meshing, row by row and element by element.
• The process is repeated until mesh generation is completed.

Whisker Weaving Method

Whisker weaving is based on the concept of the spatial twist continuum (STC). The STC is the dual of the hexahedral mesh, represented by an arrangement of intersecting surfaces, which bisect hexahedral elements in each direction. The whisker weaving algorithm can be explained as in the following steps:

• The first step is to construct the STC or dual of the hex mesh.
• With a complete STC, the hex elements can then be fitted into the volume using the STC as a guide. The loops can be easily determined from an initial quad mesh of the surface.
• Hexes are then formed inside the volume, once a valid topological representation of the twist planes is achieved. One hex is formed wherever three twist planes converge.

Paving Method

The paving method has the following steps to generate a quadrilateral mesh:

• Initially a 2D object is taken.
• A node is inserted in the boundary and the boundary node is considered as loop.
• A quadrilateral element is inserted and a row of elements is formed.
• The row of element is placed around the boundary nodes.
• Again this same procedure adopt for next rows.
• Finally quad mesh model is formed.

Mapping Mesh Method

The Mapped method for quad mesh generation involves the following steps:

• A 2D object is taken.
• The 2D object is split into two parts.
• Each part is either a simple 2D rectangular or a square object.
• The simple shape object is unit meshed.
• The unit meshed simple shape object is mapped in its original form and then joined back to form actual object.

##### Algorithm methods for Triangular and Tetrahedral Mesh

With the quadtree mesh method, square containing the geometric model are recursively subdivided until the desired resolution is reached. The steps for two dimensional quadtree decomposition of a model are as follows:

• A 2D object is taken.
• The 2D object is divided into rectangular parts.
• A Detail tree of divided object is provided.
• The object is eventually converted into triangle mesh.

Delaunay Triangulation Method

A Delaunay triangulation for a set P of discrete points in the plane is a triangulation DT such that no points in P are inside the circum-circle of any triangles in DT. The steps of construction Delaunay triangulation are as follows:

• The first step is to consider some coordinate points or nodes in space.
• The condition of valid or invalid triangle is tested in every three points which finds some valid triangle to make a triangular element.
• Finally a triangular mesh model is obtained.

Delaunay Triangulation maximizes the minimum angle of all the angle of triangle and it tends to avoid skinny triangles.

Another very popular family of triangular and tetrahedral mesh generation algorithms is the advancing front method, or moving front method. The mesh generation process is explained as following steps:

• A 2D object with a hole is taken.
• An inner and outer boundary node is inserted. The node spacing is determined by the user.
• An edge is inserted to connect the nodes.
• To start the meshing process, an edge AB is selected and a perpendicular is drawn from the midpoint of AB to point C (where C is node spacing determined by the user) in order to make a triangular element.
• After one element is generated, another edge is selected as AB and a point C is made, but if in case any other node lets point D within the defined radius, then ABC element is cancelled and instead, an element ABD is formed.
• This process is repeated until mesh is generated.

Spatial Decomposition Method

The steps for spatial decomposition method are as follows:

• Initially a 2D object is taken.
• The 2D object is divided into minute parts till we get the refined triangular mesh.

Sphere Packing Method

The sphere packing method follows the given steps:

• Before constructing a mesh, the domain is filled with circles.
• The circles are packed closely together, so that the gaps between them are surrounded by three or four tangent circles.
• These circles are then used as a framework to construct the mesh, by placing mesh vertices at circle centers, points of tangency, and within each gap while using generated points. Eventually, the triangular mesh is generated.

Source

Singh, Dr. Lokesh, (2015). A Review on Mesh Generation Algorithms. Retrieved from http://www.ijrame.com

### Mesh Quality

The quality of a mesh plays a significant role in the accuracy and stability of the numerical computation. Regardless of the type of mesh used in your domain, checking the quality of your mesh is a must. The ‘good meshes’ are the ones that produce results with fairly acceptable level of accuracy, considering that all other inputs to the model are accurate. While evaluating whether the quality of the mesh is sufficient for the problem under modeling, it is important to consider attributes such as mesh element distribution, cell shape, smoothness, and flow-field dependency.

##### Element Distribution

It is known that meshes are made of elements (vertices, edges and faces). The extent, to which the noticeable features such as shear layers, separated regions, shock waves, boundary layers, and mixing zones are resolved, relies on the density and distribution of mesh elements. In certain cases, critical regions with poor resolution can dramatically affect results. For example, the prediction of separation due to an adverse pressure gradient depends heavily on the resolution of the boundary layer upstream of the point of separation.

##### Cell Quality

The quality of a cell has a crucial impact on the accuracy of the entire mesh. The quality of cell is analyzed by the virtue of three aspects: Orthogonal quality, Aspect ratio and Skewness.

Orthogonal Quality: An important indicator of mesh quality is an entity referred to as the orthogonal quality. The worst cells will have an orthogonal quality close to 0 and the best cells will have an orthogonal quality closer to 1.

Aspect Ratio: Aspect ratio is an important indicator of mesh quality. It is a measure of stretching of the cell. It is computed as the ratio of the maximum value to the minimum value of any of the following distances: the normal distances between the cell centroid and face centroids and the distances between the cell centroid and nodes.

Skewness: Skewness can be defined as the difference between the shape of the cell and the shape of an equilateral cell of equivalent volume. Highly skewed cells can decrease accuracy and destabilize the solution.

##### Smoothness

Smoothness redirects to truncation error which is the difference between the partial derivatives in the equations and their discrete approximations. Rapid changes in cell volume between adjacent cells results in larger truncation errors. Smoothness can be improved by refining the mesh based on the change in cell volume or the gradient of cell volume.

##### Flow-Field Dependency

The entire effects of resolution, smoothness, and cell shape on the accuracy and stability of the solution process is dependent upon the flow field being simulated. For example, skewed cells can be acceptable in benign flow regions, but they can be very damaging in regions with strong flow gradients.

##### Correct Mesh Size

Mesh size stands out as one of the most common problems to an equation. The bigger elements yield bad results. On the other hand, smaller elements make computing so long that it takes a long amount of time to get any result. One might never really know where exactly is the mesh size is on the scale.

It is important to consider chosen analysis for different mesh sizes. As smaller mesh means a significant amount of computing time, it is important to strike a balance between computing time and accuracy. Too coarse mesh leads to erroneous results. In places where big deformations/stresses/instabilities take place, reducing element sizes allow for greatly increased accuracy without great expense in computing time.

### Path to Product Development

If you are an engineering professional, most likely you are aware of how a physical product comes to life. From the early days of sketching and blueprints, manufacturing of a commodity has come a long way. The modern methodology of creating a product has not only changed drastically, but it has become way more efficient and precise in its approach. Today’s engineer lives and thrives in the world of 3-dimensional models. Whatever masterpiece a designer has in his mind, he has the tools and system to give it life. And it is not just limited to inception of a new idea being turned to a product; it has made the art of reverse engineering being implemented more than ever.

So what are the factors that have revolutionized this craft?

It is the safe to say that with the invention of new tools, techniques and computer, the road to new product development has become more smooth, accurate and flexible. Although a professional can get deep into the subject matter, this article gives a brief overview of the product development from technical perspective.

The footsteps to a new product can be summarized in the following sequence.

To put it in words, here is how the entire sequence goes:

• Scanning: Whether you have an entirely new idea on your mind, or you want to base your idea on an already existing product; you need a reference. Your reference can be either technical manuals from the manufacturer or the physical product itself. The first step is to scan the product using 3D scanners. 3D scanning technology comes in many shapes and forms. Scanners capture and store the 3D information of the product. The scanned information gets stored in the form of closely spaced data points known as Point Cloud.
• Point Cloud: A point cloud is a collection of data points defined by a given coordinates system. In a 3D coordinates system, for example, a point cloud may define the shape of some real or created physical system.
• Mesh: Point clouds are used to create 3D meshes. A mesh is a network that constitutes of cells and points. Mesh generation involves point clouds to be connected to each other by the virtue of vertices, edges and faces that meet at shared edges. There are specific softwares for carrying of meshing function.
• 3D Model: Once the meshed part is generated, it goes through required software applications to be transferred to Computer Aided Design (CAD) tools to get transformed into a proper 3D CAD model. 3D model is the stage where whole sorts of applications such as sewing, stitching, etc, are implemented to create a prototype.
• Testing: A prototype goes through numerous tests in this phase, to check for limitations and possible calibrations if necessary. This is done to determine the optimum stage where the prototype can be turned to a product.
• Product: This is where the entire process comes to an end. Once a prototype is evaluated and finalized, it is sent for production in order to introduce it to the market.

This introductory part gives you a summary of product development and the related technical terms. In the next chapters, we will dive deep and go through all the mentioned stages, one by one.

### Point Cloud Operations

No output is always perfect no matter how much the technology has evolved. Even though point cloud generation has eased up manufacturing process, it comes with its own anomaly. Generally, a point cloud data is accompanied by Noises and Outliers.

Noises or Noisy data means the data information is contaminated by unwanted information; such unwanted information contributes to the impurity of the data while the underlying information still dominates. A noisy point cloud data can be filtered and the noise can be absolutely discarded to produce a much refined result.

If we carefully examine the image below, it illustrates a point cloud data with noises. The surface area is usually filled with extra features which can be eliminated.

After carrying out Noise Reduction process, the image below illustrates the outcome, which a lot smoother data without any unwanted elements. There are many algorithms and processes for noise reduction.

Outlier, on the contrary, is a type of data which is not totally meaningless, but might turn out to be of interest. Outlier is a data value that differs considerably from the main set of data. It is mostly different from the existing group. Unlike noises, outliers are not removed outright but rather, it is put under analysis sometimes.

The images below clearly portray what outliers are and how the point cloud data looks like once the outliers are removed.

Point Cloud Decimation

We have learned how a point cloud data obtained comes with noise and outliers and the methods to reduce them to make the data more executable for meshing. Point cloud data undergoes several operations to treat the anomalies existing within. Two of the commonly used operations are Point Cloud Decimation and Point Cloud Registration.

A point cloud data consists of millions of small points, sometimes even more than what is necessary. Decimation is the process of discarding points from the data to improve performance and reduce usage of disk. Decimate point cloud command reduces the size of point clouds.

The following example shows how a point cloud underwent decimation to reduce the excess points.

Point Cloud Registration

Scanning a commodity is not a one step process. A lot of time, scanning needs to be done separately from different angles to get views. Each of the acquired data view is called a dataset. Every dataset obtained from different views needs to be aligned together into a single point cloud data model, so that subsequent processing steps can be applied. The process of aligning various 3D point cloud data views into a complete point cloud model is known as registration. The purpose is to find the relative positions and orientations of the separately acquired views, such that the intersecting regions between them overlap perfectly.

Take a look at the example given below. The car door data sets have been merged to get a complete model.

### What is Mesh and what are the types of Meshing

For those acquainted with mechanical design and reverse engineering, they can testify to the fact that the road to a new product design involves several steps. In reverse engineering, the summary of the entire process involves scanning, point cloud generation, meshing, computer-aided designing, prototyping and final production. This section covers a very crucial part of the process — Meshing or simply put, Mesh.

To put a simple definition, a mesh is a network that constitutes of cells and points.

Mesh generation is the practice of converting the given set of points into a consistent polygonal model that generates vertices, edges and faces that only meet at shared edges. It can have almost any shape in any size. Each cell of the mesh represents an individual solution, which when combined, results in a solution for the entire mesh.

Mesh is formed of facets which are connected to each other topologically. The topology is created using following entities:

• Facet - A triangle connecting three data points
• Edge - A line connecting two data points
• Vertex - A data point
##### Mesh Property

Before we proceed to know the types of meshes, it is necessary to understand the various aspects that constitute a mesh. It is important to know the concept of a polygonal mesh.

A polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D graphics and solid modeling. The faces usually consist of triangles, quadrilaterals or other simple polygons as that simplifies rendering. It may also be composed of more general concave polygons or polygons with holes.

Objects created with polygon meshes must store different types of elements. These include:

• Vertex: A position (usually in 3D space) along with other information such as color, normal vector and texture coordinates
• Edge: A connection between two vertices
• Face: A closed set of edges, in which a triangle face has three edges, and a quad face has four edges
• Surfaces: They are often called smoothing groups. Generally, surfaces are not required to group smooth regions

A polygon mesh may be represented in a variety of ways, using different methods to store the vertex, edge and face data. These include:

• Face-vertex meshes
• Winged edge meshes
• Corner tables
• Vertex-vertex meshes
##### Types of meshes

Meshes are commonly classified into two divisions, Surface mesh and Solid mesh. Let us go through each section one by one.

Surface Mesh: A surface mesh is a representation of each individual surface constituting a volume mesh. It consists of faces (triangles) and vertices. Depending on the pre-processing software package, feature curves may be included as well.

Generally, a surface mesh should not have free edges and the edges should not be shared by two triangles.

The surface should ideally contain the following qualities of triangle faces:

• Equilateral sized triangles
• No sharp angles/surface folds etc. within the triangle proximity sphere
• Gradual variation in triangle size from one to the next

The surface mesh generation process should be considered carefully. It has a direct influence on the quality of the resulting volume mesh and the effort it takes to get to this step.

Solid Mesh: Solid mesh, also known as volume mesh, is a polygonal representation of the interior volume of an object. There are three different types of meshing models that can be used to generate a volume mesh from a well prepared surface mesh.

The three types of meshing models are as follows:

• Tetrahedral - tetrahedral cell shape based core mesh
• Polyhedral - polyhedral cell shape based core mesh
• Trimmed - trimmed hexahedral cell shape based core mesh

Once the volume mesh has been built, it can be checked for errors and exported to other packages if desired.

##### Mesh type as per Grid structure

A grid is a cuboid that covers entire mesh under consideration. Grid mainly helps in fast neighbor manipulation for a seed point.

Meshes can be classified into two divisions from the grid perspective, namely Structured and Unstructured mesh. Let us have a look at each of these types.

Structured Mesh: Structured meshes are meshes which exhibits a well-known pattern in which the cells are arranged. As the cells are in a particular order, the topology of such mesh is regular. Such meshes enable easy identification of neighboring cells and points, because of their formation and structure. Structured meshes are applied over rectangular, elliptical, spherical coordinate systems, thus forming a regular grid. Structured meshes are often used in CFD.

Unstructured Mesh: Unstructured meshes, as the name suggests, are more general and can randomly form any geometry shape. Unlike structured meshes, the connectivity pattern is not fixed hence unstructured meshes do not follow a uniform pattern. However, unstructured meshes are more flexible. Unstructured meshes are generally used in complex mechanical engineering projects.