[Gmsh] outward normal of surface triangles

Negi, Ashish ashish.negi at honeywell.com
Thu May 3 11:03:54 CEST 2012


Hi Mark,

Thanks for replying.

Yes, I can change each triangles orientation if their normal happens to be inward. For that I have to know if it is really inward and I can know that by checking if the 4th vertex of TET (whose face is given triagnle) is in the direction of computed normal. This is what I am going to do now.

Thanks,
Ashish

-----Original Message-----
From: Mark Starnes [mailto:mark.starnes at fttech.co.uk] 
Sent: Thursday, May 03, 2012 1:22 PM
To: Negi, Ashish
Cc: Ashish Garg; gmsh at geuz.org
Subject: Re: [Gmsh] outward normal of surface triangles

Hi Ashish,

Does it help if you change the sign of every line entry number
in the Plane Surface definition that is a problem?

Best regards,

Mark.

On Thu, May 03, 2012 at 06:23:34AM +0000, Negi, Ashish wrote:
> Hi Ashish,
> 
>  
> 
> Thanks for replying.
> 
>  
> 
> Let me explain my problem again. I have attached 3 pictures below. First, shows
> a Tetrahedral mesh of square duct. So, all surface elements are Triangle.
> Second, shows normal vectors computed using cross product if Triangle vertices
> are saved in clockwise sense (in the picture). Third, shows normal vector
> computed if Triangle vertices are saved in anti-clockwise sense. So, second
> picture gives me outward normal which I need.
> 
>  
> 
> I found that all Triangles do not give me outward normals if I assume clockwise
> sense (in following picture). So, I wanted to know if GMSH has some other way
> to provide me outward normal for each surface Triangle.
> 
> [cid]   [cid]
> 
>  
> 
> Thanks,
> 
> Ashish
> 
>  
> 
> From: Ashish Garg [mailto:ashish.garg.iisc at gmail.com]
> Sent: Wednesday, May 02, 2012 1:09 PM
> To: Negi, Ashish
> Cc: gmsh at geuz.org
> Subject: Re: [Gmsh] outward normal of surface triangles
> 
>  
> 
> Hi Ashish
> 
> give the condition that the cross product should be greater than zero. I guess
> it will resolve the problem.
> 
> Ashish Garg
> 
> On Wed, May 2, 2012 at 12:38 PM, Negi, Ashish <ashish.negi at honeywell.com>
> wrote:
> 
> Hello Everyone,
> 
>  
> 
> I?ve been using GMSH library to open Nastran BDF file and extract mesh data for
> my software. I generally load a mesh consisting of only Tetrahedra. Hence,
> surface of model have only Triangle elements.
> 
>  
> 
> I want to find outward normal at each Triangle. I get coordinates of each
> Triangle and then take cross product to get normal to the element. But, I?m not
> sure if it will always be outward. Can someone suggest a solution to this
> problem?
> 
>  
> 
> Thanks,
> 
> Ashish
> 
>  
> 
>  
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 
>  
> 




> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh


-- 
Dr. Mark Starnes
Principal Physicist
FT Technologies
Church Lane
Teddington
TW11 8PA

web:  www.fttech.co.uk
DDI:  0208 614 2730