[Gmsh] addFace return nullptr

Agnese, Marco m.agnese13 at imperial.ac.uk
Thu Jun 5 13:36:00 CEST 2014


Hello GMSH users,
I have a problem with the method addFace of GModel when I try to create a parallelepiped. 
I add the vertex and the lines and everything is correct. 
Than I try to add the faces. For each face I call the function addFace(edges,nodes):
edges is std::vector<GEdge*> of size 4 which contains the edges bounding the face (the orientation of the edges is coherent).
nodes is std::vector<std::vector<double> > of size 4x3 which contains the 4 nodes of the face.
More precisely nodes[i] are the coordinates of the beginning vertex of the i-th edge, 0<=i<=3.
My issue is that addFace return a nullptr and the faces are not present in the GModel. 
Indeed if I dump the GModel I have only points and lines in my file.
What I am doing wrong? 

Thank you very much,
Cheers,
Marco