[Gmsh] 3 little questions, with attachement !

Christophe Geuzaine c.geuzaine at ulg.ac.be
Thu May 12 07:50:14 CEST 2005


thierry.gilles at tiscali.nl wrote:
> Hello
> 
> I've got 3 little question, sir..
> 
> I wrote you one year ago about a "normal" problem, and you gave me a satisfying
> solution at that time (I used version 1.46 then).. But the problem is still
> present, even with your (1.46?) solution, now I use the 1.60 version.. :(
> 
> Shortly :
>  I want to master the sense of normals of the elements of a mesh (e.g : all
> directed outwards for a simple closed surface). Obviously, the sense of normals
> depicted in geometry mode doesn't follow the corkscrew rule, so you cannot
> trust this representation to invert signs in a "physical surface". Even worse,
> the sense of the normals of a mesh as depicted after meshing cannot be trusted
> either. It is only the sense of normals as depicted when reopening the SAVED
> .msh file that the normals appear with respect to the corkscrew rule. It
> is only looking at this saved file that it becomes possible to group all
> elementaries in a physical surface WITH THE PROPER SIGN to get all normals
> in the desired sense.. I didn't find that solution optimal at the time, but
> it worked as you said with a cube or a sphere.. (I know I should participate
> and develop a fix myself, but I'm really not that skilled ;( to start dealing
> with your great code..sorry sorry for that ! )
> 
> Today I created a (slightly) complexer shape, using extrusion, symmetry and
> rotation : XPopoComplete.geo.
> There is no way I can get all normals to the exterior this time, even following
> the scheme above !!!
> 
> Question 1 : Can you help me get all normals outwards for this "XPopoComplete"
> example ?

Hello Thierry - The discrepancy in the orientation of the surfaces
has been fixed in version 1.54. I don't see any problems with the
normals in your example: they follow the corkscrew rule for all the
elementary surfaces (you can check this by hovering your mouse over a
surface while displaying the tangents and the normals).

I've attached a slightly modified file with the correct physicals for
exterior oriented normals (XpopoComplete_new.geo).


> 
> Actually, I noted that the use of Rotation respects the orientation of the
> surfaces (Duplicata sense = original sense), but the surfaces orientations
> are inverted with Symmetry.. Quite logical actually, but..
> 
> Question 2 :
>  Is there a way to force the transformations to respect the original surfaces
> orientation, or to globally invert it ?
>  I tried with Physical surface, as you can see, but it won't work this time
> !!
> 
> And a last question : to group in a physical surface surfaces created with
> a transformation is quite a job, as the surface numbers have to be mentioned,
> but they are automatically chosen by the transformation.. The only way out
> I found so far is to represent separately the Duplicata (filtering in "Visibility"),
> read the surface numbers on screen and manually copy them in the .geo file..
>  Goes well for my simple example, but if the Duplicated surface contains
> tens of or even more surfaces, this becomes a heavy task.

Two solutions:

1) select the physical surfaces interactively with the GUI (menu
"Physical->Add->Surface")

2) use the list returned by the transformations. I've attached a
variation of your example that uses that technique
(XpopoComplete_new_auto.geo).

Take care,

Christophe

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: XpopoComplete.tgz
Type: application/x-gzip
Size: 642 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20050511/395ded50/attachment.tgz>