[Gmsh] create points in gmsh from a file

Geordie McBain gdmcbain at freeshell.org
Tue Jul 9 03:13:51 CEST 2013


2013/7/8  <thierry.hocquellet at cea.fr>:
> Hello everybody
>
>
>
> I would like to create many points in gmsh.
>
>
>
> Could you tell me if it’s possible to create points in gmsh from a input
> file.
>
>
>
> In this file, there are x,y,z coordinates of each point. This file could be
> an excel file or a simple text file.
>
>
>
> If it’s not possible, what is the best way to create many points in gmsh ?

As mentioned at http://www.geuz.org/pipermail/gmsh/2012/007206.html, I
don't think Gmsh has any such facility itself, but what works well is
using an AWK (or Python, Perl, ...) script to read the coordinates and
write the input .geo file.  I attach an example.  Run it in the shell
as follows.

   gawk -f polygon.awk rectangle.xy > rectangle.geo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: polygon.awk
Type: application/octet-stream
Size: 871 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130709/e0e70e1c/attachment.awk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rectangle.xy
Type: application/octet-stream
Size: 40 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130709/e0e70e1c/attachment.xy>