[Gmsh] addFace return nullptr

Agnese, Marco m.agnese13 at imperial.ac.uk
Thu Jun 5 14:02:29 CEST 2014


I fixed the problem using the function addPlanarFace and passing the lines loop. 
But I also would like know why with addFace it doesn't work.
Cheers,
Marco 
________________________________________
From: Agnese, Marco
Sent: Thursday, June 05, 2014 12:36 PM
To: gmsh at geuz.org
Subject: addFace return nullptr

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