--- id: pygmsh version: "7.1.17" license: unclear license_treatment: copyleft maintenance: dormant --- # pygmsh — Python frontend for Gmsh License: copyleft · Maintenance: dormant · Downloads: 83.4K/mo ## What it is and what it does pygmsh is a Python wrapper around Gmsh, a widely-used open-source mesh generator. It abstracts Gmsh's native Python API to make it easier to programmatically define 2D and 3D geometries and generate unstructured meshes. The package supports both simple geometric primitives (polygons, circles, splines) and more complex CAD-style operations via OpenCASCADE (boolean operations, extrusions, revolutions). Generated meshes are returned as meshio objects, which can be written to standard formats like VTK or MSH. Typical workflows involve defining a geometry within a context manager, optionally configuring mesh refinement or boundary layers, calling generate_mesh(), and then writing or analyzing the result. The package depends on gmsh (the underlying solver), meshio (mesh I/O and representation), and numpy (numerical arrays). It supports Python 3.7 and later and is classified as Production/Stable, though releases have been infrequent since early 2022. Use it for: - Generate finite element meshes for computational fluid dynamics or structural analysis simulations. - Create unstructured meshes for complex 2D or 3D geometries defined programmatically in Python. - Automate mesh generation in parametric design workflows where geometry varies with input parameters. - Refine meshes locally near boundaries or regions of interest using boundary layer and callback functions. - Export geometries to standard mesh formats (VTK, MSH) for visualization or downstream analysis tools. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pygmsh provides a Python interface to Gmsh, a mesh generation tool, allowing you to define 2D and 3D geometries and generate unstructured meshes from them. Yes, with conditions. pygmsh is stable and well-established for mesh generation tasks in scientific computing. Install friction is low and there are no known vulnerabilities. However, maintenance is dormant—the last release was 2022-01-28. Choose this if you need a mature, proven mesh generation interface and can tolerate infrequent updates. The GPLv3+ license requires any derivative work to remain open-source. Verify compatibility with your Gmsh version before committing to production use. ## Install pip install pygmsh uv add pygmsh poetry add pygmsh ## Installing pygmsh Before you install: Low install friction: pure Python wheel with three runtime dependencies (gmsh, meshio, numpy). Maintenance is dormant—last release was 2022-01-28, though the repository remains active with 968 stars and is not archived. License in practice: Licensed under GPLv3+, a copyleft license. Any derivative work or distribution must also be open-source under a compatible license; proprietary projects cannot use this package without legal review. Quickstart: pip install pygmsh import pygmsh with pygmsh.geo.Geometry() as geom: geom.add_circle([0.0, 0.0], 1.0, mesh_size=0.2) mesh = geom.generate_mesh() mesh.write("output.vtk") Gmsh itself must be installed separately (e.g., apt install python3-gmsh on Debian/Ubuntu or via other system package managers). Verify before relying: - Current maintenance status and likelihood of future updates or bug fixes beyond the 2022 release. - Compatibility with Gmsh versions released after the package's last update in 2022. - Whether dormant status indicates the package is stable and feature-complete or at risk of bitrot. ## Package facts - License: not declared (copyleft) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 83.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mesh generation python, gmsh python wrapper, 2d 3d mesh creation, finite element mesh generator, geometry to mesh conversion, unstructured mesh python, cad geometry meshing, mesh-generation, cad-geometry, scientific-computing [View on SkillFed](https://skillfed.io/packages/pygmsh) · [View on PyPI](https://pypi.org/project/pygmsh/)