=== CubeCAD's Surface Mesh ===
Mesh generation is an important part of computational engineering. A mesh is used to discretize a continuous geometry into a set of much simpler elementary cells or mesh "elements". [[Solid Objects|Solid objects]] can be discretized into tetrahedral elements. Surfaces can be meshed using triangular cells. Curves can be discretized into polylines. As you will see in [[EM.Cube|EM.CUBE]]'s other modules, [[EM.Cube|EM.CUBE]] provides a large number of diverse mesh generators. The accuracy of a numerical simulation often depends directly on the quality of the mesh. It is also important to be control the resolution of a mesh, namely, the size of mesh cells. Higher mesh resolutions normally lead to better accuracy of the numerical results.
Tetrahedral and surface triangular meshes are one of the most widely used mesh types in many different engineering disciplines. [[CubeCAD|CUBECAD]] provides two types of mesh generation algorithms for [[Discretizing Objects|discretizing objects]]. The first one generates a wire-frame surface triangular mesh of [[Surface Objects|surface objects]] and a polyline mesh of [[Curve Objects|curve objects]]. The [[Solid Objects|solid objects]] are treated as closed surfaces and are discretized using a similar wire-frame surface mesh. in other words, objects of all types are meshed in some sort. The wire-frame mesh generator has two variations. The first algorithm generates a regularized mesh and attempts to create triangular cells of almost equal size. The second algorithm tries to create a structured mesh with cells of similar patterns. [[CubeCAD|CUBECAD]]'s other mesh generator generates a tetrahedral mesh for [[Solid Objects|solid objects]]. Tetrahedral meshes are usually enormous in size. Note that surface and [[Curve Objects|curve objects]] cannot be discretized using this type of mesh generator.
[[File:cadmesh1_tn_new.png|260px]] [[File:cadmesh2_tn_new.png|260px]]