CGAL 5.5.2 - 3D Mesh Generation
Input/Output Functions

The free functions that can be used to read and write meshes.

Functions

template<class C3T3 >
void CGAL::IO::output_to_avizo (std::ostream &os, const C3T3 &c3t3)
 outputs mesh to avizo format More...
 
template<class C3T3 >
void CGAL::IO::output_to_medit (std::ostream &os, const C3T3 &c3t3, bool rebind=false, bool show_patches=false)
 outputs a mesh complex to the medit (.mesh) file format. More...
 
template<class C3T3 >
void CGAL::IO::output_to_tetgen (std::string filename, const C3T3 &c3t3, bool rebind=false, bool show_patches=false)
 outputs a mesh complex to tetgen format More...
 
template<class C3T3 >
void CGAL::IO::output_to_vtu (std::ostream &os, const C3T3 &c3t3, IO::Mode mode=BINARY)
 writes a tetrahedron mesh using the UnstructuredGrid XML format. More...
 

Function Documentation

◆ output_to_avizo()

template<class C3T3 >
void CGAL::IO::output_to_avizo ( std::ostream &  os,
const C3T3 &  c3t3 
)

#include <CGAL/IO/File_avizo.h>

outputs mesh to avizo format

Parameters
osthe stream
c3t3the mesh complex
See also
Avizo File Format

◆ output_to_medit()

template<class C3T3 >
void CGAL::IO::output_to_medit ( std::ostream &  os,
const C3T3 &  c3t3,
bool  rebind = false,
bool  show_patches = false 
)

#include <CGAL/IO/File_medit.h>

outputs a mesh complex to the medit (.mesh) file format.

See [12] for a comprehensive description of this file format.

Parameters
osthe output stream
c3t3the mesh complex
rebindif set to true, labels of cells are rebinded into [1..nb_of_labels]
show_patchesif set to true, patches are labeled with different labels than cells. If set to false, each surface facet is written twice, using the label of each adjacent cell.
Examples:
Mesh_3/mesh_implicit_domains.cpp, and Mesh_3/mesh_implicit_domains_2.cpp.

◆ output_to_tetgen()

template<class C3T3 >
void CGAL::IO::output_to_tetgen ( std::string  filename,
const C3T3 &  c3t3,
bool  rebind = false,
bool  show_patches = false 
)

#include <CGAL/IO/File_tetgen.h>

outputs a mesh complex to tetgen format

Parameters
filenamethe path to the output file
c3t3the mesh
rebindif true, labels of cells are rebinded into [1..nb_of_labels]
show_patchesif true, patches are labeled with different labels than cells. If false, each surface facet is written twice, using label of each adjacent cell.
See also
Tetgen File Format

◆ output_to_vtu()

template<class C3T3 >
void CGAL::IO::output_to_vtu ( std::ostream &  os,
const C3T3 &  c3t3,
IO::Mode  mode = BINARY 
)

#include <CGAL/IO/output_to_vtu.h>

writes a tetrahedron mesh using the UnstructuredGrid XML format.

Template Parameters
C3T3a model of MeshComplexWithFeatures_3InTriangulation_3.
Parameters
osthe stream used for writing.
c3t3the instance of C3T3 to be written.
modedecides if the data should be written in binary (IO::BINARY) or in ASCII (IO::ASCII).
Examples:
Mesh_3/mesh_polyhedral_domain_with_features.cpp.