[Gmsh] Translate .GEO to similar code in C++
Bruno Correia da Silva
bcs2 at cin.ufpe.br
Sun Jun 2 11:47:53 CEST 2013
Hello everyone,
I am using the following code block (. GEO Generated with GMSH GUI)
as a reference to do a (.GEO) with an application using the API in
C++.
Point (1) = {-1.8, 0.8, 0, 1};
Point (3) = {5.7, 0.3, 0, 1};
Point (4) = {-2.5, -3.4, 0, 1};
Point (5) = {7, -3.6, 0, 1};
Point (6) = {-0, -1.3, 0, 1};
Point (7) = {0.3, -1.3, 0, 1};
Point (8) = {3.9, -2, 0, 1};
Point (9) = {4.2, -2, 0, 1};
Line (1) = {1, 4};
Line (5) = {4, 5};
Line (8) = {5, 3};
Line (9) = {3, 1};
Circle (10) = {6, 7, 7};
Circle (11) = {8, 9, 9};
Loop line (12) = {9, 1, 5, 8};
Line Loop (13) = {10};
Line Loop (14) = {11};
Surface plane (12) = {12, 13, 14};
My interest is in the last line:
Surface plane (12) = {12, 13, 14};
When I use the function addPlanarFace:
"...
GModel GModel m = new ();
...
* GFaceGMSH gf1 = m-> addPlanarFace (lineLoop1);
... "
My result in (. GEO) is just a lineloop inside the plane surface is :
"Surface plane (12) = {12};"
For an implementation of the palliative outcome i am using
addEmbeddedEdge to add a circle inside my lineloop.
"...
gf1-> addEmbeddedEdge (GC1) / / GC1 is a Gedge
... "
But what have this results generated (. GEO) is:
"...
Point(1) = {0, 0, 0, 1};
Point(2) = {4, 0, 0, 1};
Point(3) = {0, 4, 0, 1};
Point(4) = {4, 4, 0, 1};
Circle (5) = {5, 6, 5};
Circle (6) = {5, 6, 5};
Line Loop (1) = {1, 2, 3, 4};
Plane Surface (1) = {1};
In line Surface {5} {1};
Line {6} In Surface {1};
... "
Please, Could anyone help me on what function should I use to match the result?
Att