mesh-editor v3.2.3

Mercurial revision 5786:5c8b45563631 | 2026-08-04


Description

mesh-editor is a tool designed to perform operations on an input grid (mesh). It allows you to modify, transform, and save mesh files in the .nei format.


Usage

mesh-editor [OPTIONS] -m input

Options

Option

Description

-h, --help

Display this help and exit.

-m <file>

Required. Input mesh file (.nei format).

-o <name>

Output filename. Default: mesh-editor.nei.

--proj

Activate projection on a spherical grid. Uses a basic method (see PROJ for details).

--flip

Flip the north-south axis.

--symetric

Add the symmetric mesh relative to the equator to the final mesh.


Deprecated Options

⚠️ Warning: These options are deprecated and may not be supported in future versions.

Option

Description

-p <file>

Polygon file to limit the working area for safety checks.

-b <file>

Boundary file (.bel format).

-c

Check for channel edges.

-d <float>

Minimum resolution: merge all smaller connections.

-e <float>

(No description available in the original documentation.)

-z

Pre-set zone to limit the working area.

--debug

Activate debug verbose mode.


PROJ

When the --proj option is enabled, the mesh is projected onto spherical coordinates using the following method:

  • Longitude: lon = x * 110. / 100.

  • Latitude: lat = y + acos(100. / 110.) * 180. / PI


Examples

Basic Mesh Editing

Load an input mesh file and save it with the default output name:

mesh-editor -m input.nei

Save to a Custom Output File

Load an input mesh and save it to a custom output file:

mesh-editor -m input.nei -o output.nei

Project Mesh on Spherical Coordinates

Project the mesh onto spherical coordinates:

mesh-editor -m input.nei --proj -o projected_mesh.nei

Flip North-South Axis

Flip the north-south axis of the mesh:

mesh-editor -m input.nei --flip -o flipped_mesh.nei

Add Symmetric Mesh Relative to the Equator

Add the symmetric mesh relative to the equator:

mesh-editor -m input.nei --symetric -o symmetric_mesh.nei

Combine Projection and Flip

Project the mesh and flip the north-south axis:

mesh-editor -m input.nei --proj --flip -o projected_flipped_mesh.nei

Combine All Transformations

Project the mesh, flip the north-south axis, and add the symmetric mesh:

mesh-editor -m input.nei --proj --flip --symetric -o final_mesh.nei

Environment Variables

mesh-editor does not explicitly use environment variables. However, it may inherit standard system environment variables for file handling and debugging.


Notes

  1. Input File:

  • The input mesh file must be in .nei format.

  • The -m option is mandatory. If not provided, the tool will exit with an error.

  1. Output File:

  • If no output filename is specified (-o), the default mesh-editor.nei will be used.

  1. Transformations:

  • The --proj, --flip, and --symetric options can be combined to apply multiple transformations in sequence.

  • The order of transformations matters. For example, flipping the mesh before projecting it may yield different results than projecting first and then flipping.

  1. Deprecated Options:

  • Avoid using deprecated options, as they may be removed in future versions.


See Also