import gmsh
After importing the python-gmsh package the following methods become accessible:
gmsh.initialize(): Initializes the gmsh APIgmsh.model.geo.addPoint(x, y, z, meshSize, tag): Adds a point at coordinates (x,y,z) with specified mesh sizegmsh.model.geo.addLine(startPointTag, endPointTag, tag): Creates a line between two pointsgmsh.model.geo.addCircleArc(startPointTag, centerPointTag, endPointTag, tag): Creates a circular arcgmsh.model.geo.synchronize(): Synchronizes the CAD model with the gmsh modelgmsh.model.addPhysicalGroup(dim, tags, tag, name): Creates named physical groups for boundary conditionsgmsh.model.geo.addCurveLoop(curveTags, tag): Creates a closed loop from curvesgmsh.model.geo.addPlaneSurface(wireTags, tag): Creates a surface from closed-loop boundariesgmsh.model.mesh.generate(dim): Generates a mesh with specified dimensiongmsh.option.setNumber(name, value): Sets gmsh optionsgmsh.write(filename): Writes the mesh to a filegmsh.finalize(): Finalizes and cleans up the gmsh API