Dear sir:

I want to get the three vertices of a triangle, but I am confused by the input and output of the function.

MMG2D_Get_triangle(mmgMesh,v0,v1,v2,re,isRequired)

In this function, what is the meaning of “re” and “isRequired”.

Will it return the vertices of all triangle in the mesh?

Regards

# What is the input and output of MMG2D_Get_triangle

**ztdepztdep**#1

**Algiane**#2

Hello,

This function allows to recover only one triangle of the mesh. If you have ** nt** triangles in your mesh, you must call it

**times and it will return the mesh triangles in their numbering order. If you want to get all the triangles of the mesh in one function calling, you must use the MMG2D_Get_triangle**

*nt***s**function.

For the MMG2D_Get_triangle prototype:

- The 3 vertices you are looking for are stored in
,*v0*and*v1*.*v2* - the
field contains the reference of the triangle (its “color”): you need different references to impose different boundary conditions (for references associated to edges) or if you have a multidomain mesh (triangle references);*ref* - the
field allow to recover required entities (which means freezed entities that the remesher is not allowed to remesh);**isRequired** - the
and*ref*field are optional, you can give a null pointer to the function if you dont want to get this informations.*isRequired*

I hope that it will help,

Regards

Algiane