[Gmsh] How does GMSH know which side of a surface is the INside?

John Villarrubia John.Villarrubia at nist.gov
Fri Jul 17 17:23:38 CEST 2015


Thank you. I had not noticed the earlier conversation.

I have never seen GMSH erroneously try to mesh the outside of a simple 
structure, so if it is guessing, it seems the guesses are not entirely 
random. The observation that normals of some volume faces point outward 
while others point inward even when the GMSH GUI itself constructs the 
specification means GMSH obviously does not require the orientations to 
be consistently specified on input. It must resolve this internally 
somehow after reading the input.

It could do this partly by requiring the edge where 2 surfaces meet to 
appear once with positive sign and once with negative. I think this 
guarantees that all line loops have the same orientation. That, however, 
leaves still the one remaining ambiguity: they could all be inward 
pointing or all outward.

The test you suggested (sign of dot product of normal vector and vector 
to the center of the volume) at the end of the previous discussion would 
work for convex shapes but not for all non-convex ones. For example, if 
you draw a border around the letter I, the outward normal on the 
underside of the overhang points generally *toward* the center, not away 
from it. GMSH must use some other algorithm.

I am wondering if this algorithm is robust, even for very complicated 
shapes.

John

On 7/16/2015 11:02 AM, Theler German Guillermo wrote:
> There was a thread about this issue early this year:
>
> http://www.geuz.org/pipermail/gmsh/2015/009481.html
> http://www.geuz.org/pipermail/gmsh/2015/009514.html
> http://www.geuz.org/pipermail/gmsh/2015/009519.html
>
> My conclusion is that Gmsh does not know, it just guesses (see one of my
> attachments in the last link) but perhaps I am wrong and I am the one
> getting it wrong.
>
> --
> Germán Theler :: CTO Ingeniería & TICs
>
> CITES – Centro de Innovación Tecnológica Empresarial y Social S.A.
> Dirección General Sancor Seguros
> Grupo Sancor Seguros
> tel +54 3493 –428 500 – Int.: 3374
> gtheler at cites-gss.com
> www.cites-gss.com - www.gruposancorseguros.com
>
>
>
> On Thu, 2015-07-16 at 09:29 -0400, John Villarrubia wrote:
>> Hello everyone,
>>
>> I note in the documentation that line loops are oriented, and in writing
>> a script to creates a .geo file I was careful to orient all my line
>> loops clockwise when viewed from inside. However, I have since noticed
>> that when I define a simple structure (e.g., a cube) using the GMSH GUI,
>> the .geo file it produces has some of the sides clockwise and some
>> counter-clockwise.
>>
>> That being the case, how does GMSH know which side of a face is the
>> inside of my cube and which the outside?
>>
>> John
>>
>>
>>
>> _______________________________________________
>> gmsh mailing list
>> gmsh at geuz.org
>> http://www.geuz.org/mailman/listinfo/gmsh
> ________________________________
>   Imprima este mensaje sólo si es absolutamente necesario.
> Para imprimir, en lo posible utilice el papel de ambos lados.
> El Grupo Sancor Seguros se compromete con el cuidado del medioambiente.
>
>
>
> ************AVISO DE CONFIDENCIALIDAD************
>
> El Grupo Sancor Seguros comunica que:
>
> Este mensaje y todos los archivos adjuntos a el son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por ley. Si usted recibió este mensaje erróneamente, por favor notifíquenos respondiendo al remitente, borre el mensaje original y destruya las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo. Todas las opiniones contenidas en este mail son propias del autor del mensaje. La publicación, uso, copia o impresión total o parcial de este mensaje o documentos adjuntos queda prohibida.
>
> Disposición DNDP 10-2008. El titular de los datos personales tiene la facultad de ejercer el derecho de acceso a los mismos en forma gratuita a intervalos no inferiores a seis meses, salvo que acredite un interés legítimo al efecto conforme lo establecido en el artículo 14, inciso 3 de la Ley 25.326. La DIRECCIÓN NACIONAL DE PROTECCIÓN DE DATOS PERSONALES, Organo de Control de la Ley 25.326, tiene la atribución de atender las denuncias y reclamos que se interpongan con relación al incumplimiento de las normas sobre la protección de datos personales.
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh