[Gmsh] outward normal of surface triangles

Negi, Ashish ashish.negi at honeywell.com
Thu May 3 08:23:34 CEST 2012


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:image002.jpg at 01CD2923.5C91B6E0]   [cid:image006.jpg at 01CD2923.5C91B6E0]

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<mailto: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<mailto:gmsh at geuz.org>
http://www.geuz.org/mailman/listinfo/gmsh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120503/2fb05e25/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 35754 bytes
Desc: image002.jpg
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120503/2fb05e25/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 28345 bytes
Desc: image006.jpg
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120503/2fb05e25/attachment-0001.jpg>