[Gmsh] Extrude creates bottom surface with inward-pointing normal

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Jan 31 19:02:35 CET 2013


On 19 Oct 2012, at 22:19, Mark Stock <mstock at umich.edu> wrote:

> I am investigating BREP meshes of extruded shapes, and I find that the
> Extrude command create a mesh with the bottom triangles' normals
> pointing inward. Is this normal behavior? If so, how do I flip the
> normals of the bottom triangles such that the whole surface has
> consistent direction?
> 

Hi Mark - You cannot, but you can save the elements with reverse orientation by defining a Physical group with negative sign:

Physical Surface(1) = {-10}; // if 10 is the tag of the elementary surface with "wrong" orientation

Christophe

> r1 = 10.0;      // inner radius
> r2 = 20.0;      // outer radius
> del = 1.0;      // this is triangle resolution
> dist = 5.0;     // extrusion distance
> 
> Mesh.CharacteristicLengthMax = del;
> 
> Point(1) = {0, 0, 0};
> 
> Point(2) = {r1, 0, 0};
> Point(3) = {0, r1, 0};
> Point(4) = {-r1, 0, 0};
> Point(5) = {0, -r1, 0};
> 
> Point(6) = {r2, 0, 0};
> Point(7) = {0, r2, 0};
> Point(8) = {-r2, 0, 0};
> Point(9) = {0, -r2, 0};
> 
> Circle(1) = {2, 1, 3};
> Circle(2) = {3, 1, 4};
> Circle(3) = {4, 1, 5};
> Circle(4) = {5, 1, 2};
> 
> Circle(5) = {6, 1, 7};
> Circle(6) = {7, 1, 8};
> Circle(7) = {8, 1, 9};
> Circle(8) = {9, 1, 6};
> 
> Line Loop(9) = {5,6,7,8};       // outer loop
> Line Loop(10) = {1,2,3,4};      // hole
> 
> Plane Surface(11) = {9,10};
> 
> Extrude {0, 0, dist} {Surface{11};}
> 
> This is an "O" shape, extruded to make a donut/torus. The top and
> sides have consistent normal, but the bottom is backwards. Any
> suggestions to fix this would be appreciated.
> 
> Mark
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine