Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Remesh

The remesh command applies isotropic surface remeshing to an existing triangular surface mesh. Starting from the input triangulation, automesh iteratively splits, collapses, flips, and smooths edges to drive every edge toward a target edge length. The result is a surface mesh with more uniform, better-quality triangles, either coarsened or refined relative to the input.

automesh remesh --help
Applies isotropic remeshing to an existing mesh [default mode: uniform]

Usage: automesh remesh [OPTIONS] --input <FILE> --output <FILE> [COMMAND]

Commands:
  uniform   Uniform target edge length over the whole mesh
  adaptive  Curvature-adaptive target edge length
  help      Print this message or the help of the given subcommand(s)

Options:
  -i, --input <FILE>   Mesh input file (exo | inp | stl | vtu)
  -o, --output <FILE>  Mesh output file (exo | inp | mesh | stl | vtu)
      --log <FILE>     Mirror terminal output to a log file
  -q, --quiet          Pass to quiet the terminal output
  -h, --help           Print help

Remeshing reads and writes surface (triangular) mesh formats; see the --input and --output formats listed in the help above. STL files must be binary STL for both input and output — ASCII STL is not accepted. The worked examples below include short scripts to convert ASCII STL or OBJ meshes to binary STL.

remesh runs in one of two sizing modes, uniform and adaptive.

Remesh Uniform

A single target edge length is applied over the whole mesh; use it to coarsen or refine a surface to a chosen resolution.

automesh remesh uniform --help
Uniform target edge length over the whole mesh

Usage: automesh remesh --input <FILE> --output <FILE> uniform [OPTIONS]

Options:
  -n, --iterations <NUM>  Number of remeshing iterations [default: 5]
  -s, --size <SIZE>       Target edge length [default: mean edge length]
      --log <FILE>        Mirror terminal output to a log file
  -q, --quiet             Pass to quiet the terminal output
  -h, --help              Print help
  • --iterations <NUM> — number of remeshing passes (default: 5). More passes bring the mesh closer to the target edge length.
  • --size <SIZE> — the target edge length. When omitted, the mean edge length of the input mesh is used, which regularizes the mesh without significantly changing its resolution.

Remesh Adaptive

The target edge length varies with local surface curvature, between a --minimum and --maximum, so curved regions are refined and flat regions are coarsened.

automesh remesh adaptive --help
Curvature-adaptive target edge length

Usage: automesh remesh --input <FILE> --output <FILE> adaptive [OPTIONS] --minimum <MIN> --maximum <MAX>

Options:
  -n, --iterations <NUM>  Number of remeshing iterations [default: 5]
      --minimum <MIN>     Minimum edge length
      --maximum <MAX>     Maximum edge length
  -t, --tolerance <TOL>   Curvature tolerance [default: 0.1]
  -g, --gradation <GRAD>  Size gradation factor [default: 0.5]
      --log <FILE>        Mirror terminal output to a log file
  -q, --quiet             Pass to quiet the terminal output
  -h, --help              Print help
  • --iterations <NUM> — number of remeshing passes (default: 5).
  • --minimum <MIN> — minimum edge length, used in high-curvature regions (required).
  • --maximum <MAX> — maximum edge length, used in flat regions (required).
  • --tolerance <TOL> — curvature tolerance controlling how strongly curvature drives the local edge length (default: 0.1).
  • --gradation <GRAD> — size gradation factor controlling how smoothly the edge length transitions between the minimum and maximum (default: 0.5).

Examples

Two worked examples apply these options and illustrate the results:

  • Unit sphere — an analytic unit sphere: mesh statistics, closed-surface relationships, uniform vs. adaptive sizing, and the effect of the number of iterations.
  • Stanford bunny — a real scanned surface with varying curvature, where uniform and adaptive sizing differ visibly, with a walkthrough of every remesh parameter.