<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 17 May 2018, at 15:07, Anderson Gabriel Santiago <<a href="mailto:agasantiago.usp@gmail.com" class="">agasantiago.usp@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class="">Thank you for your response. But that is quite unexpected, since the normal vectors define the volume. </div></div></div></blockquote><div><br class=""></div><div>No: each surface can be connected to two volumes - the "natural" orientation with respect to the first volume will be the opposite one for the other.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class="">So my question is, how can I make all the normal vectors point outward the volume? I am working with boundary element method and the normal vector orientation is really important to the method.</div></div></div></blockquote><div><br class=""></div><div>You can use the "Reverse Surface" to get the mesh oriented the way you want. For your example:</div><div><br class=""></div><div><div>SetFactory("OpenCASCADE");</div><div>Point(1) = {0, 0, 0, 1.0};</div><div>Point(2) = {1, 0, 0, 1.0};</div><div>Point(3) = {1, 1, 0, 1.0};</div><div>Point(4) = {0, 1, 0, 1.0};</div><div>Point(5) = {0, 0, 1, 1.0};</div><div>Point(6) = {1, 0, 1, 1.0};</div><div>Point(7) = {1, 1, 1, 1.0};</div><div>Point(8) = {0, 1, 1, 1.0};</div><div>Line(1) = {1, 2};</div><div>Line(2) = {2, 6};</div><div>Line(3) = {6, 5};</div><div>Line(4) = {5, 1};</div><div>Line(5) = {5, 8};</div><div>Line(6) = {8, 4};</div><div>Line(7) = {4, 1};</div><div>Line(8) = {8, 7};</div><div>Line(9) = {7, 3};</div><div>Line(10) = {3, 4};</div><div>Line(11) = {6, 7};</div><div>Line(12) = {3, 2};</div><div>Line Loop(1) = {4, -7, -6, -5};</div><div>Plane Surface(1) = {1};</div><div>Line Loop(2) = {2, 11, 9, 12};</div><div>Plane Surface(2) = {2};</div><div>Line Loop(3) = {3, 5, 8, -11};</div><div>Plane Surface(3) = {3};</div><div>Line Loop(4) = {10, 7, 1, -12};</div><div>Plane Surface(4) = {4};</div><div>Line Loop(5) = {9, 10, -6, 8};</div><div>Plane Surface(5) = {5};</div><div>Line Loop(6) = {3, 4, 1, 2};</div><div>Plane Surface(6) = {6};</div><div>Surface Loop(1) = {4, 5, 2, 6, 3, 1};</div><div>Volume(1) = {1};</div><div>Reverse Surface{1:4};</div><div>Physical Surface(1) = {6};</div><div>Physical Surface(2) = {4, 2, 3, 1};</div><div>Physical Surface(3) = {5};</div><div>Physical Volume(4) = {1};</div><div class=""><br class=""></div><div class="">There is currently no interface to reorient surfaces automatically. We will probably add this in the future, as we already use such a feature internally for some 3D mesh algorithms.</div></div><div><br class=""></div><div>Christophe</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class=""><br class=""></div><div class="">Thanks in advance,<br class=""></div></div><div class="gmail_extra" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""><div class="gmail_quote">On Thu, May 17, 2018 at 3:54 AM, Christophe Geuzaine<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:geuzaine@gmail.com" target="_blank" class="">geuzaine@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><span class=""><br class=""><br class="">> On 16 May 2018, at 00:28, Anderson Gabriel Santiago <<a href="mailto:agasantiago.usp@gmail.com" class="">agasantiago.usp@gmail.com</a>> wrote:<br class="">><span class="Apple-converted-space"> </span><br class="">> Dear all,<br class="">><span class="Apple-converted-space"> </span><br class="">> I am using GMSH to create a 3D surface mesh. For some unknown reason, some normal vectors points inwards, not outwards,<br class=""><br class=""></span>The mesh is oriented according to the orientation of the geometrical surface - everything is correct in your file. You can check by visualizing both the geometry and the mesh normals (in Tools->Options->Geometry or Mesh->Visibility->Normals)<br class=""><br class="">Christophe<br class=""><div class=""><div class="h5"><br class=""><br class="">> as I would expect, since I defined a solid limited by plane surfaces.<br class="">><span class="Apple-converted-space"> </span><br class="">> Here is the GEO file I created using the GMSH GUI.<br class="">><span class="Apple-converted-space"> </span><br class="">><span class="Apple-converted-space"> </span><br class="">> // Gmsh project created on Tue May 15 19:19:43 2018<br class="">> SetFactory("OpenCASCADE");<br class="">> //+<br class="">> Point(1) = {0, 0, 0, 1.0};<br class="">> //+<br class="">> Point(2) = {1, 0, 0, 1.0};<br class="">> //+<br class="">> Point(3) = {1, 1, 0, 1.0};<br class="">> //+<br class="">> Point(4) = {0, 1, 0, 1.0};<br class="">> //+<br class="">> Point(5) = {0, 0, 1, 1.0};<br class="">> //+<br class="">> Point(6) = {1, 0, 1, 1.0};<br class="">> //+<br class="">> Point(7) = {1, 1, 1, 1.0};<br class="">> //+<br class="">> Point(8) = {0, 1, 1, 1.0};<br class="">> //+<br class="">> Line(1) = {1, 2};<br class="">> //+<br class="">> Line(2) = {2, 6};<br class="">> //+<br class="">> Line(3) = {6, 5};<br class="">> //+<br class="">> Line(4) = {5, 1};<br class="">> //+<br class="">> Line(5) = {5, 8};<br class="">> //+<br class="">> Line(6) = {8, 4};<br class="">> //+<br class="">> Line(7) = {4, 1};<br class="">> //+<br class="">> Line(8) = {8, 7};<br class="">> //+<br class="">> Line(9) = {7, 3};<br class="">> //+<br class="">> Line(10) = {3, 4};<br class="">> //+<br class="">> Line(11) = {6, 7};<br class="">> //+<br class="">> Line(12) = {3, 2};<br class="">> //+<br class="">> Line Loop(1) = {4, -7, -6, -5};<br class="">> //+<br class="">> Plane Surface(1) = {1};<br class="">> //+<br class="">> Line Loop(2) = {2, 11, 9, 12};<br class="">> //+<br class="">> Plane Surface(2) = {2};<br class="">> //+<br class="">> Line Loop(3) = {3, 5, 8, -11};<br class="">> //+<br class="">> Plane Surface(3) = {3};<br class="">> //+<br class="">> Line Loop(4) = {10, 7, 1, -12};<br class="">> //+<br class="">> Plane Surface(4) = {4};<br class="">> //+<br class="">> Line Loop(5) = {9, 10, -6, 8};<br class="">> //+<br class="">> Plane Surface(5) = {5};<br class="">> //+<br class="">> Line Loop(6) = {3, 4, 1, 2};<br class="">> //+<br class="">> Plane Surface(6) = {6};<br class="">> //+<br class="">> Surface Loop(1) = {4, 5, 2, 6, 3, 1};<br class="">> //+<br class="">> Volume(1) = {1};<br class="">> //+<br class="">> Physical Surface(1) = {6};<br class="">> //+<br class="">> Physical Surface(2) = {4, 2, 3, 1};<br class="">> //+<br class="">> Physical Surface(3) = {5};<br class="">> //+<br class="">> Physical Volume(4) = {1};<br class="">><span class="Apple-converted-space"> </span><br class="">> Any help is appreciated.<br class="">><span class="Apple-converted-space"> </span><br class="">> --<span class="Apple-converted-space"> </span><br class="">> Anderson Gabriel Santiago<br class="">><span class="Apple-converted-space"> </span><br class="">><span class="Apple-converted-space"> </span><br class="">> ~"If you are depressed,<br class="">> you are living in the past.<br class="">> If you are anxious,<br class="">> you are living in the future.<br class="">> If you are at peace,<br class="">> you are living in the present."~ - Lao Tzu<br class=""></div></div>> ______________________________<wbr class="">_________________<br class="">> gmsh mailing list<br class="">><span class="Apple-converted-space"> </span><a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><br class="">><span class="Apple-converted-space"> </span><a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank" class="">http://onelab.info/mailman/<wbr class="">listinfo/gmsh</a><br class=""><br class=""></blockquote></div><br class=""><br clear="all" class=""><br class="">--<span class="Apple-converted-space"> </span><br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class="">Anderson Gabriel Santiago, Ph.D., E.E.<br class="">Adjunct Professor, Biomedical Engineering - UFABC<br class=""><a href="mailto:santiago.eletrica@gmail.com" target="_blank" class="">agasantiago.usp@gmail.com</a><br class="">Cel.:<span class="Apple-converted-space"> </span><a href="tel:%2811%29%2099801-0881" value="+5511998010881" target="_blank" class="">+55 11 99801-0881</a><br class=""><br class="">~"If you are depressed,<br class=""></div> you are living in the past.<br class=""></div> If you are anxious,<br class=""></div> you are living in the future.<br class=""></div> If you are at peace,<br class=""></div> you are living in the present."~ - Lao Tzu</div></div></div></div></blockquote></div><br class=""></body></html>