Skip to main content

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

Project description

OpenMesh Python Bindings (1.1.6)

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

  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.6.tar.gz (9.1 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.6-cp37-cp37mu-manylinux1_x86_64.whl (618.9 kB view details)

Uploaded CPython 3.7mu

openmesh-1.1.6-cp37-cp37m-win_amd64.whl (487.1 kB view details)

Uploaded CPython 3.7mWindows x86-64

openmesh-1.1.6-cp35-cp35m-macosx_10_13_x86_64.whl (596.4 kB view details)

Uploaded CPython 3.5mmacOS 10.13+ x86-64

openmesh-1.1.6-cp27-cp27mu-manylinux1_x86_64.whl (618.9 kB view details)

Uploaded CPython 2.7mu

openmesh-1.1.6-cp27-cp27m-macosx_10_13_x86_64.whl (596.4 kB view details)

Uploaded CPython 2.7mmacOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: openmesh-1.1.6.tar.gz
  • Upload date:
  • Size: 9.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.3

File hashes

Hashes for openmesh-1.1.6.tar.gz
Algorithm Hash digest
SHA256 cd1c4286ab22b9d50e403c9669e94e41dedc59020d76e069b9b4013066865e2e
MD5 caa84d05e1764eb192e778a22122c384
BLAKE2b-256 9a919b0f9d453e784b041f8759329096366964b4827c7cfb9a19a169b890b7b4

See more details on using hashes here.

File details

Details for the file openmesh-1.1.6-cp37-cp37mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: openmesh-1.1.6-cp37-cp37mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 618.9 kB
  • Tags: CPython 3.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.3

File hashes

Hashes for openmesh-1.1.6-cp37-cp37mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ea9ed4272ee20d1b81080ae1fecae1700d5afb8e440aac3c4a47e82cd76d7b6f
MD5 a3a717be531a2e713559b1378536b6fe
BLAKE2b-256 32969623b5e14c678e4a279afd9e2bccf8ee4f3af06f58e3a34fb85b500a8699

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openmesh-1.1.6-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 487.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.3

File hashes

Hashes for openmesh-1.1.6-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8eea97d424beb2f85bdfb077a342a70f1d490635c3b428de6ae44101cc983c10
MD5 3a89ac4d811db8f07cf9f844a5ff7908
BLAKE2b-256 38fbdf6dceedc9bb94ec9a9b075fe230773512f9c9e689ce0d5fde421558aa56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openmesh-1.1.6-cp35-cp35m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 596.4 kB
  • Tags: CPython 3.5m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.3

File hashes

Hashes for openmesh-1.1.6-cp35-cp35m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2c3bb53bda96647ae177dd684b1ef4bb16968bbd99f5672bbc03669e71a6cfc4
MD5 39ac435b48ed714a54428e012ee8a491
BLAKE2b-256 928490177fa9b816c980a4fde02918aaeaefa54067c45d0dcdf66b8048cc5502

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openmesh-1.1.6-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 618.9 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.3

File hashes

Hashes for openmesh-1.1.6-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2d09b562f5f17eabc922999648aab9902147898ebc084706a4251d5c52d3df79
MD5 50a49a73e814491cdd4f047ac4faaf5e
BLAKE2b-256 66d8454e62ea27428011b1223324e25c825357edf03b8184ee69dc447d9a633d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openmesh-1.1.6-cp27-cp27m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 596.4 kB
  • Tags: CPython 2.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.3

File hashes

Hashes for openmesh-1.1.6-cp27-cp27m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0e80acd8bb5313561761ff72233df1724619e0cd1bf5a9de28f4a3b30d0ceefb
MD5 9a2ae6f3a33f1efdfe0fd0e07448028a
BLAKE2b-256 77789115709163846cf72f7ade03ac65e04e54f89413cc38d5f4dadea850d0c9

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