Mesh optimization
Mesh optimization improves the geometric quality of an existing triangulated mesh. Meshes that were edited by hand or assembled from several datasets often become unnecessarily dense, contain badly shaped elements, or are left with gaps at surface contacts. The tool can even out such a mesh, reduce its element count, rebuild it with a more uniform element size, and close open holes.
The operation always produces a new object in the Data Manager — the source surface or grid is never modified, so you can compare the two and keep the one you prefer.
Supported objects
- Triangulated Multi-Z surfaces. All four operations are available. A surface that still consists of sticks only is not triangulated yet — build its mesh with Recreate surface first.
- Tetrahedral 3D grids. Only Smoothing can be run on them, but Quality metrics is reported for them as well.
Only these two object types appear in the dialog. Structured grids (S-Grids) are not mesh-optimization inputs.
Opening the dialog
- In the Data Manager, right-click a surface under Multi-Z Surfaces and choose Mesh optimization. The entry stays visible but is unavailable for a surface that has no triangulated mesh.
- In the Data Manager, right-click a tetrahedral grid under 3D Grids and choose Mesh optimization. The entry is not offered for structured grids.
- Or run Mesh optimization from the Actions panel and pick the object inside the dialog.
The object you right-clicked is preselected in the dialog. If the project contains neither a triangulated surface nor a tetrahedral grid there is nothing to optimize, and the dialog does not open.
Input object
Input object is shared by both tabs and lists every mesh in the project that can be optimized. Tetrahedral grids are marked with (TetGrid) after the name so they can be told apart from surfaces of the same name. Changing the selection updates the available operations and the reported metrics.
Optimize
Select the Operation and set its value in the row below. The row label and the editor change with the selected operation.
- Smoothing — set Smoothing % between 0 and 100 (default 50). Vertices are moved to even out the mesh while the overall shape is preserved. On a tetrahedral grid only the outer boundary is smoothed; interior nodes, the cell count and the connectivity stay unchanged.
- Decimation — set Target ratio % between 10 and 100 (default 50). The mesh is simplified until roughly that share of the original triangle count is left. Boundary edges are preserved, so the outline of the surface does not shrink.
- Re-mesh — set Target edge length. The mesh is rebuilt with triangles of a more uniform size. Leave the value at (median) to use the median edge length of the input mesh. The outline of the patch is preserved.
- Topology repair — set Max hole edges (0 = unlimited). Open border loops are triangulated and smoothed into the surrounding mesh, which is how you close gaps and work towards a watertight model. A loop with more edges than the limit is skipped; leave the value at (unlimited) to fill every hole that is found.
Press Run to create the optimized object, or Cancel to close the dialog without changes. Run is unavailable when the selected combination cannot be applied: on a tetrahedral grid every operation except Smoothing is blocked, because it would change the cell count or the connectivity of the grid.
Quality metrics
The Quality metrics tab reports read-only measurements of the object selected in Input object. Use it to decide which operation is needed, and afterwards to compare the result with its source.
- Element and vertex counts — triangles for a surface, tetrahedra for a tetrahedral grid.
- watertight — yes when the mesh is closed, no when it still has open borders.
- non-manifold vertices — the number of vertices where the mesh is topologically inconsistent. They are reported for information only and are not corrected automatically.
- Edge length — minimum, maximum, mean and standard deviation. A wide spread points to an uneven mesh that Re-mesh can regularize.
- Dihedral angle (deg) — minimum, maximum, mean and standard deviation of the angles between adjacent faces. Very small or very large angles indicate distorted elements.
- Aspect ratio histogram (inradius / circumradius) — the number of elements in ten bins from 0.0-0.1 to 0.9-1.0. A perfectly equilateral element scores 1.0, so a distribution weighted towards the right-hand bins means better-shaped elements.
When the measurements cannot be computed for the selected object, the tab reports that metrics are unavailable for this input instead of showing values.
Results
- A new object appears next to the source in the Data Manager. Its name is the source name plus a suffix naming the operation — (smoothed), (decimated), (remeshed) or (repaired). A counter is added if that name is already in use.
- An optimized Multi-Z surface is created under the same Time or Depth domain node as its source and keeps its colour.
- An optimized tetrahedral grid is created under 3D Grids as a complete copy of the source grid, including its properties and layers.
- Nothing is created when the settings would leave the mesh unchanged — for example Smoothing at 0 %, Decimation at 100 %, or Topology repair on a mesh that has no holes within the chosen limit.
- Select the new object in Input object and open Quality metrics to confirm the improvement before you continue modelling with it.
Recommendations
- Read Quality metrics before you choose an operation: the watertight flag and the edge-length spread usually tell you whether the mesh needs repairing, regularizing or only smoothing.
- Close the gaps first. Run Topology repair while the mesh reports watertight: no, then smooth or re-mesh the repaired result.
- Work in moderate steps and check the metrics after each run, rather than applying one aggressive setting.
- Use Decimation when the mesh is simply too heavy, and Re-mesh when the element sizes are uneven.
See Also