OpenMesh Python Bindings (1.2.1)
OpenMesh is a versatile halfedge-based data structure for representing and manipulating polygon meshes. The OpenMesh Python bindings are are tightly integrated with numpy and are implemented using pybind11.
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
Using conda
Thanks to Martin Drawitsch you can also install openmesh-python via conda:
conda install -c conda-forge openmesh-python
Building from source
- recursively clone the repo
cdto repo dir- ensure the correct virtualenv is activated
pip install -e .
Metadata
Release files for openmesh 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openmesh-1.2.1.tar.gz | 9.3 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| openmesh-1.2.1-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details |
| openmesh-1.2.1-cp39-cp39-manylinux1_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.5+ x86-64 | Details |
| openmesh-1.2.1-cp39-cp39-macosx_12_0_arm64.whl | CPython 3.9 | CPython 3.9 | macOS 12.0+ ARM64 | Details |
| openmesh-1.2.1-cp39-cp39-macosx_10_13_x86_64.whl | CPython 3.9 | CPython 3.9 | macOS 10.13+ x86-64 | Details |
Total release size: 12.1 MB
Release files / openmesh-1.2.1.tar.gz
| Download URL | openmesh-1.2.1.tar.gz |
|---|---|
| Size | 9.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6fd3fa41a68148e4a7523f562426aa9758bf65ccc6642abcf79c37bae9c6af3c
|
|
BLAKE2b-256 checksum How to use checksums |
6634fd86bf3ca48d010f3a588fa997595c13162bc07563382f9a4d5ec8855dfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/22.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
|
Release files / openmesh-1.2.1-cp39-cp39-win_amd64.whl
| Download URL | openmesh-1.2.1-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 590.9 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
39aef855270758ae51b6505fd9845025142c274f8dce5633ad27f0a8ab14c3b4
|
|
BLAKE2b-256 checksum How to use checksums |
5e307b5ffd02d21541f0759e8764ead78bebae9e96343592a4d2beb4fd66c300
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/22.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
|
Release files / openmesh-1.2.1-cp39-cp39-manylinux1_x86_64.whl
| Download URL | openmesh-1.2.1-cp39-cp39-manylinux1_x86_64.whl |
|---|---|
| Size | 844.0 kB |
| Tags | CPython 3.9 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
e91c81f286f4e3443bca0f57b850d04f2ab4888930d08f84715f69fdaac604c3
|
|
BLAKE2b-256 checksum How to use checksums |
d81635cf9e1b6984bb4af5384424c6bfbe338dfde89ed64c1e53bcee6d91df71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/22.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
|
Release files / openmesh-1.2.1-cp39-cp39-macosx_12_0_arm64.whl
| Download URL | openmesh-1.2.1-cp39-cp39-macosx_12_0_arm64.whl |
|---|---|
| Size | 660.0 kB |
| Tags | CPython 3.9 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e98e09a05504f25584a0e9dbcf74c71c85707bbd8c03010a0a9ec7f9b80fa29e
|
|
BLAKE2b-256 checksum How to use checksums |
f34cb7e7217ccbcda182d7c8d766a201cc46a8bd83bb73d6e83d7aa0ca8f64cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/22.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
|
Release files / openmesh-1.2.1-cp39-cp39-macosx_10_13_x86_64.whl
| Download URL | openmesh-1.2.1-cp39-cp39-macosx_10_13_x86_64.whl |
|---|---|
| Size | 768.5 kB |
| Tags | CPython 3.9 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7c99c55777cac2183e6161d2cd37723537c74ab57d6483e346931bd4dd5fff9
|
|
BLAKE2b-256 checksum How to use checksums |
0ebccbd370af575d36d821c7823dfae39dea8e9d7d88de7baf99bbf12db6e5e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/22.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
|