deal2lkit: A ToolKit library for Deal.II
AssimpInterface Namespace Reference

Functions

template<int dim, int spacedim>
bool generate_triangulation (const std::string filename, Triangulation< dim, spacedim > &tria, int mesh_index=-1, bool remove_duplicates=true, double tol=1e-12)
 Read in a file supported by Assimp, and generate a Triangulation out of it. More...
 
template bool generate_triangulation (const string, Triangulation< 1, 1 > &, int, bool, double)
 
template bool generate_triangulation (const string, Triangulation< 1, 2 > &, int, bool, double)
 
template bool generate_triangulation (const string, Triangulation< 1, 3 > &, int, bool, double)
 
template bool generate_triangulation (const string, Triangulation< 2, 2 > &, int, bool, double)
 
template bool generate_triangulation (const string, Triangulation< 2, 3 > &, int, bool, double)
 

Function Documentation

§ generate_triangulation() [1/6]

template<int dim, int spacedim>
bool AssimpInterface::generate_triangulation ( const std::string  filename,
Triangulation< dim, spacedim > &  tria,
int  mesh_index = -1,
bool  remove_duplicates = true,
double  tol = 1e-12 
)

Read in a file supported by Assimp, and generate a Triangulation out of it.

If you specify a mesh_index, only the mesh with the given index will be extracted, otherwise all meshes which are present in the file will be used to generate the Triangulation.

If remove_duplicates is set to true (the default), then duplicated vertices will be removed if their distance is lower than tol.

Only the elements compatible with the given dimension and spacedimension will be extracted from the mesh. All the other elements are simply ignored by this algorithm. If your mesh contains a mixture of triangles and quadrilaterals, for example, only the quadrilaterals will be extracted. Careful that your mesh may not make any sense if you are mixing compatible and incompatible element types.

A message is printed on screen telling you how many elements where ignored. It is your responsability to make sure you feed the right file to this function.

Definition at line 55 of file assimp_interface.cc.

§ generate_triangulation() [2/6]

template bool AssimpInterface::generate_triangulation ( const string  ,
Triangulation< 1, 1 > &  ,
int  ,
bool  ,
double   
)

§ generate_triangulation() [3/6]

template bool AssimpInterface::generate_triangulation ( const string  ,
Triangulation< 1, 2 > &  ,
int  ,
bool  ,
double   
)

§ generate_triangulation() [4/6]

template bool AssimpInterface::generate_triangulation ( const string  ,
Triangulation< 1, 3 > &  ,
int  ,
bool  ,
double   
)

§ generate_triangulation() [5/6]

template bool AssimpInterface::generate_triangulation ( const string  ,
Triangulation< 2, 2 > &  ,
int  ,
bool  ,
double   
)

§ generate_triangulation() [6/6]

template bool AssimpInterface::generate_triangulation ( const string  ,
Triangulation< 2, 3 > &  ,
int  ,
bool  ,
double   
)