A Python interface to CGAL's 2D and 3D mesh generation tools for creating high-quality meshes from geometric domains.
pygalmesh is a Python library that provides an interface to CGAL's meshing tools for generating high-quality 2D and 3D meshes. It solves the problem of creating structured and unstructured meshes from geometric domains, level-set functions, and various input formats, which is essential for simulations, visualization, and computational analysis.
Researchers, engineers, and developers in computational science, finite element analysis, computer graphics, and biomedical imaging who need robust mesh generation integrated into Python workflows.
Developers choose pygalmesh because it combines the proven reliability of CGAL's meshing algorithms with a clean Python API, supporting a wide range of input types and offering advanced features like local refinement and periodic meshing not easily found in other Python mesh libraries.
:spider_web: A Python interface to CGAL's meshing tools
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides direct integration with CGAL's proven meshing algorithms, ensuring high-quality volume and surface meshes as demonstrated in examples like ball generation and custom level-set functions.
Supports meshing from geometric primitives, level-set functions, INR voxel files, and 3D numpy arrays, enabling use cases from CAD to medical imaging, as shown with the breast phantom example.
Includes local refinement via functions, periodic meshing, and surface remeshing, offering fine control over mesh density and structure for scientific simulations.
Exposes CGAL's capabilities through a clean Python interface, making advanced meshing accessible without deep C++ knowledge, with extensive examples in the README.
Sharp edges in combined domains require explicit definition via feature edges, which can be tedious and error-prone, as highlighted in the ball difference example where a circle must be manually added.
Installation relies on system-wide CGAL and Eigen libraries, with potential issues like symbolic link fixes on MacOS, complicating deployment in some environments.
Unlike bounding-plane approaches (e.g., mshr), automatic handling of sharp intersections is not supported, requiring extra work for domain unions or differences.