Skip to main content

a versatile halfedge-based data structure for representing and manipulating polygon meshes

Project description

OpenMesh Python Bindings

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

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. ensure the correct virtualenv is activated
  4. pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openmesh-1.1.3.tar.gz (8.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

openmesh-1.1.3-cp37-cp37m-win_amd64.whl (533.9 kB view details)

Uploaded CPython 3.7mWindows x86-64

openmesh-1.1.3-cp35-cp35m-manylinux1_x86_64.whl (632.7 kB view details)

Uploaded CPython 3.5m

openmesh-1.1.3-cp35-cp35m-macosx_10_13_x86_64.whl (705.1 kB view details)

Uploaded CPython 3.5mmacOS 10.13+ x86-64

openmesh-1.1.3-cp27-cp27mu-manylinux1_x86_64.whl (630.4 kB view details)

Uploaded CPython 2.7mu

openmesh-1.1.3-cp27-cp27m-macosx_10_13_x86_64.whl (705.5 kB view details)

Uploaded CPython 2.7mmacOS 10.13+ x86-64

File details

Details for the file openmesh-1.1.3.tar.gz.

File metadata

  • Download URL: openmesh-1.1.3.tar.gz
  • Upload date:
  • Size: 8.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.5.3

File hashes

Hashes for openmesh-1.1.3.tar.gz
Algorithm Hash digest
SHA256 c1d24abc85b7b518fe619639f89750bf19ed3b8938fed4dd739a72f1e6f8b0f6
MD5 300f651bdbf98600d828900021df3305
BLAKE2b-256 f81222c3353c44478c504f2fa18c0a51991734f908bd8218fb655e60f5f398e5

See more details on using hashes here.

File details

Details for the file openmesh-1.1.3-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: openmesh-1.1.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 533.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.5.3

File hashes

Hashes for openmesh-1.1.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 898ccc540367d02ab0b16cbc887367bc267edebc07132ce829f658dc15080283
MD5 e49925669e83882c47fc3b5276b1db3c
BLAKE2b-256 ef9482edabe14abbf085ba7dac234baf253398a1eaba434ae5e37a7db657919e

See more details on using hashes here.

File details

Details for the file openmesh-1.1.3-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: openmesh-1.1.3-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 632.7 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.5.3

File hashes

Hashes for openmesh-1.1.3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 34fa578f381c93bf23eee9501310c0d098b752441eea9c6d7998f75da9a8ac96
MD5 c53d96bf11d8822759f4c708f35bc491
BLAKE2b-256 1cd49d1e5b19ea5a9c736936d7cd2b07ff9d05ad66e27767ad727956469479f3

See more details on using hashes here.

File details

Details for the file openmesh-1.1.3-cp35-cp35m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: openmesh-1.1.3-cp35-cp35m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 705.1 kB
  • Tags: CPython 3.5m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.5.3

File hashes

Hashes for openmesh-1.1.3-cp35-cp35m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8ddb2197203b89676891c900fbfa9cd0df3c8ec13ec4731a98ee536b254f54b9
MD5 a0b26b846f355d53f84c3b772cb97d8f
BLAKE2b-256 9be0bd00d836b4ed8bd2040a0c2d2428785999bb010c5e07ba1b75c67042d108

See more details on using hashes here.

File details

Details for the file openmesh-1.1.3-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: openmesh-1.1.3-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 630.4 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.5.3

File hashes

Hashes for openmesh-1.1.3-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d5ab329392d4040a3b0d1069af11892ccd14074a106293ec12ce0691986c1c8a
MD5 6c5f786b54ea8bc1d78f29434283b6fa
BLAKE2b-256 6bf974db160e1b5d3b6a0c5f823af0eedaee6428c00ac8fe41f870c08dfe2210

See more details on using hashes here.

File details

Details for the file openmesh-1.1.3-cp27-cp27m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: openmesh-1.1.3-cp27-cp27m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 705.5 kB
  • Tags: CPython 2.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.5.3

File hashes

Hashes for openmesh-1.1.3-cp27-cp27m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bbab060a904942ccc9d45578d5b6d130b16691421097148077fb19ab07a8fda6
MD5 3f1267a9a2828093afdb63388bbc600e
BLAKE2b-256 fd31adcdee9b4dc0808d079ffc1e7ace19ad3e0dfe2894515023808da118459d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page