diff --git a/api/GenApi.py b/api/GenApi.py
index d22cfb278a1b4d41a6bcecbcb1999b1194f81202..3cec0913dde36353254907e26669b27b5a9a9239 100644
--- a/api/GenApi.py
+++ b/api/GenApi.py
@@ -1,4 +1,4 @@
-import os 
+import textwrap
 class arg:
 
     def __init__(self,name,value,type_cpp,type_c,out):
@@ -74,10 +74,10 @@ def ovectorpair(name,value=None):
     a.c_arg = name_
     a.c_pre = "  gmsh::vector_pair "+name_ +";\n"
     a.c_post = "  pairvector2intptr("+name_+"," + name + ","+name+"_n);\n"
-    a.c = "int** "+name+",size_t* "+name+"_n"
+    a.c = "int** "+name+", size_t* "+name+"_n"
     a.python_pre = name_+", "+name_n+" = POINTER(c_int)(), c_size_t()"
-    a.python_arg = "byref("+name_+"),byref("+name_n+")"
-    a.python_return = "_ovectorpair("+name_+","+name_n+".value)"
+    a.python_arg = "byref("+name_+"), byref("+name_n+")"
+    a.python_return = "_ovectorpair("+name_+", "+name_n+".value)"
     return a
 
 def ovectorstring(name,value=None):
@@ -89,14 +89,14 @@ def ovectorstring(name,value=None):
     a.c_post = "  stringvector2charpp("+name_+"," + name + ","+name+"_n);\n"
     a.c = "char*** "+name+",size_t* "+name+"_n"
     a.python_pre = name_+", "+name_n+" = POINTER(c_char_p)(), c_size_t()"
-    a.python_arg = "byref("+name_+"),byref("+name_n+")"
-    a.python_return = "_ovectorstring("+name_+","+name_n+".value)"
+    a.python_arg = "byref("+name_+"), byref("+name_n+")"
+    a.python_return = "_ovectorstring("+name_+", "+name_n+".value)"
     return a
 
 def ivectorpair(name,value=None):
     a = arg(name,value,"const gmsh::vector_pair &","const int*",False)
     a.c_arg = "intptr2pairvector("+name+","+name+"_n)"
-    a.c = "int* "+name+",size_t "+name+"_n"
+    a.c = "int* "+name+", size_t "+name+"_n"
     a.python_pre = "api_"+name+"_, api"+name+"_n_ = _ivectorpair("+name+")"
     a.python_arg = "api_"+name+"_, api"+name+"_n_"
     return a
@@ -116,7 +116,7 @@ def obool(name,value=None):
 def ivectorint(name,value=None):
     a = arg(name,value,"const std::vector<int> &","const int*",False)
     a.c_arg = "ptr2vector("+name+","+name+"_n)"
-    a.c = "int* "+name+",size_t "+name+"_n"
+    a.c = "int* "+name+", size_t "+name+"_n"
     a.python_pre = "api_"+name+"_, api"+name+"_n_ = _ivectorint("+name+")"
     a.python_arg = "api_"+name+"_, api"+name+"_n_"
     return a
@@ -128,7 +128,7 @@ def ovectorint(name,value=None):
     a.c_arg = name_
     a.c_pre = "  std::vector<int> "+name_ +";\n"
     a.c_post = "  vector2ptr("+name_+"," + name + ","+name+"_n);\n"
-    a.c = "int** "+name+",size_t* "+name+"_n"
+    a.c = "int** "+name+", size_t* "+name+"_n"
     a.python_pre = name_+", "+name_n+" = POINTER(c_int)(), c_size_t()"
     a.python_arg = "byref("+name_+"),byref("+name_n+")"
     a.python_return = "_ovectorint("+name_+","+name_n+".value)"
@@ -137,7 +137,7 @@ def ovectorint(name,value=None):
 def ivectordouble(name,value=None):
     a = arg(name,value,"const std::vector<double> &","double**",False)
     a.c_arg = "ptr2vector("+name+","+name+"_n)"
-    a.c  = "double* "+name+",size_t "+name+"_n"
+    a.c  = "double* "+name+", size_t "+name+"_n"
     a.python_pre = "api_"+name+"_, api"+name+"_n_ = _ivectordouble("+name+")"
     a.python_arg = "api_"+name+"_, api"+name+"_n_"
     return a
@@ -149,7 +149,7 @@ def ovectordouble(name,value=None):
     a.c_arg = name_
     a.c_pre = "  std::vector<double> "+a.c_arg +";\n"
     a.c_post = "  vector2ptr("+name_+"," + name + ","+name+"_n);\n"
-    a.c  = "double** "+name+",size_t* "+name+"_n"
+    a.c  = "double** "+name+", size_t* "+name+"_n"
     a.python_pre = name_+", "+name_n+" = POINTER(c_double)(), c_size_t()"
     a.python_arg = "byref("+name_+"),byref("+name_n+")"
     a.python_return = "_ovectordouble("+name_+","+name_n+".value)"
@@ -163,7 +163,7 @@ def ovectorvectorint(name,value=None):
     a.c_arg = name_
     a.c_pre = "  std::vector<std::vector<int> > "+a.c_arg +";\n"
     a.c_post = "  vectorvector2ptrptr("+name_+"," + name + ","+name+"_n,"+name+"_nn);\n"
-    a.c  = "int*** "+name+",size_t** "+name+"_n,size_t *"+name+"_nn"
+    a.c  = "int*** "+name+", size_t** "+name+"_n, size_t *"+name+"_nn"
     a.python_pre = name_+", "+name_n+", "+name_nn +" = POINTER(POINTER(c_int))(), POINTER(c_size_t)(), c_size_t()"
     a.python_arg = "byref("+name_+"),byref("+name_n+"),byref("+name_nn+")"
     a.python_return = "_ovectorvectorint("+name_+","+name_n+","+name_nn+")"
@@ -177,7 +177,7 @@ def ovectorvectorpair(name,value=None):
     a.c_arg = name_
     a.c_pre = "  std::vector<gmsh::vector_pair >"+name_ +";\n"
     a.c_post = "  pairvectorvector2intptrptr("+name_+"," + name + ","+name+"_n,"+name+"_nn);\n"
-    a.c  = "int*** "+name+",size_t** "+name+"_n,size_t *"+name+"_nn"
+    a.c  = "int*** "+name+", size_t** "+name+"_n, size_t *"+name+"_nn"
     a.python_pre = name_+", "+name_n+", "+name_nn +" = POINTER(POINTER(c_int))(), POINTER(c_size_t)(), c_size_t()"
     a.python_arg = "byref("+name_+"),byref("+name_n+"),byref("+name_nn+")"
     a.python_return = "_ovectorvectorpair("+name_+","+name_n+","+name_nn+")"
@@ -185,16 +185,17 @@ def ovectorvectorpair(name,value=None):
 
 class Module:
 
-    def __init__(self,name):
+    def __init__(self,name,doc):
         self.name = name
+        self.doc = doc
         self.fs = []
         self.submodules = []
 
-    def add(self,rtype,name,*args):
-        self.fs.append((rtype,name,args))
+    def add(self,name,doc,rtype,*args):
+        self.fs.append((rtype,name,args,doc))
 
-    def add_module(self, name) :
-        module = Module(name)
+    def add_module(self, name,doc) :
+        module = Module(name,doc)
         self.submodules.append(module)
         return module
 
@@ -461,22 +462,26 @@ class API:
     def __init__(self):
         self.modules = []
 
-    def add_module(self,name):
-        module = Module(name)
+    def add_module(self,name,doc):
+        module = Module(name,doc)
         self.modules.append(module)
         return module
 
     def write_cpp(self):
         def write_module(module,indent) :
-            f.write(indent+"namespace "+module.name +" {\n")
+            f.write("\n"+indent+"namespace "+module.name +" { // " + module.doc + "\n\n")
             indent += "  "
-            for rtype,name,args in module.fs:
+            for rtype,name,args,doc in module.fs:
+                f.write("\n")
+                f.write(indent+"// "+("\n"+indent+"// ").join(textwrap.wrap(doc,75))+"\n\n")
                 rt = rtype.rtype_cpp if rtype else "void"
-                f.write(indent+"GMSH_API " + rt + " " + name + "("+",".join(
-                    list((a.cpp for a in args)))+");\n")
+                f.write(indent+"GMSH_API " + rt + " " + name + "(")
+                if args :
+                    f.write("\n"+indent+"    " +(",\n"+indent+"    ").join(a.cpp for a in args))
+                f.write(");\n\n")
             for m in module.submodules :
                 write_module(m, indent)
-            f.write(indent[:-2]+"} // namespace "+ module.name+"\n")
+            f.write(indent[:-2]+"} // namespace "+ module.name+"\n\n")
         with open("gmsh.h","w") as f:
             f.write(cpp_header)
             for m in self.modules:
@@ -484,22 +489,18 @@ class API:
             f.write(cpp_footer)
 
     def write_c(self):
-        def c_fun_name(module, f) :
-            n = "gmshc"
-            if module :
-                n += module[0].upper() + module[1:]
-            return n + f[0].upper() + f[1:]
         def write_module(module,c_namespace,cpp_namespace) :
             cpp_namespace += module.name+"::"
             if c_namespace :
                 c_namespace += module.name[0].upper()+module.name[1:]
             else :
                 c_namespace = module.name
-            for rtype,name,args in module.fs:
+            for rtype,name,args,doc in module.fs:
                 fname = c_namespace + name[0].upper()+name[1:]
+                f.write("\n/* "+"\n * ".join(textwrap.wrap(doc,75))+" */\n")
                 f.write("GMSH_API "+(rtype.rtype_c if rtype else "void"))
-                f.write(" "+fname+"("
-                        +",".join(list((a.c for a in args+(oint("ierr"),))))
+                f.write(" "+fname+"(\n            "
+                        +",\n            ".join(list((a.c for a in args+(oint("ierr"),))))
                         + ");\n")
                 fc.write(rtype.rtype_c if rtype else "void")
                 fc.write(" "+fname+"("
@@ -532,29 +533,40 @@ class API:
                 f.write(c_footer)
 
     def write_python(self) :
-        def write_function(f,rtype, name, args, modulepath,indent):
+        def write_function(f,rtype, name, args, doc, modulepath,indent):
             iargs = list(a for a in args if not a.out)
             oargs = list(a for a in args if a.out)
             f.write("\n"+indent+"def "+name+"("
                     +",".join((a.name for a in iargs))
                     +"):\n")
+            indent += "    "
+            f.write(indent+'"""\n')
+            f.write(indent+("\n"+indent).join(textwrap.wrap(doc,75))+"\n")
+            if rtype or oargs :
+                f.write("\n"+indent+"return " + ", ".join(
+                    ([rtype.rtype_c] if rtype else[])
+                    +[a.name for a in oargs])
+                +"\n")
+            f.write(indent+'"""\n')
             for a in args :
-                if a.python_pre : f.write(indent+"    "+a.python_pre+"\n")
-            f.write(indent+"    ierr = c_int()\n")
-            f.write(indent+"    api__result__ = " if rtype is oint else ("    "+indent))
+                if a.python_pre : f.write(indent+a.python_pre+"\n")
+            f.write(indent+"ierr = c_int()\n")
+            f.write(indent+"api__result__ = " if rtype is oint else (indent))
             c_name = modulepath + name[0].upper()+name[1:]
-            f.write("lib."+c_name+"(\n        "+indent
-                    +(",\n"+indent+"        ").join(tuple((a.python_arg for a in args))+("byref(ierr)",))
+            f.write("lib."+c_name+"(\n    "+indent
+                    +(",\n"+indent+"    ").join(tuple((a.python_arg for a in args))+("byref(ierr)",))
                     +")\n")
-            f.write(indent+"    if ierr.value != 0 :\n")
-            f.write(indent+"        raise ValueError(\""+c_name+" returned non-zero error code : \"+ str(ierr.value))\n")
+            f.write(indent+"if ierr.value != 0 :\n")
+            f.write(indent+"    raise ValueError(\n")
+            f.write(indent+"        \""+c_name+" returned non-zero error code : \",\n")
+            f.write(indent+"        ierr.value)\n")
             r = (["api__result__"]) if rtype else []
             r += list((o.python_return for o in oargs))
             if len(r) != 0 :
                 if len(r) == 1 :
-                    f.write(indent+"    return "+r[0]+"\n")
+                    f.write(indent+"return "+r[0]+"\n")
                 else :
-                    f.write(indent+"    return (\n        "+",\n        ".join(r)+")\n")
+                    f.write(indent+"return (\n"+indent+"    "+(",\n"+indent+"    ").join(r)+")\n")
         def write_module(f,m,modulepath,indent) :
             if modulepath :
                 modulepath += m.name[0].upper()+m.name[1:]
@@ -564,7 +576,11 @@ class API:
                 write_function(f,*fun,modulepath,indent)
             for module in m.submodules :
                 f.write("\n\n"+indent + "class " + module.name + ":\n")
-                write_module(f,module,modulepath,indent+"    ")
+                indentm = indent + "    "
+                f.write(indentm+'"""\n')
+                f.write(indentm+("\n"+indentm).join(textwrap.wrap(module.doc,75))+"\n")
+                f.write(indentm+'"""\n')
+                write_module(f,module,modulepath,indentm)
         with open("gmsh.py","w") as f :
             f.write(python_header)
             for module in self.modules:
diff --git a/api/extract.py b/api/extract.py
index 03fe805658ed747f8e289467041e74d0571fe4a4..6a0363540eedbfe8dc67e3d1195bc2f51323640f 100644
--- a/api/extract.py
+++ b/api/extract.py
@@ -1,3 +1,4 @@
+import textwrap
 tmap = {
         'int':'iint',
         'char**':'icharpp',
@@ -31,7 +32,7 @@ def parse_arg(a) :
     typ = a[:p+1].replace(" ","")
     return tmap[typ]+"('"+name+"'"+((",'"+value+"'") if value else "")+")"
 
-def parse_fun(f,fun,namespace) :
+def parse_fun(f,fun,namespace,doc) :
     iarg =fun.find("(")
     earg =fun.rfind(")")
     pre = fun[:iarg]
@@ -46,14 +47,18 @@ def parse_fun(f,fun,namespace) :
         raise NameError("Unknown return type : ", t)
     if (args == ['']) :
         args = []
+    #f.write("\ndoc = (\n"
+    #        "'''"+" '''\n'''".join(textwrap.wrap(doc))+"'''\n)\n")
+    f.write("\ndoc = '''"+doc+"'''\n")
     if (name in ["initialize","setElements","addModelData"]) :
         f.write("#")
-    f.write(namespace+".add("+",".join([ret,"'"+name+"'"]+[parse_arg(a) for a in args])+")\n")
+    f.write(namespace+".add("+",".join(["'"+name+"'","doc",ret]+[parse_arg(a) for a in args])+")\n")
 
 namespace = ["api"]
 
 with open("../Common/gmsh.h") as f :
     with open("gen.py","w") as fo :
+        current_doc = ""
         fo.write("from GenApi import *\n\napi = API()\n")
         ls = f.readlines()
         i = 0
@@ -70,14 +75,22 @@ with open("../Common/gmsh.h") as f :
                     i += 1
                     f += " " + l
                 try :
-                    parse_fun(fo,f,namespace[-1])
+                    parse_fun(fo,f,namespace[-1],current_doc)
                 except :
                     raise NameError(f)
+            elif l[:2] == "//":
+                current_doc = l[2:].strip()
+                while ls[i].strip()[:2]== "//":
+                    current_doc += ls[i].strip()[2:]
+                    i += 1
             elif w[0] == "namespace" :
-                fo.write("\n"+w[1]+" = "+namespace[-1]+".add_module('"+w[1]+"')\n")
+                doc = " ".join(w[4:])
+                fo.write("\n"+w[1]+" = "+namespace[-1]+".add_module('"+w[1]+"','"+doc+"')\n")
                 namespace += [w[1]]
+                current_doc = ""
             elif w[0] == "}" :
                 namespace.pop()
+        fo.write("\n")
         fo.write("api.write_cpp()\n")
         fo.write("api.write_c()\n")
         fo.write("api.write_python()\n")
diff --git a/api/gen.py b/api/gen.py
index 37c1e5f5195d9660b4b4da3e4abdb548f5a9db48..4c02099368394c6f526ae02198bb6489f13f85e9 100644
--- a/api/gen.py
+++ b/api/gen.py
@@ -2,157 +2,422 @@ from GenApi import *
 
 api = API()
 
-gmsh = api.add_module('gmsh')
-#gmsh.add(None,'initialize',iint('argc','0'),icharpp('argv','0'))
-gmsh.add(None,'finalize')
-gmsh.add(None,'open',istring('fileName'))
-gmsh.add(None,'merge',istring('fileName'))
-gmsh.add(None,'write',istring('fileName'))
-gmsh.add(None,'clear')
-
-option = gmsh.add_module('option')
-option.add(None,'setNumber',istring('name'),idouble('value'))
-option.add(None,'getNumber',istring('name'),odouble('value'))
-option.add(None,'setString',istring('name'),istring('value'))
-option.add(None,'getString',istring('name'),ostring('value'))
-
-model = gmsh.add_module('model')
-model.add(None,'add',istring('name'))
-model.add(None,'remove')
-model.add(None,'list',ovectorstring('names'))
-model.add(None,'setCurrent',istring('name'))
-model.add(None,'getEntities',ovectorpair('dimTags'),iint('dim','-1'))
-model.add(None,'getPhysicalGroups',ovectorpair('dimTags'),iint('dim','-1'))
-model.add(None,'getEntitiesForPhysicalGroup',iint('dim'),iint('tag'),ovectorint('tags'))
-model.add(oint,'addPhysicalGroup',iint('dim'),ivectorint('tags'),iint('tag','-1'))
-model.add(None,'setPhysicalName',iint('dim'),iint('tag'),istring('name'))
-model.add(None,'getPhysicalName',iint('dim'),iint('tag'),ostring('name'))
-model.add(None,'getBoundary',ivectorpair('dimTags'),ovectorpair('outDimTags'),ibool('combined','true'),ibool('oriented','true'),ibool('recursive','false'))
-model.add(None,'getEntitiesInBoundingBox',idouble('xmin'),idouble('ymin'),idouble('zmin'),idouble('xmax'),idouble('ymax'),idouble('zmax'),ovectorpair('tags'),iint('dim','-1'))
-model.add(None,'getBoundingBox',iint('dim'),iint('tag'),odouble('xmin'),odouble('ymin'),odouble('zmin'),odouble('xmax'),odouble('ymax'),odouble('zmax'))
-model.add(oint,'addDiscreteEntity',iint('dim'),iint('tag','-1'),ivectorint('boundary','std::vector<int>()'))
-model.add(None,'removeEntities',ivectorpair('dimTags'),ibool('recursive','false'))
-
-mesh = model.add_module('mesh')
-mesh.add(None,'generate',iint('dim'))
-mesh.add(None,'getLastEntityError',ovectorpair('dimTags'))
-mesh.add(None,'getLastVertexError',ovectorint('vertexTags'))
-mesh.add(None,'getVertices',iint('dim'),iint('tag'),ovectorint('vertexTags'),ovectordouble('coord'),ovectordouble('parametricCoord'))
-mesh.add(None,'getElements',iint('dim'),iint('tag'),ovectorint('types'),ovectorvectorint('elementTags'),ovectorvectorint('vertexTags'))
-mesh.add(None,'setVertices',iint('dim'),iint('tag'),ivectorint('vertexTags'),ivectordouble('coord'),ivectordouble('parametricCoord','std::vector<double>()'))
-#mesh.add(None,'setElements',iint('dim'),iint('tag'),ivectorint('types'),ivectorvectorint('elementTags'),ivectorvectorint('vertexTags'))
-mesh.add(None,'getVertex',iint('vertexTag'),ovectordouble('coord'),ovectordouble('parametricCoord'))
-mesh.add(None,'getElement',iint('elementTag'),oint('type'),ovectorint('vertexTags'))
-mesh.add(None,'setSize',ivectorpair('dimTags'),idouble('size'))
-mesh.add(None,'setTransfiniteLine',iint('tag'),iint('numVertices'),istring('type','"Progression"'),idouble('coef','1.'))
-mesh.add(None,'setTransfiniteSurface',iint('tag'),istring('arrangement','"Left"'),ivectorint('cornerTags','std::vector<int>()'))
-mesh.add(None,'setTransfiniteVolume',iint('tag'),ivectorint('cornerTags','std::vector<int>()'))
-mesh.add(None,'setRecombine',iint('dim'),iint('tag'))
-mesh.add(None,'setSmoothing',iint('dim'),iint('tag'),iint('val'))
-mesh.add(None,'setReverse',iint('dim'),iint('tag'),ibool('val','true'))
-mesh.add(None,'embed',iint('dim'),ivectorint('tags'),iint('inDim'),iint('inTag'))
-
-field = mesh.add_module('field')
-field.add(oint,'add',istring('type'),iint('tag','-1'))
-field.add(None,'remove',iint('tag'))
-field.add(None,'setNumber',iint('tag'),istring('option'),idouble('value'))
-field.add(None,'setString',iint('tag'),istring('option'),istring('value'))
-field.add(None,'setNumbers',iint('tag'),istring('option'),ivectordouble('value'))
-field.add(None,'setAsBackground',iint('tag'))
-
-geo = model.add_module('geo')
-geo.add(oint,'addPoint',idouble('x'),idouble('y'),idouble('z'),idouble('meshSize','0.'),iint('tag','-1'))
-geo.add(oint,'addLine',iint('startTag'),iint('endTag'),iint('tag','-1'))
-geo.add(oint,'addCircleArc',iint('startTag'),iint('centerTag'),iint('endTag'),iint('tag','-1'),idouble('nx','0.'),idouble('ny','0.'),idouble('nz','0.'))
-geo.add(oint,'addEllipseArc',iint('startTag'),iint('centerTag'),iint('majorTag'),iint('endTag'),iint('tag','-1'),idouble('nx','0.'),idouble('ny','0.'),idouble('nz','0.'))
-geo.add(oint,'addSpline',ivectorint('vertexTags'),iint('tag','-1'))
-geo.add(oint,'addBSpline',ivectorint('vertexTags'),iint('tag','-1'))
-geo.add(oint,'addBezier',ivectorint('vertexTags'),iint('tag','-1'))
-geo.add(oint,'addLineLoop',ivectorint('edgeTags'),iint('tag','-1'))
-geo.add(oint,'addPlaneSurface',ivectorint('wireTags'),iint('tag','-1'))
-geo.add(oint,'addSurfaceFilling',ivectorint('wireTags'),iint('tag','-1'),iint('sphereCenterTag','-1'))
-geo.add(oint,'addSurfaceLoop',ivectorint('faceTags'),iint('tag','-1'))
-geo.add(oint,'addVolume',ivectorint('shellTags'),iint('tag','-1'))
-geo.add(None,'extrude',ivectorpair('dimTags'),idouble('dx'),idouble('dy'),idouble('dz'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
-geo.add(None,'revolve',ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
-geo.add(None,'twist',ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
-geo.add(None,'translate',ivectorpair('dimTags'),idouble('dx'),idouble('dy'),idouble('dz'))
-geo.add(None,'rotate',ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'))
-geo.add(None,'dilate',ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('a'),idouble('b'),idouble('c'))
-geo.add(None,'symmetry',ivectorpair('dimTags'),idouble('a'),idouble('b'),idouble('c'),idouble('d'))
-geo.add(None,'copy',ivectorpair('dimTags'),ovectorpair('outDimTags'))
-geo.add(None,'remove',ivectorpair('dimTags'),ibool('recursive','false'))
-geo.add(None,'removeAllDuplicates')
-geo.add(None,'synchronize')
-
-mesh = geo.add_module('mesh')
-mesh.add(None,'setSize',ivectorpair('dimTags'),idouble('size'))
-mesh.add(None,'setTransfiniteLine',iint('tag'),iint('nPoints'),istring('type','"Progression"'),idouble('coef','1.'))
-mesh.add(None,'setTransfiniteSurface',iint('tag'),istring('arrangement','"Left"'),ivectorint('cornerTags','std::vector<int>()'))
-mesh.add(None,'setTransfiniteVolume',iint('tag'),ivectorint('cornerTags','std::vector<int>()'))
-mesh.add(None,'setRecombine',iint('dim'),iint('tag'),idouble('angle','45.'))
-mesh.add(None,'setSmoothing',iint('dim'),iint('tag'),iint('val'))
-mesh.add(None,'setReverse',iint('dim'),iint('tag'),ibool('val','true'))
-
-occ = model.add_module('occ')
-occ.add(oint,'addPoint',idouble('x'),idouble('y'),idouble('z'),idouble('meshSize','0.'),iint('tag','-1'))
-occ.add(oint,'addLine',iint('startTag'),iint('endTag'),iint('tag','-1'))
-occ.add(oint,'addCircleArc',iint('startTag'),iint('centerTag'),iint('endTag'),iint('tag','-1'))
-occ.add(oint,'addCircle',idouble('x'),idouble('y'),idouble('z'),idouble('r'),iint('tag','-1'),idouble('angle1','0.'),idouble('angle2','2*M_PI'))
-occ.add(oint,'addEllipseArc',iint('startTag'),iint('centerTag'),iint('endTag'),iint('tag','-1'))
-occ.add(oint,'addEllipse',idouble('x'),idouble('y'),idouble('z'),idouble('r1'),idouble('r2'),iint('tag','-1'),idouble('angle1','0.'),idouble('angle2','2*M_PI'))
-occ.add(oint,'addSpline',ivectorint('vertexTags'),iint('tag','-1'))
-occ.add(oint,'addBezier',ivectorint('vertexTags'),iint('tag','-1'))
-occ.add(oint,'addBSpline',ivectorint('vertexTags'),iint('tag','-1'))
-occ.add(oint,'addWire',ivectorint('edgeTags'),iint('tag','-1'),ibool('checkClosed','false'))
-occ.add(oint,'addLineLoop',ivectorint('edgeTags'),iint('tag','-1'))
-occ.add(oint,'addRectangle',idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),iint('tag','-1'),idouble('roundedRadius','0.'))
-occ.add(oint,'addDisk',idouble('xc'),idouble('yc'),idouble('zc'),idouble('rx'),idouble('ry'),iint('tag','-1'))
-occ.add(oint,'addPlaneSurface',ivectorint('wireTags'),iint('tag','-1'))
-occ.add(oint,'addSurfaceFilling',iint('wireTag'),iint('tag','-1'))
-occ.add(oint,'addSurfaceLoop',ivectorint('faceTags'),iint('tag','-1'))
-occ.add(oint,'addVolume',ivectorint('shellTags'),iint('tag','-1'))
-occ.add(oint,'addSphere',idouble('xc'),idouble('yc'),idouble('zc'),idouble('radius'),iint('tag','-1'),idouble('angle1','-M_PI/2'),idouble('angle2','M_PI/2'),idouble('angle3','2*M_PI'))
-occ.add(oint,'addBox',idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),iint('tag','-1'))
-occ.add(oint,'addCylinder',idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),idouble('r'),iint('tag','-1'),idouble('angle','2*M_PI'))
-occ.add(oint,'addCone',idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),idouble('r1'),idouble('r2'),iint('tag','-1'),idouble('angle','2*M_PI'))
-occ.add(oint,'addWedge',idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),iint('tag','-1'),idouble('ltx','0.'))
-occ.add(oint,'addTorus',idouble('x'),idouble('y'),idouble('z'),idouble('r1'),idouble('r2'),iint('tag','-1'),idouble('angle','2*M_PI'))
-occ.add(oint,'addThruSections',ivectorint('wireTags'),ovectorpair('outDimTags'),iint('tag','-1'),ibool('makeSolid','true'),ibool('makeRuled','false'))
-occ.add(oint,'addThickSolid',iint('solidTag'),ivectorint('excludeFaceTags'),idouble('offset'),ovectorpair('outDimTags'),iint('tag','-1'))
-occ.add(None,'extrude',ivectorpair('dimTags'),idouble('dx'),idouble('dy'),idouble('dz'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
-occ.add(None,'revolve',ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
-occ.add(None,'addPipe',ivectorpair('dimTags'),iint('wireTag'),ovectorpair('outDimTags'))
-occ.add(None,'fillet',ivectorint('regionTags'),ivectorint('edgeTags'),idouble('radius'),ovectorpair('outDimTags'),ibool('removeRegion','true'))
-occ.add(oint,'booleanUnion',ivectorpair('objectDimTags'),ivectorpair('toolDimTags'),ovectorpair('outDimTags'),ovectorvectorpair('outDimTagsMap'),iint('tag','-1'),ibool('removeObject','true'),ibool('removeTool','true'))
-occ.add(oint,'booleanIntersection',ivectorpair('objectDimTags'),ivectorpair('toolDimTags'),ovectorpair('outDimTags'),ovectorvectorpair('outDimTagsMap'),iint('tag','-1'),ibool('removeObject','true'),ibool('removeTool','true'))
-occ.add(oint,'booleanDifference',ivectorpair('objectDimTags'),ivectorpair('toolDimTags'),ovectorpair('outDimTags'),ovectorvectorpair('outDimTagsMap'),iint('tag','-1'),ibool('removeObject','true'),ibool('removeTool','true'))
-occ.add(oint,'booleanFragments',ivectorpair('objectDimTags'),ivectorpair('toolDimTags'),ovectorpair('outDimTags'),ovectorvectorpair('outDimTagsMap'),iint('tag','-1'),ibool('removeObject','true'),ibool('removeTool','true'))
-occ.add(None,'translate',ivectorpair('dimTags'),idouble('dx'),idouble('dy'),idouble('dz'))
-occ.add(None,'rotate',ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'))
-occ.add(None,'dilate',ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('a'),idouble('b'),idouble('c'))
-occ.add(None,'symmetry',ivectorpair('dimTags'),idouble('a'),idouble('b'),idouble('c'),idouble('d'))
-occ.add(None,'copy',ivectorpair('dimTags'),ovectorpair('outDimTags'))
-occ.add(None,'remove',ivectorpair('dimTags'),ibool('recursive','false'))
-occ.add(None,'removeAllDuplicates')
-occ.add(None,'importShapes',istring('fileName'),ovectorpair('outDimTags'),ibool('highestDimOnly','true'),istring('format','""'))
-occ.add(None,'setMeshSize',ivectorpair('dimTags'),idouble('size'))
-occ.add(None,'synchronize')
-
-view = gmsh.add_module('view')
-view.add(oint,'add',istring('name'),iint('tag','-1'))
-view.add(None,'remove',iint('tag'))
-view.add(oint,'getIndex',iint('tag'))
-view.add(None,'getTags',ovectorint('tags'))
-#view.add(None,'addModelData',iint('tag'),istring('modelName'),istring('dataType'),ivectorint('tags'),ivectorvectordouble('data'),iint('step','0'),iint('time','0.'),iint('numComponents','-1'),iint('partition','0'))
-view.add(None,'addListData',iint('tag'),istring('type'),iint('numEle'),ivectordouble('data'))
-view.add(None,'probe',iint('tag'),idouble('x'),idouble('y'),idouble('z'),ovectordouble('value'),iint('step','-1'),iint('numComp','-1'),ibool('gradient','false'),idouble('tolerance','0.'),ivectordouble('xElemCoord','std::vector<double>()'),ivectordouble('yElemCoord','std::vector<double>()'),ivectordouble('zElemCoord','std::vector<double>()'))
-view.add(None,'write',iint('tag'),istring('fileName'),ibool('append','false'))
-
-plugin = gmsh.add_module('plugin')
-plugin.add(None,'setNumber',istring('name'),istring('option'),idouble('value'))
-plugin.add(None,'setString',istring('name'),istring('option'),istring('value'))
-plugin.add(None,'run',istring('name'))
+gmsh = api.add_module('gmsh','Top-level functions')
+
+doc = '''Initializes Gmsh. This must be called before any call to the other functions in the API. If argc and argv are provided, they will be handled in the same way as the command line arguments in the Gmsh app.'''
+#gmsh.add('initialize',doc,None,iint('argc','0'),icharpp('argv','0'))
+
+doc = '''Finalizes Gmsh. This must be called when you are done using the Gmsh API.'''
+gmsh.add('finalize',doc,None)
+
+doc = '''Opens a file and adds one (or more) new model(s). Equivalent to the `File->Open' menu in the Gmsh app. Handling of the file depends on its extension and/or its contents.'''
+gmsh.add('open',doc,None,istring('fileName'))
+
+doc = '''Merges a file. Equivalent to the `File->Merge' menu in the Gmsh app. Handling of the file depends on its extension and/or its contents.'''
+gmsh.add('merge',doc,None,istring('fileName'))
+
+doc = '''Writes a file. The export format is determined by the file extension.'''
+gmsh.add('write',doc,None,istring('fileName'))
+
+doc = '''Clears all loaded models and post-processing data, and adds a new empty model.'''
+gmsh.add('clear',doc,None)
+
+option = gmsh.add_module('option','Global option handling functions')
+
+doc = '''Sets a numerical option to `value'. `name' is of the form "category.option" or "category[num].option". Available categories and options are listed in the Gmsh reference manual.'''
+option.add('setNumber',doc,None,istring('name'),idouble('value'))
+
+doc = '''Gets the `value' of a numerical option.'''
+option.add('getNumber',doc,None,istring('name'),odouble('value'))
+
+doc = '''Sets a string option to `value'.'''
+option.add('setString',doc,None,istring('name'),istring('value'))
+
+doc = '''Gets the `value' of a string option.'''
+option.add('getString',doc,None,istring('name'),ostring('value'))
+
+model = gmsh.add_module('model','Per-model functions')
+
+doc = '''Adds a new model, with name `name', and sets it as the current model.'''
+model.add('add',doc,None,istring('name'))
+
+doc = '''Removes the current model.'''
+model.add('remove',doc,None)
+
+doc = '''Lists the names of all models.'''
+model.add('list',doc,None,ovectorstring('names'))
+
+doc = '''Sets the current model to the model with name `name'. If several models have the same name, selects the one that was added first.'''
+model.add('setCurrent',doc,None,istring('name'))
+
+doc = '''Gets all the (elementary) geometrical entities in the current model. If `dim' is >= 0, returns only the entities of the specified dimension (e.g. points if `dim' == 0). The entities are returned as a vector of (dim, tag) integer pairs.'''
+model.add('getEntities',doc,None,ovectorpair('dimTags'),iint('dim','-1'))
+
+doc = '''Gets all the physical groups in the current model. If `dim' is >= 0, returns only the entities of the specified dimension (e.g. physical points if `dim' == 0). The entities are returned as a vector of (dim, tag) integer pairs.'''
+model.add('getPhysicalGroups',doc,None,ovectorpair('dimTags'),iint('dim','-1'))
+
+doc = '''Gets the tags of all the (elementary) geometrical entities making up the physical group of dimension `dim' and tag `tag'.'''
+model.add('getEntitiesForPhysicalGroup',doc,None,iint('dim'),iint('tag'),ovectorint('tags'))
+
+doc = '''Adds a physical group of dimension `dim', grouping the elementary entities with tags `tags'. The function returns the tag of the physical group, equal to `tag' if `tag' is positive, or a new tag if `tag' < 0.'''
+model.add('addPhysicalGroup',doc,oint,iint('dim'),ivectorint('tags'),iint('tag','-1'))
+
+doc = '''Sets the name of the physical group of dimension `dim' and tag `tag'.'''
+model.add('setPhysicalName',doc,None,iint('dim'),iint('tag'),istring('name'))
+
+doc = '''Gets the name of the physical group of dimension `dim' and tag `tag'.'''
+model.add('getPhysicalName',doc,None,iint('dim'),iint('tag'),ostring('name'))
+
+doc = '''Gets the boundary of the geometrical entities `dimTags'. Returns in `outDimTags' the boundary of the individual entities (if `combined' is false) or the boundary of the combined geometrical shape formed by all input entities (if `combined' is true). Returns tags multiplied by the sign of the boundary entity if `oriented' is true. Applies the boundary operator recursively down to dimension 0 (i.e. to points) if `recursive' is true.'''
+model.add('getBoundary',doc,None,ivectorpair('dimTags'),ovectorpair('outDimTags'),ibool('combined','true'),ibool('oriented','true'),ibool('recursive','false'))
+
+doc = '''Gets the (elementary) geometrical entities in the bounding box defined by the two points (xmin, ymin, zmin) and (xmax, ymax, zmax). If `dim' is >= 0, returns only the entities of the specified dimension (e.g. points if `dim' == 0).'''
+model.add('getEntitiesInBoundingBox',doc,None,idouble('xmin'),idouble('ymin'),idouble('zmin'),idouble('xmax'),idouble('ymax'),idouble('zmax'),ovectorpair('tags'),iint('dim','-1'))
+
+doc = '''Gets the bounding box (xmin, ymin, zmin), (xmax, ymax, zmax) of the geometrical entity of dimension `dim' and tag `tag'.'''
+model.add('getBoundingBox',doc,None,iint('dim'),iint('tag'),odouble('xmin'),odouble('ymin'),odouble('zmin'),odouble('xmax'),odouble('ymax'),odouble('zmax'))
+
+doc = '''Adds a discrete geometrical entity (defined by a mesh) of dimension `dim' in the current model. The function returns the tag of the new discrete entity, equal to `tag' if `tag' is positive, or a new tag if `tag' < 0. `boundary' specifies the tags of the entities on the boundary of the discrete entity, if any. Specyfing `boundary' allows Gmsh to construct the topology of the overall model.'''
+model.add('addDiscreteEntity',doc,oint,iint('dim'),iint('tag','-1'),ivectorint('boundary','std::vector<int>()'))
+
+doc = '''Removes the entities `dimTags' of the current model. If `recursive' is true, remove all the entities on their boundaries, down to dimension 0.'''
+model.add('removeEntities',doc,None,ivectorpair('dimTags'),ibool('recursive','false'))
+
+mesh = model.add_module('mesh','Per-model meshing functions')
+
+doc = '''Generates a mesh of the current model, up to dimension `dim' (0, 1, 2 or 3).'''
+mesh.add('generate',doc,None,iint('dim'))
+
+doc = '''Gets the last entities (if any) where a meshing error occurred. Currently only populated by the new 3D meshing algorithms.'''
+mesh.add('getLastEntityError',doc,None,ovectorpair('dimTags'))
+
+doc = '''Gets the last mesh vertices (if any) where a meshing error occurred. Currently only populated by the new 3D meshing algorithms.'''
+mesh.add('getLastVertexError',doc,None,ovectorint('vertexTags'))
+
+doc = '''Gets the mesh vertices of the entity of dimension `dim' and `tag' tag. `vertextags' contains the vertex tags (their unique, strictly positive identification numbers). `coord` is a vector of length `3 * vertexTags.size()' that contains the (x, y, z) coordinates of the vertices, concatenated. `parametricCoord` contains the parametric coordinates of the vertices, if available. The length of `parametricCoord` can be 0 or `dim * vertexTags.size()'.'''
+mesh.add('getVertices',doc,None,iint('dim'),iint('tag'),ovectorint('vertexTags'),ovectordouble('coord'),ovectordouble('parametricCoord'))
+
+doc = '''Gets the mesh elements of the entity of dimension `dim' and `tag' tag. `types' contains the MSH types of the elements (e.g. `2' for 3-node triangles: see the Gmsh reference manual). `elementTags' is a vector of length `types.size()'; each entry is a vector containing the tags (unique, strictly positive identifiers) of the elements of the corresponding type. `vertexTags' is also a vector of length `types.size()'; each entry is a vector of length equal to the number of elements of the given type times the number of vertices for this type of element, that contains the vertex tags of all the elements of the given type, concatenated.'''
+mesh.add('getElements',doc,None,iint('dim'),iint('tag'),ovectorint('types'),ovectorvectorint('elementTags'),ovectorvectorint('vertexTags'))
+
+doc = '''Sets the mesh vertices in the geometrical entity of dimension `dim' and tag `tag'. `vertextags' contains the vertex tags (their unique, strictly positive identification numbers). `coord` is a vector of length `3 * vertexTags.size()' that contains the (x, y, z) coordinates of the vertices, concatenated. The optional `parametricCoord` vector contains the parametric coordinates of the vertices, if any. The length of `parametricCoord` can be 0 or `dim * vertexTags.size()'.'''
+mesh.add('setVertices',doc,None,iint('dim'),iint('tag'),ivectorint('vertexTags'),ivectordouble('coord'),ivectordouble('parametricCoord','std::vector<double>()'))
+
+doc = '''Sets the mesh elements of the entity of dimension `dim' and `tag' tag. `types' contains the MSH types of the elements (e.g. `2' for 3-node triangles: see the Gmsh reference manual). `elementTags' is a vector of length `types.size()'; each entry is a vector containing the tags (unique, strictly positive identifiers) of the elements of the corresponding type. `vertexTags' is also a vector of length `types.size()'; each entry is a vector of length equal to the number of elements of the give type times the number of vertices per element, that contains the vertex tags of all the elements of the given type, concatenated.'''
+#mesh.add('setElements',doc,None,iint('dim'),iint('tag'),ivectorint('types'),ivectorvectorint('elementTags'),ivectorvectorint('vertexTags'))
+
+doc = '''Gets the coordinates and the parametric coordinates (if any) of the mesh vertex with tag `tag'. This is a useful by inefficient way of accessing mesh vertex data, as it relies on a cache stored in the model. For large meshes all the vertices in the model should be numbered in a continuous sequence of tags from 1 to N to maintain reasonnable performance (in this case the internal cache is based on a vector; otherwise it uses a map).'''
+mesh.add('getVertex',doc,None,iint('vertexTag'),ovectordouble('coord'),ovectordouble('parametricCoord'))
+
+doc = '''Gets the type and vertex tags of the mesh element with tag `tag'. This is a useful but inefficient way of accessing mesh element data, as it relies on a cache stored in the model. For large meshes all the elements in the model should be numbered in a continuous sequence of tags from 1 to N to maintain reasonnable performance (in this case the internal cache is based on a vector; otherwise it uses a map).'''
+mesh.add('getElement',doc,None,iint('elementTag'),oint('type'),ovectorint('vertexTags'))
+
+doc = '''Sets a mesh size constraint on the geometrical entities `dimTags'. Currently only entities of dimension 0 (points) are handled.'''
+mesh.add('setSize',doc,None,ivectorpair('dimTags'),idouble('size'))
+
+doc = '''Sets a transfinite meshing constraint on the line `tag', with `numVertices' mesh vertices distributed according to `type' and `coef'. Currently supported types are "Progression" (geometrical progression with power `coef') and "Bump" (refinement toward both extreminties of the line).'''
+mesh.add('setTransfiniteLine',doc,None,iint('tag'),iint('numVertices'),istring('type','"Progression"'),idouble('coef','1.'))
+
+doc = '''Sets a transfinite meshing constraint on the surface `tag'. `arrangement' describes the arrangement of the triangles when the surface is not flagged as recombined: currently supported values are "Left", "Right", "AlternateLeft" and "AlternateRight". `cornerTags' can be used to specify the (3 or 4) corners of the transfinite interpolation explicitly; specifying the corners explicitly is mandatory if the surface has more that 3 or 4 points on its boundary.'''
+mesh.add('setTransfiniteSurface',doc,None,iint('tag'),istring('arrangement','"Left"'),ivectorint('cornerTags','std::vector<int>()'))
+
+doc = '''Sets a transfinite meshing constraint on the surface `tag'. `cornerTags' can be used to specify the (6 or 8) corners of the transfinite interpolation explicitly.'''
+mesh.add('setTransfiniteVolume',doc,None,iint('tag'),ivectorint('cornerTags','std::vector<int>()'))
+
+doc = '''Sets a recombination meshing constraint on the geometrical entity of dimension `dim' and tag `tag'. Currently only entities of dimension 2 (to recombine triangles into quadrangles) are supported.'''
+mesh.add('setRecombine',doc,None,iint('dim'),iint('tag'))
+
+doc = '''Sets a smoothing meshing constraint on the geometrical entity of dimension `dim' and tag `tag'. `val' iterations of a Laplace smoother are applied.'''
+mesh.add('setSmoothing',doc,None,iint('dim'),iint('tag'),iint('val'))
+
+doc = '''Sets a reverse meshing constraint on the geometrical entity of dimension `dim' and tag `tag'. If `val' is true, the mesh orientation will be reversed with respect to the natural mesh orientation (i.e. the orientation consistent with the orientation of the geometrical entity). If `val' is false, the mesh is left as-is.'''
+mesh.add('setReverse',doc,None,iint('dim'),iint('tag'),ibool('val','true'))
+
+doc = '''Emebds the geometrical entities of dimension `dim' and tags `tags' in the (inDim, inTag) geometrical entity. `inDim' must be strictly greater than `dim'.'''
+mesh.add('embed',doc,None,iint('dim'),ivectorint('tags'),iint('inDim'),iint('inTag'))
+
+field = mesh.add_module('field','Per-model mesh size field functions')
+
+doc = '''Adds a new mesh size field of type `type'. If `tag' is positive, assign the tag explcitly; otherwise a new tag is assigned automatically. Returns the field tag.'''
+field.add('add',doc,oint,istring('type'),iint('tag','-1'))
+
+doc = '''Removes the field with tag `tag'.'''
+field.add('remove',doc,None,iint('tag'))
+
+doc = '''Sets the numerical option `option' to value `value' for field `tag'.'''
+field.add('setNumber',doc,None,iint('tag'),istring('option'),idouble('value'))
+
+doc = '''Sets the string option `option' to value `value' for field `tag'.'''
+field.add('setString',doc,None,iint('tag'),istring('option'),istring('value'))
+
+doc = '''Sets the numerical list option `option' to value `value' for field `tag'.'''
+field.add('setNumbers',doc,None,iint('tag'),istring('option'),ivectordouble('value'))
+
+doc = '''Sets the field `tag' as background mesh size field.'''
+field.add('setAsBackground',doc,None,iint('tag'))
+
+geo = model.add_module('geo','Internal per-model GEO CAD kernel functions')
+
+doc = '''Adds a geometrical point in the internal GEO CAD representation, at coordinates (x, y, z). If `meshSize' is > 0, adds a meshing constraint at that point. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the point. (Note that the point will be added in the current model only after gmshModelGeoSynchronize() is called. This behavior holds for all the entities added in the gmshModelGeo module.)'''
+geo.add('addPoint',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('meshSize','0.'),iint('tag','-1'))
+
+doc = '''Adds a straight line segment between the two points with tags `startTag' and `endTag'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the line.'''
+geo.add('addLine',doc,oint,iint('startTag'),iint('endTag'),iint('tag','-1'))
+
+doc = '''Adds a circle arc (stricly smaller than Pi) between the two points with tags `startTag' and `endTag', with center `centertag'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. If (`nx', `ny', `nz') != (0,0,0), explicitely sets the plane of the circle arc. Returns the tag of the circle arc.'''
+geo.add('addCircleArc',doc,oint,iint('startTag'),iint('centerTag'),iint('endTag'),iint('tag','-1'),idouble('nx','0.'),idouble('ny','0.'),idouble('nz','0.'))
+
+doc = '''Adds an ellipse arc (stricly smaller than Pi) between the two points `startTag' and `endTag', with center `centertag' and major axis point `majorTag'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. If (`nx', `ny', `nz') != (0,0,0), explicitely sets the plane of the circle arc. Returns the tag of the ellipse arc.'''
+geo.add('addEllipseArc',doc,oint,iint('startTag'),iint('centerTag'),iint('majorTag'),iint('endTag'),iint('tag','-1'),idouble('nx','0.'),idouble('ny','0.'),idouble('nz','0.'))
+
+doc = '''Adds a spline curve going through `vertexTags' points. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically.  Returns the tag of the spline curve.'''
+geo.add('addSpline',doc,oint,ivectorint('vertexTags'),iint('tag','-1'))
+
+doc = '''Adds a b-spline curve with `vertexTags' control points. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically.  Returns the tag of the b-spline curve.'''
+geo.add('addBSpline',doc,oint,ivectorint('vertexTags'),iint('tag','-1'))
+
+doc = '''Adds a Bezier curve with `vertexTags' control points. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically.  Returns the tag of the Bezier curve.'''
+geo.add('addBezier',doc,oint,ivectorint('vertexTags'),iint('tag','-1'))
+
+doc = '''Adds a line loop (a closed wire) formed by `edgeTags'. `edgeTags' should contain (signed) tags of geometrical enties of dimension 1 forming a closed loop: a negative tag signifies that the underlying edge is considered with reversed orientation. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the line loop.'''
+geo.add('addLineLoop',doc,oint,ivectorint('edgeTags'),iint('tag','-1'))
+
+doc = '''Adds a plane surface defined by one or more line loops `wireTags'. The first line loop defines the exterior contour; additional line loop define holes. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the surface.'''
+geo.add('addPlaneSurface',doc,oint,ivectorint('wireTags'),iint('tag','-1'))
+
+doc = '''Adds a surface filling the line loops in `wireTags'. Currently only a single line loop is supported; this line loop should be composed by 3 or 4 edges only. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the surface.'''
+geo.add('addSurfaceFilling',doc,oint,ivectorint('wireTags'),iint('tag','-1'),iint('sphereCenterTag','-1'))
+
+doc = '''Adds a surface loop (a closed shell) formed by `faceTags'.  If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the surface loop.'''
+geo.add('addSurfaceLoop',doc,oint,ivectorint('faceTags'),iint('tag','-1'))
+
+doc = '''Adds a volume defined by one or more surface loops `shellTags'. The first surface loop defines the exterior boundary; additional surface loop define holes. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the volume.'''
+geo.add('addVolume',doc,oint,ivectorint('shellTags'),iint('tag','-1'))
+
+doc = '''Extrudes the geometrical entities in `dimTags' by translation along (`dx', `dy', `dz'). Returns extruded entities in `outDimTags'. If `numElements' is not empty, also extrude the mesh: the entries in `numElements' give the number of elements in each layer. If `height' is not empty, it provides the (cummulative) height of the different layers, normalized to 1.'''
+geo.add('extrude',doc,None,ivectorpair('dimTags'),idouble('dx'),idouble('dy'),idouble('dz'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
+
+doc = '''Extrudes the geometrical entities in `dimTags' by rotation of `angle' radians around the axis of revolution defined by the point (`x', `y', `z') and the direction (`ax', `ay', `az'). Returns extruded entities in `outDimTags'. If `numElements' is not empty, also extrude the mesh: the entries in `numElements' give the number of elements in each layer. If `height' is not empty, it provides the (cummulative) height of the different layers, normalized to 1.'''
+geo.add('revolve',doc,None,ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
+
+doc = '''Extrudes the geometrical entities in `dimTags' by a combined translation and rotation of `angle' radians, along (`dx', `dy', `dz') and around the axis of revolution defined by the point (`x', `y', `z') and the direction (`ax', `ay', `az'). Returns extruded entities in `outDimTags'. If `numElements' is not empty, also extrude the mesh: the entries in `numElements' give the number of elements in each layer. If `height' is not empty, it provides the (cummulative) height of the different layers, normalized to 1.'''
+geo.add('twist',doc,None,ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
+
+doc = '''Translates the geometrical entities in `dimTags' along (`dx', `dy', `dz').'''
+geo.add('translate',doc,None,ivectorpair('dimTags'),idouble('dx'),idouble('dy'),idouble('dz'))
+
+doc = '''Rotates the geometrical entities in `dimTags' of `angle' radians around the axis of revolution defined by the point (`x', `y', `z') and the direction (`ax', `ay', `az').'''
+geo.add('rotate',doc,None,ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'))
+
+doc = '''Scales the geometrical entities in `dimTag' by factors `a', `b' and `c' along the three coordinate axes; use (`x', `y', `z') as the center of the homothetic transformation.'''
+geo.add('dilate',doc,None,ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('a'),idouble('b'),idouble('c'))
+
+doc = '''Applies a symmetry transformation to the geometrical entities in `dimTag', with respect to the plane of equation `a' * x + `b' * y + `c' * z + `d' = 0.'''
+geo.add('symmetry',doc,None,ivectorpair('dimTags'),idouble('a'),idouble('b'),idouble('c'),idouble('d'))
+
+doc = '''Copies the entities in `dimTags'; the new entities are returned in `outDimTags'.'''
+geo.add('copy',doc,None,ivectorpair('dimTags'),ovectorpair('outDimTags'))
+
+doc = '''Removes the entities `dimTags'. If `recursive' is true, remove all the entities on their boundaries, down to dimension 0.'''
+geo.add('remove',doc,None,ivectorpair('dimTags'),ibool('recursive','false'))
+
+doc = '''Remove all duplicate entities (different entities at the same geometrical location).'''
+geo.add('removeAllDuplicates',doc,None)
+
+doc = '''Synchronize the internal GEO CAD representation with the current Gmsh model. This can be called at any time, but since it involves a non trivial amount of processing, the number of synchronization points should normally be minimized.'''
+geo.add('synchronize',doc,None)
+
+mesh = geo.add_module('mesh','geo-specific meshing constraints')
+
+doc = '''Sets a mesh size constraint on the geometrical entities `dimTags'. Currently only entities of dimension 0 (points) are handled.'''
+mesh.add('setSize',doc,None,ivectorpair('dimTags'),idouble('size'))
+
+doc = '''Sets a transfinite meshing constraint on the line `tag', with `numVertices' mesh vertices distributed according to `type' and `coef'. Currently supported types are "Progression" (geometrical progression with power `coef') and "Bump" (refinement toward both extreminties of the line).'''
+mesh.add('setTransfiniteLine',doc,None,iint('tag'),iint('nPoints'),istring('type','"Progression"'),idouble('coef','1.'))
+
+doc = '''Sets a transfinite meshing constraint on the surface `tag'. `arrangement' describes the arrangement of the triangles when the surface is not flagged as recombined: currently supported values are "Left", "Right", "AlternateLeft" and "AlternateRight". `cornerTags' can be used to specify the (3 or 4) corners of the transfinite interpolation explicitly; specifying the corners explicitly is mandatory if the surface has more that 3 or 4 points on its boundary.'''
+mesh.add('setTransfiniteSurface',doc,None,iint('tag'),istring('arrangement','"Left"'),ivectorint('cornerTags','std::vector<int>()'))
+
+doc = '''Sets a transfinite meshing constraint on the surface `tag'. `cornerTags' can be used to specify the (6 or 8) corners of the transfinite interpolation explicitly.'''
+mesh.add('setTransfiniteVolume',doc,None,iint('tag'),ivectorint('cornerTags','std::vector<int>()'))
+
+doc = '''Sets a recombination meshing constraint on the geometrical entity of dimension `dim' and tag `tag'. Currently only entities of dimension 2 (to recombine triangles into quadrangles) are supported.'''
+mesh.add('setRecombine',doc,None,iint('dim'),iint('tag'),idouble('angle','45.'))
+
+doc = '''Sets a smoothing meshing constraint on the geometrical entity of dimension `dim' and tag `tag'. `val' iterations of a Laplace smoother are applied.'''
+mesh.add('setSmoothing',doc,None,iint('dim'),iint('tag'),iint('val'))
+
+doc = '''Sets a reverse meshing constraint on the geometrical entity of dimension `dim' and tag `tag'. If `val' is true, the mesh orientation will be reversed with respect to the natural mesh orientation (i.e. the orientation consistent with the orientation of the geometrical entity). If `val' is false, the mesh is left as-is.'''
+mesh.add('setReverse',doc,None,iint('dim'),iint('tag'),ibool('val','true'))
+
+occ = model.add_module('occ','Internal per-model OpenCASCADE CAD kernel functions')
+
+doc = '''Adds a geometrical point in the internal OpenCASCADE CAD representation, at coordinates (x, y, z). If `meshSize' is > 0, adds a meshing constraint at that point. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the point. (Note that the point will be added in the current model only after gmshModelGeoSynchronize() is called. This behavior holds for all the entities added in the gmshModelOcc module.)'''
+occ.add('addPoint',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('meshSize','0.'),iint('tag','-1'))
+
+doc = '''Adds a straight line segment between the two points with tags `startTag' and `endTag'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the line.'''
+occ.add('addLine',doc,oint,iint('startTag'),iint('endTag'),iint('tag','-1'))
+
+doc = '''Adds a circle arc between the two points with tags `startTag' and `endTag', with center `centertag'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. Returns the tag of the circle arc.'''
+occ.add('addCircleArc',doc,oint,iint('startTag'),iint('centerTag'),iint('endTag'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addCircle',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('r'),iint('tag','-1'),idouble('angle1','0.'),idouble('angle2','2*M_PI'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addEllipseArc',doc,oint,iint('startTag'),iint('centerTag'),iint('endTag'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addEllipse',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('r1'),idouble('r2'),iint('tag','-1'),idouble('angle1','0.'),idouble('angle2','2*M_PI'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addSpline',doc,oint,ivectorint('vertexTags'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addBezier',doc,oint,ivectorint('vertexTags'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addBSpline',doc,oint,ivectorint('vertexTags'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addWire',doc,oint,ivectorint('edgeTags'),iint('tag','-1'),ibool('checkClosed','false'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addLineLoop',doc,oint,ivectorint('edgeTags'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addRectangle',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),iint('tag','-1'),idouble('roundedRadius','0.'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addDisk',doc,oint,idouble('xc'),idouble('yc'),idouble('zc'),idouble('rx'),idouble('ry'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addPlaneSurface',doc,oint,ivectorint('wireTags'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addSurfaceFilling',doc,oint,iint('wireTag'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addSurfaceLoop',doc,oint,ivectorint('faceTags'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addVolume',doc,oint,ivectorint('shellTags'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addSphere',doc,oint,idouble('xc'),idouble('yc'),idouble('zc'),idouble('radius'),iint('tag','-1'),idouble('angle1','-M_PI/2'),idouble('angle2','M_PI/2'),idouble('angle3','2*M_PI'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addBox',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addCylinder',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),idouble('r'),iint('tag','-1'),idouble('angle','2*M_PI'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addCone',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),idouble('r1'),idouble('r2'),iint('tag','-1'),idouble('angle','2*M_PI'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addWedge',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('dx'),idouble('dy'),idouble('dz'),iint('tag','-1'),idouble('ltx','0.'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addTorus',doc,oint,idouble('x'),idouble('y'),idouble('z'),idouble('r1'),idouble('r2'),iint('tag','-1'),idouble('angle','2*M_PI'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addThruSections',doc,oint,ivectorint('wireTags'),ovectorpair('outDimTags'),iint('tag','-1'),ibool('makeSolid','true'),ibool('makeRuled','false'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addThickSolid',doc,oint,iint('solidTag'),ivectorint('excludeFaceTags'),idouble('offset'),ovectorpair('outDimTags'),iint('tag','-1'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('extrude',doc,None,ivectorpair('dimTags'),idouble('dx'),idouble('dy'),idouble('dz'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('revolve',doc,None,ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'),ovectorpair('outDimTags'),ivectorint('numElements','std::vector<int>()'),ivectordouble('heights','std::vector<double>()'),ibool('recombine','false'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('addPipe',doc,None,ivectorpair('dimTags'),iint('wireTag'),ovectorpair('outDimTags'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('fillet',doc,None,ivectorint('regionTags'),ivectorint('edgeTags'),idouble('radius'),ovectorpair('outDimTags'),ibool('removeRegion','true'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('booleanUnion',doc,oint,ivectorpair('objectDimTags'),ivectorpair('toolDimTags'),ovectorpair('outDimTags'),ovectorvectorpair('outDimTagsMap'),iint('tag','-1'),ibool('removeObject','true'),ibool('removeTool','true'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('booleanIntersection',doc,oint,ivectorpair('objectDimTags'),ivectorpair('toolDimTags'),ovectorpair('outDimTags'),ovectorvectorpair('outDimTagsMap'),iint('tag','-1'),ibool('removeObject','true'),ibool('removeTool','true'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('booleanDifference',doc,oint,ivectorpair('objectDimTags'),ivectorpair('toolDimTags'),ovectorpair('outDimTags'),ovectorvectorpair('outDimTagsMap'),iint('tag','-1'),ibool('removeObject','true'),ibool('removeTool','true'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('booleanFragments',doc,oint,ivectorpair('objectDimTags'),ivectorpair('toolDimTags'),ovectorpair('outDimTags'),ovectorvectorpair('outDimTagsMap'),iint('tag','-1'),ibool('removeObject','true'),ibool('removeTool','true'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('translate',doc,None,ivectorpair('dimTags'),idouble('dx'),idouble('dy'),idouble('dz'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('rotate',doc,None,ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('ax'),idouble('ay'),idouble('az'),idouble('angle'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('dilate',doc,None,ivectorpair('dimTags'),idouble('x'),idouble('y'),idouble('z'),idouble('a'),idouble('b'),idouble('c'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('symmetry',doc,None,ivectorpair('dimTags'),idouble('a'),idouble('b'),idouble('c'),idouble('d'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('copy',doc,None,ivectorpair('dimTags'),ovectorpair('outDimTags'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('remove',doc,None,ivectorpair('dimTags'),ibool('recursive','false'))
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('removeAllDuplicates',doc,None)
+
+doc = '''Adds a circle of center (`x', `y', `z') and radius `r'. If `tag' is positive, sets the tag explicitly; otherwise a new tag is selected automatically. `angle1' and `angle2' allow to add a circle arc. Returns the tag of the circle.'''
+occ.add('importShapes',doc,None,istring('fileName'),ovectorpair('outDimTags'),ibool('highestDimOnly','true'),istring('format','""'))
+
+doc = '''Sets a mesh size constraint on the geometrical entities `dimTags'. Currently only entities of dimension 0 (points) are handled.'''
+occ.add('setMeshSize',doc,None,ivectorpair('dimTags'),idouble('size'))
+
+doc = '''Synchronize the internal OpenCASCADE CAD representation with the current Gmsh model. This can be called at any time, but since it involves a non trivial amount of processing, the number of synchronization points should normally be minimized.'''
+occ.add('synchronize',doc,None)
+
+view = gmsh.add_module('view','Post-processing view functions')
+
+doc = '''Adds a new post-processing view, with name `name'. If `tag' is positive use it (and remove the view with that tag if it already exists), otherwise associate a new tag. Returns the view tag.'''
+view.add('add',doc,oint,istring('name'),iint('tag','-1'))
+
+doc = '''Removes the view with tag `tag'.'''
+view.add('remove',doc,None,iint('tag'))
+
+doc = '''Gets the index of the view with tag `tag' in the list of currently loaded views. This dynamic index (it can change when views are removed) is used to access view options with the gmshOption functions.'''
+view.add('getIndex',doc,oint,iint('tag'))
+
+doc = '''Gets the tags of all views.'''
+view.add('getTags',doc,None,ovectorint('tags'))
+
+doc = '''Adds model-based post-processing data to the view with tag `tag'. `modelName' identifies the model the data is attached to. `dataType' specifies the type of data, currently either "NodeData", "ElementData" or "ElementNodeData". `tags' gives the tags of the vertices or elements in the mesh to which the data is associated. `data' is a vector of length `tags.size()`: each entry is the vector of double precision numbers representing the data associated with the corresponding tag. The optional `step` and `time` arguments associate a time step and time value with the data. `numComponents' gives the number of data components (1 for scalar data, 3 for vector data, etc.) per entity; if negative, it is automatically inferred (when possible) from the input data. `partition' allows to specify data in several sub-sets.'''
+#view.add('addModelData',doc,None,iint('tag'),istring('modelName'),istring('dataType'),ivectorint('tags'),ivectorvectordouble('data'),iint('step','0'),iint('time','0.'),iint('numComponents','-1'),iint('partition','0'))
+
+doc = '''Adds list-based post-processing data to the view with tag `tag'. `type' identifies the data: "SP" for scalar points, "VP", for vector points, etc. `numEle' gives the number of elements in the data. `data' contains the data for the `numEle' elements.'''
+view.add('addListData',doc,None,iint('tag'),istring('type'),iint('numEle'),ivectordouble('data'))
+
+doc = '''Probes the view `tag' for its `value' at point (`x', `y', `z').'''
+view.add('probe',doc,None,iint('tag'),idouble('x'),idouble('y'),idouble('z'),ovectordouble('value'),iint('step','-1'),iint('numComp','-1'),ibool('gradient','false'),idouble('tolerance','0.'),ivectordouble('xElemCoord','std::vector<double>()'),ivectordouble('yElemCoord','std::vector<double>()'),ivectordouble('zElemCoord','std::vector<double>()'))
+
+doc = '''Writes the view to a file. The export format is determined by the file extension.'''
+view.add('write',doc,None,iint('tag'),istring('fileName'),ibool('append','false'))
+
+plugin = gmsh.add_module('plugin','Plugin functions')
+
+doc = '''Sets the numerical option `option` to the value `value' for plugin `name'.'''
+plugin.add('setNumber',doc,None,istring('name'),istring('option'),idouble('value'))
+
+doc = '''Sets the string option `option` to the value `value' for plugin `name'.'''
+plugin.add('setString',doc,None,istring('name'),istring('option'),istring('value'))
+
+doc = '''Runs the plugin `name'.'''
+plugin.add('run',doc,None,istring('name'))
+
 api.write_cpp()
 api.write_c()
 api.write_python()