You can change the mesh type and the mesh resolution from the CAD Mesh Settings Dialog. Click the '''Mesh Settings'''[[File:mesh_settings_tn.png]] button of '''Simulate Toolbar''' or select the menu item '''Simulate → Discretization → Mesh Settings...'''In the drop-down list labeled '''Mesh Type''' you can select one of the three options: '''Regular Surface''', '''Structured Surface''' or '''Tetrahedral'''. The mesh resolution is controlled by '''Edge Length''' which is expressed in project units. The default value of edge length is 10 units. This means that the default mesh features cells with a size of about 10 units. When you change the mesh type or resolution, you can see the effect using the '''Apply''' button if [[EM.Cube]] is already in mesh view mode. After [[EM.Cube]] generates a mesh, it saves its and uses it the next time you want to see the mesh. The mesh stays the same until you change its parameters. Sometimes, you may want to regenerate the mesh with the same current parameters. To do so, select the menu item '''Simulate → Discretization → Regenerate Mesh'''.
Â
===Saving Mesh Data to a File===
Â
CubeCAD generates a triangulated mesh of surface and solid objects and a linearized or polygonal mesh of curve objects. The triangular surface mesh of surface and solid objects are equivalent to [[EM.Cube]]'s native polymesh objects while the polygonal mesh of curve objects are equivalent to polyline objects. The mesh data can be saved into an ASCII data file with a '''.msh''' file extension. The top part of this file contains coordinates of all the nodes involved in the mesh. Then comes the definition of the elements of faces. Each line defines the number of nodes in each element and the index of the nodes in the order presented in the previous node definition section. Thus, triangular elements (faces) have three node indices while the linear elements (bars)have two node indices.
Â
Polymesh and polyline objects are already discretized and are not meshed again when [[EM.Cube]] generates a mesh of the structure in the Project Workspace. As such, polymesh and polyline objects preserve their nodes as they are saved into a mesh file.
Â
[[File:meshfile1.png]]
Â
The mesh file representing a polymesh surface object.
<p> </p>