<div><br></div><blockquote class="protonmail_quote" type="cite"><div>Does gmsh script support custom functions? I cannot find any guides to writing custom functions in gmsh manual<br></div></blockquote><div><br></div><div>Not really, no.  There is 'Macro' (which I think used to be called 'Function'), but no.<br></div><div><br></div><div>    <a href="http://gmsh.info/dev/doc/texinfo/gmsh.html#User_002ddefined-macros">http://gmsh.info/dev/doc/texinfo/gmsh.html#User_002ddefined-macros</a><br></div><div><br></div><div>But there is the Gmsh API which can be used instead of writing a GEO file<br></div><div><br></div><div>    <a href="http://gmsh.info/dev/doc/texinfo/gmsh.html#Gmsh-API">http://gmsh.info/dev/doc/texinfo/gmsh.html#Gmsh-API</a><br></div><div><br></div><div>Before that came along, the best approach was generating the GEO file in an external script, e.g. Python.  A formalization of this which I still use myself is pygmsh.<br></div><div><br></div><div>    <a href="https://github.com/nschloe/pygmsh/">https://github.com/nschloe/pygmsh/</a><br></div><div><br></div>