Skip to main content

meshplex

Fast tools for simplex meshes.

PyPi Version PyPI pyversions GitHub stars PyPi downloads

Compute all sorts of interesting points, areas, and volumes in simplex (triangle, tetrahedral, n-simplex) meshes of any dimension, with a focus on efficiency. Useful in many contexts, e.g., finite-element and finite-volume computations.

Installation

Install meshplex from PyPI with

pip install meshplex

For full usage of meshplex, you require a license. Licenses for personal and academic use can be purchased here. For more info, see here.

Quickstart

meshplex can compute the following data:

import meshplex

# create a simple Mesh instance
# (could be tetrahedra or even higher dimensional simplices)
points = [[0.0, 0.0], [1.0, 0.0], [0.0, 1.0]]
cells = [[0, 1, 2]]
mesh = meshplex.Mesh(points, cells)
# or read it from a file
# mesh = meshplex.read("pacman.vtk")

# simplex volumes, heights
print(mesh.cell_volumes)
print(mesh.signed_cell_volumes)
print(mesh.cell_heights)
print(mesh.volume)
print(mesh.surface_area)

# centers of any kind
print(mesh.cell_circumcenters)
print(mesh.cell_centroids)
print(mesh.cell_incenters)
print(mesh.cell_monge_points)
print(mesh.cell_nagel_points)
print(mesh.cell_spieker_centers)
print(mesh.cell_lemoine_points)
print(mesh.center_of_gravity)

# circumradius, inradius, cell quality
print(mesh.cell_circumradius)
print(mesh.cell_inradius)
print(mesh.q_radius_ratio)  # d * inradius / circumradius (min 0, max 1)

# control volumes, centroids
print(mesh.control_volumes)
print(mesh.control_volume_centroids)

# covolume/edge length ratios
print(mesh.ce_ratios)

# count Delaunay violations
print(mesh.num_delaunay_violations)

# get all boundary angles in radians
print(mesh.outside_boundary_angles_radians)

# removes some cells
mesh.remove_cells([0])

For triangular meshes (MeshTri), meshplex also has some mesh manipulation routines:

mesh.show()  # show the mesh
mesh.angles  # compute angles
mesh.flip_until_delaunay()  # flips edges until the mesh is Delaunay

For a documentation of all classes and functions, see readthedocs.

(For mesh creation, check out this list).

Plotting

Triangles

import meshplex

mesh = meshplex.read("pacman.vtk")
mesh.show(
    # show_coedges=True,
    # control_volume_centroid_color=None,
    # mesh_color="k",
    # nondelaunay_edge_color=None,
    # boundary_edge_color=None,
    # comesh_color=(0.8, 0.8, 0.8),
    show_axes=False,
)

Tetrahedra

import numpy as np
import meshplex

# Generate tetrahedron
points = np.array(
    [
        [1.0, 0.0, -1.0 / np.sqrt(8)],
        [-0.5, +np.sqrt(3.0) / 2.0, -1.0 / np.sqrt(8)],
        [-0.5, -np.sqrt(3.0) / 2.0, -1.0 / np.sqrt(8)],
        [0.0, 0.0, np.sqrt(2.0) - 1.0 / np.sqrt(8)],
    ]
) / np.sqrt(3.0)
cells = [[0, 1, 2, 3]]

# Create mesh object
mesh = meshplex.MeshTetra(points, cells)

# Plot cell 0 with control volume boundaries
mesh.show_cell(
    0,
    # barycenter_rgba=(1, 0, 0, 1.0),
    # circumcenter_rgba=(0.1, 0.1, 0.1, 1.0),
    # circumsphere_rgba=(0, 1, 0, 1.0),
    # incenter_rgba=(1, 0, 1, 1.0),
    # insphere_rgba=(1, 0, 1, 1.0),
    # face_circumcenter_rgba=(0, 0, 1, 1.0),
    control_volume_boundaries_rgba=(1.0, 0.0, 0.0, 1.0),
    line_width=3.0,
)

Metadata

Release files for meshplex 0.22.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for meshplex 0.22.6
File Actions
meshplex-0.22.6-cp315-none-any.whl CPython 3.15 none any Details for meshplex-0.22.6-cp315-none-any.whl
meshplex-0.22.6-cp314-none-any.whl CPython 3.14 none any Details for meshplex-0.22.6-cp314-none-any.whl
meshplex-0.22.6-cp313-none-any.whl CPython 3.13 none any Details for meshplex-0.22.6-cp313-none-any.whl
meshplex-0.22.6-cp312-none-any.whl CPython 3.12 none any Details for meshplex-0.22.6-cp312-none-any.whl
meshplex-0.22.6-cp311-none-any.whl CPython 3.11 none any Details for meshplex-0.22.6-cp311-none-any.whl
meshplex-0.22.6-cp310-none-any.whl CPython 3.10 none any Details for meshplex-0.22.6-cp310-none-any.whl

Total release size: 936.4 kB

Release files / meshplex-0.22.6-cp315-none-any.whl

Download URL meshplex-0.22.6-cp315-none-any.whl
Size 185.8 kB
Tags CPython 3.15
SHA-256 checksum
How to use checksums
80c47f5ddd7591e9d4ebefbf70d1ae291a69f0a9739efeed0b14b12358936f2e
BLAKE2b-256 checksum
How to use checksums
0547c64162f0a554c6f2d78c73b522540bef842beee948aab7d83f46d5205245
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / meshplex-0.22.6-cp314-none-any.whl

Download URL meshplex-0.22.6-cp314-none-any.whl
Size 183.0 kB
Tags CPython 3.14
SHA-256 checksum
How to use checksums
c3e282d33ecac531acae74386f353cc9fc6f82b75735e1a7f1591ed7a2ab699c
BLAKE2b-256 checksum
How to use checksums
0e18c96be56ecab68677d1316a1ab91fa9d21671b2fec2929dcceb93628e3240
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / meshplex-0.22.6-cp313-none-any.whl

Download URL meshplex-0.22.6-cp313-none-any.whl
Size 161.2 kB
Tags CPython 3.13
SHA-256 checksum
How to use checksums
888ae4dfc58f869c43701ad31bf871f5e3a947f3ea605516fe0339ef24724378
BLAKE2b-256 checksum
How to use checksums
4b83268f56b991ebeac6702a26effca800d8dac196dee16cc5b97444c8d3d4f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / meshplex-0.22.6-cp312-none-any.whl

Download URL meshplex-0.22.6-cp312-none-any.whl
Size 159.7 kB
Tags CPython 3.12
SHA-256 checksum
How to use checksums
5414d370bb634d4a4163223824b4a2cac2ecc584f36da6fbd4c165c4baec680d
BLAKE2b-256 checksum
How to use checksums
c445ca77d99937496419303d1ec54653c555e3c2ab1c7f849bd3829032afec07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / meshplex-0.22.6-cp311-none-any.whl

Download URL meshplex-0.22.6-cp311-none-any.whl
Size 165.1 kB
Tags CPython 3.11
SHA-256 checksum
How to use checksums
22bf34bf5060e236bb9cf31431c6904d02cf1a3d58d859bc252f504553a9af6d
BLAKE2b-256 checksum
How to use checksums
3302b8fb00628914008302621f5a5889eb7fb2354e93ff63cf6a97f2e9e7d5de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / meshplex-0.22.6-cp310-none-any.whl

Download URL meshplex-0.22.6-cp310-none-any.whl
Size 81.6 kB
Tags CPython 3.10
SHA-256 checksum
How to use checksums
e4f728edd31c2206bbb7dacd51beb7d0025a6ba44505f4ae275c97b38320288d
BLAKE2b-256 checksum
How to use checksums
6374e3003b6b864121730764b53b60685899ec48466c80bdddcb6f5895d8fb2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for meshplex 0.22.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for meshplex-0.22.6-cp315-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page