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

Convert

convert translates between file formats without changing the underlying data: convert mesh translates between mesh formats (.exo, .inp, .mesh, .stl, .vtu), and convert segmentation translates between segmentation formats (.npy, .spn, .vti).

automesh convert --help
Converts between mesh or segmentation file types

Usage: automesh convert [OPTIONS] <COMMAND>

Commands:
  mesh          Converts mesh file types (exo | inp | stl | vtu) -> (exo | inp | mesh | stl | vtu)
  segmentation  Converts segmentation file types (npy | spn) -> (npy | spn | vti)
  help          Print this message or the help of the given subcommand(s)

Options:
      --log <FILE>  Mirror terminal output to a log file
  -q, --quiet       Pass to quiet the terminal output
  -h, --help        Print help

Convert Mesh

convert mesh automatically detects the element type(s) present in the input file — hexahedral, tetrahedral, triangular, quadrilateral, wedge, pyramidal, or a mix of these within the same mesh — and writes them to the output format unchanged; there is no separate hex/tet/tri subcommand to choose.

.stl is the exception: .stl is a triangulated-surface format only, so every element it reads or writes is a 3D triangle.

  • An .stl input can be converted to any of the other mesh formats (.exo, .inp, .mesh, .vtu); the resulting mesh is composed exclusively of triangular elements.
  • Any of the other mesh formats can be converted to .stl, provided the input mesh is itself composed exclusively of triangular elements; the resulting .stl is then, likewise, composed solely of triangles.
  • A volumetric mesh (containing hexahedral, tetrahedral, wedge, or pyramidal elements) cannot be converted to .stl.
automesh convert mesh --help
Converts mesh file types (exo | inp | stl | vtu) -> (exo | inp | mesh | stl | vtu)

Usage: automesh convert mesh [OPTIONS] --input <FILE> --output <FILE>

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

Convert Segmentation

automesh convert segmentation --help
Converts segmentation file types (npy | spn) -> (npy | spn | vti)

Usage: automesh convert segmentation [OPTIONS] --input <FILE> --output <FILE>

Options:
  -i, --input <FILE>   Segmentation input file (npy | spn)
  -o, --output <FILE>  Segmentation output file (npy | spn | vti)
  -x, --nelx <NEL>     Number of voxels in the x-direction (spn)
  -y, --nely <NEL>     Number of voxels in the y-direction (spn)
  -z, --nelz <NEL>     Number of voxels in the z-direction (spn)
      --log <FILE>     Mirror terminal output to a log file
  -q, --quiet          Pass to quiet the terminal output
  -h, --help           Print help