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.post28

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.post28
File Size Uploaded
openmesh-1.0.0.post28.tar.gz 8.9 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for openmesh 1.0.0.post28
File
openmesh-1.0.0.post28-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
openmesh-1.0.0.post28-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
openmesh-1.0.0.post28-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.post28-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.post28-cp27-cp27m-macosx_10_13_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.13+ x86-64 Details

Total release size: 11.7 MB

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

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

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

Download URL openmesh-1.0.0.post28-cp36-cp36m-win_amd64.whl
Size 492.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
c6dffc65c1acb8c87951df5a0875637e99b02c7d9dec8c531eb5f6a5db0c1dbf
BLAKE2b-256 checksum
How to use checksums
e19ed0917a6fb3bd31744c28349e87e169266656a7d83f28cc5ac0ceeb084955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

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

Download URL openmesh-1.0.0.post28-cp35-cp35m-macosx_10_13_x86_64.whl
Size 604.6 kB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
8df1ecb938afb36ec011ce0b32a7d1fbab74c66150b9fc51a63a2222a1f1e1ff
BLAKE2b-256 checksum
How to use checksums
8a9e6e6dff76c5097ace12cb41e702929f7e99295bac5a45a9ff91d61a83e987
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

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

Download URL openmesh-1.0.0.post28-cp27-cp27m-macosx_10_13_x86_64.whl
Size 604.9 kB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
076973f8d3da2086c31565095385cd494867adde8f560c6fa81744ce2062d096
BLAKE2b-256 checksum
How to use checksums
50d8f0eb2ac10a1cc0605ffe4717336b89a33d8eb436ff8877ff3a546bc49749
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.post28 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