This directory is a repository of tools, related to Mesh_3, but which
are not demos nor examples. Some of them (like slivers_exuder) will
perhaps be moved to demo/Mesh_3/ in the future.

Here is the list of tools:
    cgal_to_medit
    display_distribution
    filter_remove_tets_from_medit
    GOCAD_xyz_to_OFF
    identify_identical_points_in_OFF_files
    lanteri
    lanteri_output_tet_mesh
    off_to_ghs
    read_mesh
    slivers_exuder
    stat_mesh
    test_off
    nb2mesh

Details follows...

Files formats:
-------------
[too be written]

filter_remove_tets_from_medit:
-----------------------------
This is a filter, written in Perl.

Use it like that:
  ./filter_remove_tets_from_medit < file.mesh > file-notets.mesh

It takes a medit file as standard input, and returns to standard
output the same medit file, without its tetrahedra.


cgal_to_medit:
-------------
Usage:
  ./cgal_to_medit INPUT OUPUT

  INPUT must be a file of format produced by the output operator of
  CGAL::Triangulation_3, with points
  CGAL::Weighted_point_with_surface_index and cells
  CGAL::Mesh_3::Complex_2_in_triangulation_cell_base_3.

  OUTPUT will be a medit file.

GOCAD_xyz_to_OFF:
----------------
Convert a file from format GOCAD's xyz to OFF file format.
Usage:
  ./GOCAD_xyz_to_OFF INPUT.xyz OUTPUT.off

identify_identical_points_in_OFF_files:
--------------------------------------
That tools tries to fix an OFF file:
  - merge identical points,
  - then orient the surface if possible.
Usage:
  ./identify_identical_points_in_OFF_files < input.off > output.off

merge_off_files:
---------------
Use 'merge_off_files' to... merge several OFF files. If the OFF files have
vertices in common, they will be duplicated (use
'identify_identical_points_in_OFF_files' after to fix that).
Usage:
  ./merge_off_files a.off b.off [off files] > result.off


lanteri:
--------
  This tool is designed specificaly for answering to a request of
  Stephane Lanteri, INRIA. It uses several files:
  - utils.h contains templated functions
          'display_faces_counts',
          'display_facets_by_surface_indices_statistics',
	  'display_vertices_by_surface_indices_statistics',
	  'display_cells_by_volume_indices_statistics'.
  - distribution.h and distribution.cpp declare and define functions
          'compute_distribution',
          'display_distribution'.
    They use Distribution_displayer.h.
  - Distribution_displayer.h defines a base class
  'Distribution_displayer', with two pure virtual functions:
          'fill_rectangle',
	  'segment'
  - Gd_displayer.h Qt_widget_displayer.h
    Gd_displayer.cpp Qt_widget_displayer.cpp
      implementes two different classes derived of
      'Distribution_displayer' (two implementation for displaying).
  - lanteri_process_results.cpp defines three functions (declared in
  lanteri.cpp):
          'process_cells',
	  'process_volume_edges',
	  'process_surface_edges'.
  - lanteri_utils.h defines two templated functions:
          'scan_edges_and_process',
	  'scan_cells_and_process'.
    These two functions use functions of lanteri_process_results.cpp.

lanteri_output_tet_mesh:
-----------------------
  This tool is designed specificaly for answering to a request of
  Stephane Lanteri, INRIA.

display_distribution:
--------------------
Usage:
  ./display_distribution [--scale x] (--tets|--noboite|--mesh) FILE
Options:
  --scale SCALE                 SCALE is a real number, which will be the
                                the vertical scaling of the histogram.
  --criterion ANGLE
  --criterion RATIO             Choose between an min dihedral angle distribution
                                or an aspect ratio distribution.
                                Default: RATIO.
  --tets FILE
  --noboite FILE
  --mesh FILE
  --cgal FILE
                                Read input file FILE.
                                FILE must a .tets file, or a .noboite file,
                                a cgal file, or a .mesh file.

This tool displays the radius-radius ratio distribution or the minimum
dihedral angle distribution of a mesh file, and save it in a png file named
FILE-scale-SCALE-angles.png or FILE-scale-SCALE-ratios.png. It also display
the minimum and the maximum of the criterion, in the mesh.

off_to_ghs:
----------
Usage:
./off_to_ghs [FILE_BASENAME]
    will convert FILE_BASENAME.off to FILE_BASENAME.faces
    and FILE_BASENAME.points.

off_to_medit:
----------
This tool creates a medit files with 0 tetrahedra, from an .off file.

Usage:
./off_to_medit [FILE_BASENAME]
    will convert FILE_BASENAME.off to FILE_BASENAME.mesh.

read_mesh:
---------
Usage:
  ./read_mesh FILE

  FILE must be a file of format produced by the output operator of
  CGAL::Triangulation_3, with points
  CGAL::Weighted_point_with_surface_index and cells
  CGAL::Mesh_3::Complex_2_in_triangulation_cell_base_3.
 
This tools read a .mesh file and displays faces counts, such as in:
    Vertices: 3247
    Facets on surface: 6474
    Cells: 19670
    Cells in volume: 18335
 
This file uses utils.h, and types.h.
 
stat_mesh:
---------
Usage:
  ./stat_mesh FILE

  FILE must be a file of format produced by the output operator of
  CGAL::Triangulation_3, with points
  CGAL::Weighted_point_with_surface_index and cells
  CGAL::Mesh_3::Complex_2_in_triangulation_cell_base_3.

Same as read_mesh, but displays more informations:
    Vertices: 3247
    Facets on surface: 6474
    Cells: 19670
    Cells in volume: 18335

  Statistics:
(vertices)
    Vertices with index #0: 0
    Vertices with index #1: 450
    Vertices with index #2: 563
    Vertices with index #3: 705
    Vertices with index #4: 863
    Vertices with index #5: 666
(facets)
    Hybrid facets: 0
    Facets on surface #0: 0
    Facets on surface #1: 896
    Facets on surface #2: 1122
    Facets on surface #3: 1406
    Facets on surface #4: 1722
    Facets on surface #5: 1328

slivers_exuder:
--------------
This tools exudes slivers from a cgal triangulation.

Usage:
  ./slivers_exuder INPUT OUTPUT bound [filename.off]

  INPUT must be a file of format produced by the output operator of
  CGAL::Triangulation_3, with points
  CGAL::Weighted_point_with_surface_index and cells
  CGAL::Volume_mesher_cell_base_3.

  OUPUT is the name of the ouput file. It will be in the same format.

  0<=bound<=1.0 is a bound on pumping process.

  If non-nul, filename.off is the name of an output off file, where
  only slivers are displayed.

Uses utils.h and weighted_types.h.

test_off:
--------
This tool tests if an OFF file describes a manifold surface or not from the
combinatorial point of view : more precisely it tests if any edge is
incident to two faces.

Usage:
./test_off [OFF_FILE_NAME.off]
    will analyse OFF_FILE_NAME.off and display the list of non manifold edges.
    
nb2mesh:
-------
This tool converts meshes from the [no]boite[b]-format to the mesh[b]- or amdba3-format.

Usage: nb2mesh filein fileout [-v] [-s]
   filein :  xxx.[no]boite[b]
   fileout:  yyy.mesh[b]  or zzz.amdba3
   -v     :  verbose mode
   -s     :  do not create boundary (surface)
   -x     :  split constrained tetras
   -df    :  remove dangling faces
   -ref   :  add reference to sub-domains
