<font color='black' size='2' face='arial'>
<div> <font size="2"><font face="Arial, Helvetica, sans-serif">Many thanks to Dmitrijs and to you for your answers and example.<br>
I did not know neither sed nor awk but I think they will be very helpful.<br>
<br>
Best regards,<br>
<br>
Julien<br>
</font></font></div>
<div> <br>
</div>
<div style="clear: both;"></div>
<div> <br>
</div>
<div> <br>
</div>
<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">-----E-mail d'origine-----<br>
De : Geordie McBain <gdmcbain@freeshell.org><br>
A : heolglaz@aol.com<br>
Cc : gmsh@geuz.org<br>
Envoyé le : Mercredi, 24 Février 2010 0:20<br>
Sujet : Re: [Gmsh] Third coordinate Z not wanted<br>
<br>
<div id="AOLMsgPart_1_8fde7f25-0f47-4418-819b-504bcc51180a" style="margin: 0px; font-family: Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<pre style="font-size: 9pt;"><tt>On Tue, Feb 23, 2010 at 7:14 PM, <<a __removedlink__604190217__href="mailto:heolglaz@aol.com">heolglaz@aol.com</a>> wrote:<br>
> Hi,<br>
><br>
> I would like to use gmsh to perform simple 2D meshes. I use for the moment<br>
> the option -2 in command line, but the dimension in the resulting mesh file<br>
> is still 3. The solver code I use reads .mesh files but does not read the<br>
> 3rd coordinate Z.<br>
> Does anybody knows an option to specify that the 3rd coordinate must not be<br>
> written in the .mesh file ? I searched along the reference manual and<br>
> messages but did not find it out.<br>
<br>
I came across this problem too, for the solver FreeFem++ before it<br>
acquired the ability to read Gmsh's .msh format. I thought about<br>
modifying Gmsh to output two-dimensional MEDIT .mesh files, but I read<br>
in the MEDIT documentation that that wasn't compliant, so I took the<br>
path recommended by D. L. and used a simple script to strip the<br>
spurious third coordinate; Sed would no doubt serve, but I used Gawk.<br>
I attach it in the hope you'll find it useful. Run as "gawk -f<br>
3to2.awk yourmesh3.mesh > yourmesh2.mesh".<br>
</tt></pre>
</div>
<!-- end of AOLMsgPart_1_8fde7f25-0f47-4418-819b-504bcc51180a -->
</div>
</font>