Skip to main content

OpenMesh Python Bindings

OpenMesh Python bindings implemented with pybind11 that are tightly integrated with numpy.

Example

import openmesh as om
import numpy as np

mesh = om.TriMesh()

# add a a couple of vertices to the mesh
vh0 = mesh.add_vertex([0, 1, 0])
vh1 = mesh.add_vertex([1, 0, 0])
vh2 = mesh.add_vertex([2, 1, 0])
vh3 = mesh.add_vertex([0,-1, 0])
vh4 = mesh.add_vertex([2,-1, 0])

# add a couple of faces to the mesh
fh0 = mesh.add_face(vh0, vh1, vh2)
fh1 = mesh.add_face(vh1, vh3, vh4)
fh2 = mesh.add_face(vh0, vh3, vh1)

# add another face to the mesh, this time using a list
vh_list = [vh2, vh1, vh4]
fh3 = mesh.add_face(vh_list)

#  0 ==== 2
#  |\  0 /|
#  | \  / |
#  |2  1 3|
#  | /  \ |
#  |/  1 \|
#  3 ==== 4

# get the point with vertex handle vh0
point = mesh.point(vh0)

# get all points of the mesh
point_array = mesh.points()

# translate the mesh along the x-axis
point_array += np.array([1, 0, 0])

# write and read meshes
om.write_mesh('test.off', mesh)
mesh_2 = om.read_trimesh('test_off')

For further examples see the documentation or refer to the unit tests.

Installation

Using pip

pip install openmesh

Prebuilt Binaries

We provide prebuilt wheels for manual installation with pip for the following configurations:

Linux

macOS 10.13

Windows

Building from source

  1. recursively clone the repo
  2. cd to repo dir
  3. pip install -e . (or pip install -e . --user if you are not root or in a virtualenv)

Metadata

Release files for openmesh 1.0.0.post34

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

Source distribution (sdist)

Source distribution for openmesh 1.0.0.post34
File Size Uploaded
openmesh-1.0.0.post34.tar.gz 8.9 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for openmesh 1.0.0.post34
File
openmesh-1.0.0.post34-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
openmesh-1.0.0.post34-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
openmesh-1.0.0.post34-cp35-cp35m-macosx_10_13_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.13+ x86-64 Details
openmesh-1.0.0.post34-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
openmesh-1.0.0.post34-cp27-cp27m-macosx_10_13_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.13+ x86-64 Details

Total release size: 12.0 MB

Release files / openmesh-1.0.0.post34.tar.gz

Download URL openmesh-1.0.0.post34.tar.gz
Size 8.9 MB
Tags Source
SHA-256 checksum
How to use checksums
9c8c36d9435ff8963e1acb4409057c1ada2464f2f87d7f441e5a5aab0b685b82
BLAKE2b-256 checksum
How to use checksums
072f8012710c6f020c2434f155359fa86efa8c1a902fc640bc7dc0cbabec096c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / openmesh-1.0.0.post34-cp36-cp36m-win_amd64.whl

Download URL openmesh-1.0.0.post34-cp36-cp36m-win_amd64.whl
Size 526.2 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
4206d2964b2352333a13e89240c3373612fec7f85e956154efad2106210f81fe
BLAKE2b-256 checksum
How to use checksums
1b7fe7cb64388bc7797dd54319fb4b6a5b66c710a55a96894ff90f1cbe080296
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / openmesh-1.0.0.post34-cp35-cp35m-manylinux1_x86_64.whl

Download URL openmesh-1.0.0.post34-cp35-cp35m-manylinux1_x86_64.whl
Size 605.9 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b0caac433686d0f94c1454acc11e1d6cb9f55b7986adcdebb586ae8c47dad71b
BLAKE2b-256 checksum
How to use checksums
b81c20d68dca6453e161cbb9f0f3f43d6f1af722d23382ecda0dee0f51fd4204
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / openmesh-1.0.0.post34-cp35-cp35m-macosx_10_13_x86_64.whl

Download URL openmesh-1.0.0.post34-cp35-cp35m-macosx_10_13_x86_64.whl
Size 683.9 kB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
02034e47785b0a9a6ea21f66b0b5aa215509c8747411ba1a21d1dad7d176b8b0
BLAKE2b-256 checksum
How to use checksums
981e3e2b1b2d541ed2e86d3d1aa6c38d30c2d6083c4ae49811c000c22d51eeff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / openmesh-1.0.0.post34-cp27-cp27mu-manylinux1_x86_64.whl

Download URL openmesh-1.0.0.post34-cp27-cp27mu-manylinux1_x86_64.whl
Size 607.5 kB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
8c1573b4fa6963464e119e73881e6d2dcc2881e6095bf466b7becac64c23439c
BLAKE2b-256 checksum
How to use checksums
683136a0e97cd27668a2658756ab12dc17ca56ae163017f1db5a1f0663bb9692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / openmesh-1.0.0.post34-cp27-cp27m-macosx_10_13_x86_64.whl

Download URL openmesh-1.0.0.post34-cp27-cp27m-macosx_10_13_x86_64.whl
Size 684.2 kB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
dd828577593de8f98bdcb7bed9e3a2fc7790fab1e3f1e60db770c00b5f6c0f99
BLAKE2b-256 checksum
How to use checksums
990fb8f0b3d3c20076a0d5e41b8aff7cce2d909ff3c31e0026b0b0c7a070bad2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.2.1

5 release files

1.1.6

6 release files

1.1.3

6 release files

1.1.2

6 release files

1.1.1

6 release files

1.1.0

6 release files

This release

1.0.0.post34 This release

6 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