Skip to main content

meshzoo

PyPi Version PyPI pyversions GitHub stars Downloads

Discord

When generating meshes for FEM/FVM computations, sometimes your geometry is so simple that you don't need a complex mesh generator (like pygmsh, MeshPy, mshr, pygalmesh, dmsh), but something simple and fast that makes use of the structure of the domain. Enter meshzoo.

Installation

Install meshzoo from PyPI with

pip install meshzoo

How to get a license

Licenses for personal and academic use can be purchased here. You'll receive a confirmation email with a license key. Install the key with

plm add <your-license-key>

on your machine and you're good to go.

For commercial use, please contact support@mondaytech.com.

Examples

Triangle

import meshzoo

bary, cells = meshzoo.triangle(8)

# corners = np.array(
#     [
#         [0.0, -0.5 * numpy.sqrt(3.0), +0.5 * numpy.sqrt(3.0)],
#         [1.0, -0.5, -0.5],
#     ]
# )
# points = np.dot(corners, bary).T

# Process the mesh, e.g., write it to a file using meshio
# meshio.write_points_cells("triangle.vtk", points, {"triangle": cells})

Rectangle

import meshzoo
import numpy as np

points, cells = meshzoo.rectangle_tri(
    np.linspace(0.0, 1.0, 11),
    np.linspace(0.0, 1.0, 11),
    variant="zigzag",  # or "up", "down", "center"
)

points, cells = meshzoo.rectangle_quad(
    np.linspace(0.0, 1.0, 11),
    np.linspace(0.0, 1.0, 11),
    cell_type="quad4",  # or "quad8", "quad9"
)

Regular polygon

meshzoo.ngon(4, 8) meshzoo.ngon(6, 8) meshzoo.ngon(9, 8)
import meshzoo

points, cells = meshzoo.ngon(5, 11)

Disk

meshzoo.disk(4, 8) meshzoo.disk(6, 8) meshzoo.disk(9, 8)

The disk meshes are inflations of regular polygons.

import meshzoo

points, cells = meshzoo.disk(6, 11)

points, cells = meshzoo.disk_quad(10, cell_type="quad4")  # or "quad8", "quad9"

Möbius strip

import meshzoo

points, cells = meshzoo.moebius(num_twists=1, nl=60, nw=11)

Sphere (surface)

import meshzoo

points, cells = meshzoo.uv_sphere(num_points_per_circle=20, num_circles=10, radius=1.0)
points, tri, quad = meshzoo.geo_sphere(
    num_points_per_circle=20, num_circles=10, radius=1.0
)

Spheres can also be generated by refining the faces of platonic solids and then "inflating" them. meshzoo implements a few of them. The sphere generated from the icosahedron has the highest-quality (most equilateral) triangles.

All cells are oriented such that its normals point outwards.

meshzoo.tetra_sphere(10) meshzoo.octa_sphere(10) meshzoo.icosa_sphere(10)

Ball (solid)

import meshzoo

points, cells = meshzoo.ball_tetra(10)
points, cells = meshzoo.ball_hexa(10)

Tube

import meshzoo

points, cells = meshzoo.tube(length=1.0, radius=1.0, n=30)

Cube

import meshzoo
import numpy as np

points, cells = meshzoo.cube_tetra(
    np.linspace(0.0, 1.0, 11), np.linspace(0.0, 1.0, 11), np.linspace(0.0, 1.0, 11)
)
points, cells = meshzoo.cube_hexa(
    np.linspace(0.0, 1.0, 11), np.linspace(0.0, 1.0, 11), np.linspace(0.0, 1.0, 11)
)

Metadata

Release files for meshzoo 0.12.5

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 meshzoo 0.12.5
File
meshzoo-0.12.5-cp315-none-any.whl CPython 3.15 none any Details
meshzoo-0.12.5-cp314-none-any.whl CPython 3.14 none any Details
meshzoo-0.12.5-cp313-none-any.whl CPython 3.13 none any Details
meshzoo-0.12.5-cp312-none-any.whl CPython 3.12 none any Details
meshzoo-0.12.5-cp311-none-any.whl CPython 3.11 none any Details
meshzoo-0.12.5-cp310-none-any.whl CPython 3.10 none any Details

Total release size: 398.8 kB

Release files / meshzoo-0.12.5-cp315-none-any.whl

Download URL meshzoo-0.12.5-cp315-none-any.whl
Size 73.9 kB
Tags CPython 3.15
SHA-256 checksum
How to use checksums
04ca3800160b4a2a574ac03b48c7d9994268fa5c6a3ce56171f7c90a48cad2de
BLAKE2b-256 checksum
How to use checksums
99e2669d1ec168ea514a28d7d7a80c692270fdbedc03f35a656cd7b389b66fcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release files / meshzoo-0.12.5-cp314-none-any.whl

Download URL meshzoo-0.12.5-cp314-none-any.whl
Size 73.8 kB
Tags CPython 3.14
SHA-256 checksum
How to use checksums
63b29ea3f300fc3d84b552df2e5b35994dd19a79862c25bb14a676335a592f64
BLAKE2b-256 checksum
How to use checksums
f2f69effcef8333a11f1ad7b58d9ead74cd2a1a4beb8a3267839cdad73b56b43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release files / meshzoo-0.12.5-cp313-none-any.whl

Download URL meshzoo-0.12.5-cp313-none-any.whl
Size 67.7 kB
Tags CPython 3.13
SHA-256 checksum
How to use checksums
0f6089c9552657b33dc27149def520f3c8932e2c60114750e0e37d428d6d05cd
BLAKE2b-256 checksum
How to use checksums
47167a16bf9c6500e0cf0e543a462a211c18fdeedbfddabe8b652c4cea7282a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release files / meshzoo-0.12.5-cp312-none-any.whl

Download URL meshzoo-0.12.5-cp312-none-any.whl
Size 69.0 kB
Tags CPython 3.12
SHA-256 checksum
How to use checksums
4fbc5ca4b24a6fa3d49ee5acd02ae4d651ab6916abc098ffe3b421740fcd16a3
BLAKE2b-256 checksum
How to use checksums
ab2eee2a4f100cc20140185384bbb3c9fe301feb9cb5b31314f43b46f4a4aac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release files / meshzoo-0.12.5-cp311-none-any.whl

Download URL meshzoo-0.12.5-cp311-none-any.whl
Size 75.7 kB
Tags CPython 3.11
SHA-256 checksum
How to use checksums
743b83ec5c87e139156025c5e4ecf116263ef5ae27141157c5b29e33ec9cdd24
BLAKE2b-256 checksum
How to use checksums
df1cd5e373c19ed42e02554c5747fea3cecfd82bde0974ad160702d7ca3499ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release files / meshzoo-0.12.5-cp310-none-any.whl

Download URL meshzoo-0.12.5-cp310-none-any.whl
Size 38.7 kB
Tags CPython 3.10
SHA-256 checksum
How to use checksums
de7b550eafc0cd6de0835c24cf81b5081de35f99024ca47253ab1861b894d707
BLAKE2b-256 checksum
How to use checksums
6fd851f4ff4a4390a7d1b9c5e1c8e4100cc383d2ffc7c42155114a9577a1f722
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.13.1

5 release files

This release

0.12.5 This release

6 release files

0.12.2

5 release files

0.12.0

4 release files

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