<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:tax="http://schemas.microsoft.com/sharepoint/taxonomy/soap/" xmlns:spsup="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap: break-word;-webkit-nbsp-mode: space;line-break:after-white-space">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Christophe,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">it would be indeed a valuable feature if there is a command to reorient surfaces of volumes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">automatically in a way that the normal is pointing outwards, as it would help to set the natural<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">boundary conditions with the correct sign :-)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Have a nice weekend<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Michael<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="DE" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="DE" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> gmsh [mailto:gmsh-bounces@ace20.montefiore.ulg.ac.be]
<b>On Behalf Of </b>Christophe Geuzaine<br>
<b>Sent:</b> Thursday, May 17, 2018 5:35 PM<br>
<b>To:</b> Anderson Gabriel Santiago<br>
<b>Cc:</b> gmsh@onelab.info<br>
<b>Subject:</b> Re: [Gmsh] [GMSH] Surface mesh for 3D solids<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 17 May 2018, at 15:07, Anderson Gabriel Santiago <<a href="mailto:agasantiago.usp@gmail.com">agasantiago.usp@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">Thank you for your response. But that is quite unexpected, since the normal vectors define the volume.
<o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">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.<o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">You can use the "Reverse Surface" to get the mesh oriented the way you want. For your example:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">SetFactory("OpenCASCADE");<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Point(1) = {0, 0, 0, 1.0};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Point(2) = {1, 0, 0, 1.0};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Point(3) = {1, 1, 0, 1.0};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Point(4) = {0, 1, 0, 1.0};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Point(5) = {0, 0, 1, 1.0};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Point(6) = {1, 0, 1, 1.0};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Point(7) = {1, 1, 1, 1.0};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Point(8) = {0, 1, 1, 1.0};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(1) = {1, 2};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(2) = {2, 6};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(3) = {6, 5};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(4) = {5, 1};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(5) = {5, 8};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(6) = {8, 4};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(7) = {4, 1};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(8) = {8, 7};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(9) = {7, 3};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(10) = {3, 4};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(11) = {6, 7};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line(12) = {3, 2};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line Loop(1) = {4, -7, -6, -5};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Plane Surface(1) = {1};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line Loop(2) = {2, 11, 9, 12};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Plane Surface(2) = {2};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line Loop(3) = {3, 5, 8, -11};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Plane Surface(3) = {3};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line Loop(4) = {10, 7, 1, -12};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Plane Surface(4) = {4};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line Loop(5) = {9, 10, -6, 8};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Plane Surface(5) = {5};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Line Loop(6) = {3, 4, 1, 2};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Plane Surface(6) = {6};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Surface Loop(1) = {4, 5, 2, 6, 3, 1};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Volume(1) = {1};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Reverse Surface{1:4};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Physical Surface(1) = {6};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Physical Surface(2) = {4, 2, 3, 1};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Physical Surface(3) = {5};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Physical Volume(4) = {1};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Christophe<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">Thanks in advance,<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">On Thu, May 17, 2018 at 3:54 AM, Christophe Geuzaine<span class="apple-converted-space"> </span><<a href="mailto:geuzaine@gmail.com" target="_blank">geuzaine@gmail.com</a>><span class="apple-converted-space"> </span>wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""><br>
<br>
> On 16 May 2018, at 00:28, Anderson Gabriel Santiago <<a href="mailto:agasantiago.usp@gmail.com">agasantiago.usp@gmail.com</a>> wrote:<br>
><span class="apple-converted-space"> </span><br>
> Dear all,<br>
><span class="apple-converted-space"> </span><br>
> I am using GMSH to create a 3D surface mesh. For some unknown reason, some normal vectors points inwards, not outwards,<br>
<br>
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>
<br>
Christophe<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""><br>
<br>
> as I would expect, since I defined a solid limited by plane surfaces.<br>
><span class="apple-converted-space"> </span><br>
> Here is the GEO file I created using the GMSH GUI.<br>
><span class="apple-converted-space"> </span><br>
><span class="apple-converted-space"> </span><br>
> // Gmsh project created on Tue May 15 19:19:43 2018<br>
> SetFactory("OpenCASCADE");<br>
> //+<br>
> Point(1) = {0, 0, 0, 1.0};<br>
> //+<br>
> Point(2) = {1, 0, 0, 1.0};<br>
> //+<br>
> Point(3) = {1, 1, 0, 1.0};<br>
> //+<br>
> Point(4) = {0, 1, 0, 1.0};<br>
> //+<br>
> Point(5) = {0, 0, 1, 1.0};<br>
> //+<br>
> Point(6) = {1, 0, 1, 1.0};<br>
> //+<br>
> Point(7) = {1, 1, 1, 1.0};<br>
> //+<br>
> Point(8) = {0, 1, 1, 1.0};<br>
> //+<br>
> Line(1) = {1, 2};<br>
> //+<br>
> Line(2) = {2, 6};<br>
> //+<br>
> Line(3) = {6, 5};<br>
> //+<br>
> Line(4) = {5, 1};<br>
> //+<br>
> Line(5) = {5, 8};<br>
> //+<br>
> Line(6) = {8, 4};<br>
> //+<br>
> Line(7) = {4, 1};<br>
> //+<br>
> Line(8) = {8, 7};<br>
> //+<br>
> Line(9) = {7, 3};<br>
> //+<br>
> Line(10) = {3, 4};<br>
> //+<br>
> Line(11) = {6, 7};<br>
> //+<br>
> Line(12) = {3, 2};<br>
> //+<br>
> Line Loop(1) = {4, -7, -6, -5};<br>
> //+<br>
> Plane Surface(1) = {1};<br>
> //+<br>
> Line Loop(2) = {2, 11, 9, 12};<br>
> //+<br>
> Plane Surface(2) = {2};<br>
> //+<br>
> Line Loop(3) = {3, 5, 8, -11};<br>
> //+<br>
> Plane Surface(3) = {3};<br>
> //+<br>
> Line Loop(4) = {10, 7, 1, -12};<br>
> //+<br>
> Plane Surface(4) = {4};<br>
> //+<br>
> Line Loop(5) = {9, 10, -6, 8};<br>
> //+<br>
> Plane Surface(5) = {5};<br>
> //+<br>
> Line Loop(6) = {3, 4, 1, 2};<br>
> //+<br>
> Plane Surface(6) = {6};<br>
> //+<br>
> Surface Loop(1) = {4, 5, 2, 6, 3, 1};<br>
> //+<br>
> Volume(1) = {1};<br>
> //+<br>
> Physical Surface(1) = {6};<br>
> //+<br>
> Physical Surface(2) = {4, 2, 3, 1};<br>
> //+<br>
> Physical Surface(3) = {5};<br>
> //+<br>
> Physical Volume(4) = {1};<br>
><span class="apple-converted-space"> </span><br>
> Any help is appreciated.<br>
><span class="apple-converted-space"> </span><br>
> --<span class="apple-converted-space"> </span><br>
> Anderson Gabriel Santiago<br>
><span class="apple-converted-space"> </span><br>
><span class="apple-converted-space"> </span><br>
> ~"If you are depressed,<br>
> you are living in the past.<br>
> If you are anxious,<br>
> you are living in the future.<br>
> If you are at peace,<br>
> you are living in the present."~ - Lao Tzu<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">> _______________________________________________<br>
> gmsh mailing list<br>
><span class="apple-converted-space"> </span><a href="mailto:gmsh@onelab.info">gmsh@onelab.info</a><br>
><span class="apple-converted-space"> </span><a href="http://onelab.info/mailman/listinfo/gmsh" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""><br>
<br clear="all">
<br>
--<span class="apple-converted-space"> </span><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">Anderson Gabriel Santiago, Ph.D., E.E.<br>
Adjunct Professor, Biomedical Engineering - UFABC<br>
<a href="mailto:santiago.eletrica@gmail.com" target="_blank">agasantiago.usp@gmail.com</a><br>
Cel.:<span class="apple-converted-space"> </span><a href="tel:%2811%29%2099801-0881" target="_blank">+55 11 99801-0881</a><br>
<br>
~"If you are depressed,<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> you are living in the past.<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> If you are anxious,<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> you are living in the future.<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> If you are at peace,<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> you are living in the present."~ - Lao Tzu<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>