Skip to main content

Complete mesh generation and manipulation package with GUI

Project description

PyMeshIt

Python 3.8+ License: GPL v3 Code style: black

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.

Highlights (GUI-driven workflow)

The included GUI (main.py) implements a full MeshIt workflow with the following main tabs:

    1. Load Data — load points, wells (polylines) or VTU/Poly formats; manage multiple datasets and colors.
    1. Convex Hull — compute dataset boundaries (convex or rim for/quasi-planar sheets) with corner detection.
    1. Segmentation — refine hulls by target feature size and per-surface length tables (RefineByLength).
    1. Triangulation — generate surface triangulations with gradient, min-angle, interpolation and uniform options.
    1. Intersections — compute & visualize global surface–surface and polyline–surface intersections; triple point detection.
    1. Refine & Mesh — refine intersection/hull lines, generate conforming surface meshes, constraint selection UI, per-surface mesh density table.
    1. Pre‑Tetramesh — select conforming surfaces, validate for TetGen, manage selection tree for tetrahedralization.
    1. Tetra Mesh — generate and visualize tetrahedral meshes, assign materials, export results.

Installation

From Release (Recommended)

PyMeshIt provides standalone executables for Windows 10/11 and Ubuntu (22.04+). These do not require Python to be installed.

  1. Go to the Releases page.
  2. Download the appropriate file for your OS:
    • Windows: PyMeshit-vX.X.X-win64.zip
    • Ubuntu: PyMeshit-vX.X.X-linux.zip
  3. Extract the archive.
  4. On Linux, you may need to make the file executable:
    chmod +x PyMeshIt
    
  5. Run the executable (./PyMeshIt on Linux, double-click PyMeshIt.exe on Windows).

Note: macOS support is planned for future releases.

From PyPI (Cross-Platform)

If you prefer to run from source or use the Python API, you can install via pip:

pip install triangle
pip install pymeshit

From Source

If you want to install from source:

git clone https://github.com/waqashussain117/PyMeshit
cd PyMeshit
pip install -e .

Requirements

The package will automatically install all required dependencies:

  • numpy
  • scipy
  • matplotlib
  • PySide6
  • pyvista
  • tetgen
  • triangle (optional)

Linux Users: You may need to install system libraries for Qt. On Ubuntu:

sudo apt-get install libxcb-cursor0 libxkbcommon-x11-0 libegl1 libopengl0 libgl1

Quick start (GUI)

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:

  1. Load one or more point or VTU files (File → Load).
  2. Compute hulls (Convex Hull tab).
  3. Compute segmentation (Segmentation tab) — set "Target Feature Size" or per-surface values.
  4. Run triangulation (Triangulation tab), choose interpolation and quality settings.
  5. Compute intersections (Intersections tab) to extract shared constraints and triple points.
  6. Refine intersection lines and generate conforming meshes (Refine & Mesh tab).
  7. Select conforming surfaces and validate for TetGen (Pre‑Tetramesh tab).
  8. Generate and visualize tetrahedral mesh (Tetra Mesh tab) and export.

Programmatic Usage

Troubleshooting

Linux / Virtual Machine Issues

If you encounter an error like X Error of failed request: BadWindow or the application crashes on startup, it is likely due to graphics driver compatibility, especially in Virtual Machines (VirtualBox, VMware).

Try running the application with software rendering forced:

export LIBGL_ALWAYS_SOFTWARE=1
./PyMeshIt

Or force the Qt platform to X11:

export QT_QPA_PLATFORM=xcb
./PyMeshIt

Contributing

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.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymeshit-0.7.3.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymeshit-0.7.3-py3-none-any.whl (301.7 kB view details)

Uploaded Python 3

File details

Details for the file pymeshit-0.7.3.tar.gz.

File metadata

  • Download URL: pymeshit-0.7.3.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pymeshit-0.7.3.tar.gz
Algorithm Hash digest
SHA256 2844cd7e95f88b161d92558888e1f296c3ab6930ddf1bdd6d6ab5e928b47aeb4
MD5 d8336bf7f97a1908336e7454b1662082
BLAKE2b-256 1f52035ff304d85e676201958665ce2ee59e6a6b34ab854bcff1b090a6f5a3ee

See more details on using hashes here.

File details

Details for the file pymeshit-0.7.3-py3-none-any.whl.

File metadata

  • Download URL: pymeshit-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 301.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pymeshit-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d99f38202c3ee7ba67228f625bdb673a4cd6dd4eb0ac8e56d40fe2c27a375d13
MD5 db361a8d94d3bc34b75f5879dbb5c815
BLAKE2b-256 aa78014f548ea712af34d8cfdc5e6b6b5620ded37c40ca986c8a3ec00dcdc0f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page