PyMeshIt is a complete Python package for mesh generation and manipulation with a full-featured Qt-based GUI. It provides a comprehensive workflow to process point clouds and polylines into conforming surface meshes and tetrahedral meshes.
Note: This version runs entirely in Python without C++ dependencies, making it easier to install and deploy.
The included GUI (main.py) implements a full MeshIt workflow with the following main tabs:
-
- Load Data — load points, wells (polylines) or VTU/Poly formats; manage multiple datasets and colors.
-
- Convex Hull — compute dataset boundaries (convex or rim for/quasi-planar sheets) with corner detection.
-
- Segmentation — refine hulls by target feature size and per-surface length tables (RefineByLength).
-
- Triangulation — generate surface triangulations with gradient, min-angle, interpolation and uniform options.
-
- Intersections — compute & visualize global surface–surface and polyline–surface intersections; triple point detection.
-
- Refine & Mesh — refine intersection/hull lines, generate conforming surface meshes, constraint selection UI, per-surface mesh density table.
-
- Pre‑Tetramesh — select conforming surfaces, validate for TetGen, manage selection tree for tetrahedralization.
-
- Tetra Mesh — generate and visualize tetrahedral meshes, assign materials, export results.
For quick installation, download the exe. file from Releases
pip install triangle
pip install pymeshit # Needs to be fixed
If you want to install from source:
git clone https://github.com/waqashussain117/PyMeshit
cd PyMeshit
pip install -e .
The package will automatically install all required dependencies:
- numpy
- scipy
- matplotlib
- PySide6
- pyvista
- tetgen
- triangle (optional)
For installation either install the Requirements and then open through Python. After installation, run the GUI:
meshit-gui
Or from Python:
import Pymeshit
Pymeshit.main_wrapper()
Typical workflow:
- Load one or more point or VTU files (File → Load).
- Compute hulls (Convex Hull tab).
- Compute segmentation (Segmentation tab) — set "Target Feature Size" or per-surface values.
- Run triangulation (Triangulation tab), choose interpolation and quality settings.
- Compute intersections (Intersections tab) to extract shared constraints and triple points.
- Refine intersection lines and generate conforming meshes (Refine & Mesh tab).
- Select conforming surfaces and validate for TetGen (Pre‑Tetramesh tab).
- Generate and visualize tetrahedral mesh (Tetra Mesh tab) and export.
Contributions are welcome. Please open an issue for discussion and submit PRs for fixes and features. Keep GUI behavior consistent with the tab-based workflow.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.