ADMesh bindings for Python
This module provides bindings for the ADMesh library. It lets you manipulate 3D models in binary or ASCII STL format and partially repair them if necessary.
Installation
There are wheels available for Linux and macOS X. All you need to do is:
pip install admesh
If you have a platform not supported by the above, you’ll need to install the C ADMesh library.
This release is designed for ADMesh 0.98.x. Follow the instructions there. Then you can install this as usual with one of the following:
./setup.py install
python3 setup.py install # for Python 3
pip install admesh # install directly from PyPI
In case your ADMesh library is located in non-standard location, you’ll have to tell the compiler and linker where to look:
LDFLAGS='-L/path/to/library' CFLAGS='-I/path/to/header' ./setup.py install
Usage
Use the Stl class provided.
import admesh
# load an STL file
stl = admesh.Stl('file.stl')
# observe the available methods
help(stl)
# read the stats
stl.stats
# see how many facets are there
len(stl)
# walk the facets
for facet in stl:
# get the normal
facet['normal']
# walk the vertices
for vertex in facet['vertex']:
# read the coordinates
vertex['x']
vertex['y']
vertex['z']
# add another set of facets
# every facet is a tuple (vertices, normal) or a dict
stl.add_facets([
(((0, 0, 0), (0, 1, 0), (0, 0, 1)), (1, 0, 0)),
{'vertex': [{'x': 0, 'y': 0, 'z': 0},
{'x': 1, 'y': 0, 'z': 0},
{'x': 0, 'y': 0, 'z': 1}],
'normal': {'x': 0, 'y': 1, 'z': 0}},
])
Note that all C ADMesh functions start with stl_ prefix and the Python methods of this module do not. Also note that not all C ADMesh functions are provided, because some would require more complicated approach and are not considered worthy. In case you are missing some functions, create new issue.
Metadata
Release files for admesh 0.98.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| admesh-0.98.9.tar.gz | 16.5 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| admesh-0.98.9-cp37-cp37m-manylinux1_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| admesh-0.98.9-cp37-cp37m-manylinux1_i686.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.5+ x86-32 | Details |
| admesh-0.98.9-cp37-cp37m-macosx_10_6_intel.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| admesh-0.98.9-cp36-cp36m-manylinux1_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| admesh-0.98.9-cp36-cp36m-manylinux1_i686.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.5+ x86-32 | Details |
| admesh-0.98.9-cp36-cp36m-macosx_10_6_intel.whl | CPython 3.6 | CPython 3.6 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| admesh-0.98.9-cp35-cp35m-manylinux1_x86_64.whl | CPython 3.5 | CPython 3.5 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| admesh-0.98.9-cp35-cp35m-manylinux1_i686.whl | CPython 3.5 | CPython 3.5 pymalloc | Linux glibc 2.5+ x86-32 | Details |
| admesh-0.98.9-cp35-cp35m-macosx_10_6_intel.whl | CPython 3.5 | CPython 3.5 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| admesh-0.98.9-cp34-cp34m-manylinux1_x86_64.whl | CPython 3.4 | CPython 3.4 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| admesh-0.98.9-cp34-cp34m-manylinux1_i686.whl | CPython 3.4 | CPython 3.4 pymalloc | Linux glibc 2.5+ x86-32 | Details |
| admesh-0.98.9-cp34-cp34m-macosx_10_6_intel.whl | CPython 3.4 | CPython 3.4 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| admesh-0.98.9-cp27-cp27mu-manylinux1_x86_64.whl | CPython 2.7 | CPython 2.7 pymalloc wide-unicode | Linux glibc 2.5+ x86-64 | Details |
| admesh-0.98.9-cp27-cp27mu-manylinux1_i686.whl | CPython 2.7 | CPython 2.7 pymalloc wide-unicode | Linux glibc 2.5+ x86-32 | Details |
| admesh-0.98.9-cp27-cp27m-manylinux1_x86_64.whl | CPython 2.7 | CPython 2.7 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| admesh-0.98.9-cp27-cp27m-manylinux1_i686.whl | CPython 2.7 | CPython 2.7 pymalloc | Linux glibc 2.5+ x86-32 | Details |
| admesh-0.98.9-cp27-cp27m-macosx_10_6_intel.whl | CPython 2.7 | CPython 2.7 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
Total release size: 2.8 MB
Release files / admesh-0.98.9.tar.gz
| Download URL | admesh-0.98.9.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ce7db7dc38b957f0e31de9bf554fdc8bedaf59e41a53dec548c17530ec7f639
|
|
BLAKE2b-256 checksum How to use checksums |
be1865160f0b5c6b2e08627ea96dc6f1b65a99898b9caddd8f97f47b338491a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp37-cp37m-manylinux1_x86_64.whl
| Download URL | admesh-0.98.9-cp37-cp37m-manylinux1_x86_64.whl |
|---|---|
| Size | 205.0 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
c8d09cda35211fa1f6106674d255a08a0d75e12eb98160557b8df13c8583ba37
|
|
BLAKE2b-256 checksum How to use checksums |
abf65b4e1c43f99d0a963bae3af01903c8df05e388904d9920b8b7619cb5bc74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp37-cp37m-manylinux1_i686.whl
| Download URL | admesh-0.98.9-cp37-cp37m-manylinux1_i686.whl |
|---|---|
| Size | 188.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
bb618e1ca75795ac7aaa7940d9e9f1d4709c32b364004f3b764249136e1e70cc
|
|
BLAKE2b-256 checksum How to use checksums |
02f45165b7ee62707ffc51351c4f93ca77f44a31dd9b4977e0cf4d92a4e5a474
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp37-cp37m-macosx_10_6_intel.whl
| Download URL | admesh-0.98.9-cp37-cp37m-macosx_10_6_intel.whl |
|---|---|
| Size | 94.7 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
c6440dc004543c30a1256cf2293b71e72c792a0dfd043716c0d3dca7b32b7bcc
|
|
BLAKE2b-256 checksum How to use checksums |
b4c8636bb1a182d96027f31cc86a6f231d5916553135026e7ffa79f4dd3f1c95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp36-cp36m-manylinux1_x86_64.whl
| Download URL | admesh-0.98.9-cp36-cp36m-manylinux1_x86_64.whl |
|---|---|
| Size | 204.9 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
43a86d675a1002a505bf9217fee2cb06b7df43fb6c47d81259b8b8ac91aa9917
|
|
BLAKE2b-256 checksum How to use checksums |
bebae2e1227897cd52eb4dd3d259b233128a65b74dfd6dd2adbd84b1237db97a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp36-cp36m-manylinux1_i686.whl
| Download URL | admesh-0.98.9-cp36-cp36m-manylinux1_i686.whl |
|---|---|
| Size | 187.8 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
3608d5f58c894d80e61833f9443efcfb7776f4a9daf55ca9a4dcddfe37729bf5
|
|
BLAKE2b-256 checksum How to use checksums |
b9f11b8c67d251665a6e23f998e77b5952d2cbc13c22c6687daa16fb13de7d57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp36-cp36m-macosx_10_6_intel.whl
| Download URL | admesh-0.98.9-cp36-cp36m-macosx_10_6_intel.whl |
|---|---|
| Size | 94.9 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
79eb8f4fae6d865118552fb7f7236cdee09dac510445770f4c45a9ade8531ca8
|
|
BLAKE2b-256 checksum How to use checksums |
23fab7679b8569fe64db07d5cd9ebccdda43cb6f6bc5a5a8dfcd4d83316df3bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp35-cp35m-manylinux1_x86_64.whl
| Download URL | admesh-0.98.9-cp35-cp35m-manylinux1_x86_64.whl |
|---|---|
| Size | 203.8 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
0c23d05101aaf11a51dbe2c5cb280886bcbaf29b1a988c1e7a9d471b4ead22bb
|
|
BLAKE2b-256 checksum How to use checksums |
1b2bd2656a5dd06fac9471c140d4fd6fa66bd654fe809045962c405ca430b861
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp35-cp35m-manylinux1_i686.whl
| Download URL | admesh-0.98.9-cp35-cp35m-manylinux1_i686.whl |
|---|---|
| Size | 186.9 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
41d426653471ca741a957dc84e84708b94b3408cbcbcd8281a482e8f7503a01a
|
|
BLAKE2b-256 checksum How to use checksums |
9a2ec03100b39f2ca61d89117294069ba82c43b2754ebe8ffbca9945f60e4d75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp35-cp35m-macosx_10_6_intel.whl
| Download URL | admesh-0.98.9-cp35-cp35m-macosx_10_6_intel.whl |
|---|---|
| Size | 95.0 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
55228137681c220600c84cc8bb46d321162a67154c67a8f317bcb441c33d7790
|
|
BLAKE2b-256 checksum How to use checksums |
ccfe6217b46746e4df0617f8402cb668dcfbacf2713f2587b5147016a75399ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp34-cp34m-manylinux1_x86_64.whl
| Download URL | admesh-0.98.9-cp34-cp34m-manylinux1_x86_64.whl |
|---|---|
| Size | 207.6 kB |
| Tags | CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
0f9b563b72c43f6da0f248bcb4dbde0b6eb75c9ebd2a03b54b04e048b8eb004e
|
|
BLAKE2b-256 checksum How to use checksums |
f1e66cfe957103820b558661b6a2a029ae34527e5c4c54eedd057134dc42d5d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp34-cp34m-manylinux1_i686.whl
| Download URL | admesh-0.98.9-cp34-cp34m-manylinux1_i686.whl |
|---|---|
| Size | 189.3 kB |
| Tags | CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
19470eab5a72a40f0e7595abcb2483382043f25a6283be34e3af5dd5fc7360e3
|
|
BLAKE2b-256 checksum How to use checksums |
bfa03490cda0f3a765e509c780103741652ad47eef45bb1b9fae2f8f1083e23d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp34-cp34m-macosx_10_6_intel.whl
| Download URL | admesh-0.98.9-cp34-cp34m-macosx_10_6_intel.whl |
|---|---|
| Size | 101.9 kB |
| Tags | CPython 3.4 CPython 3.4 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
89e3eef0038d3c3eac97bb0de207c3267375756dfe5472616896017fa9f66e38
|
|
BLAKE2b-256 checksum How to use checksums |
7bb7e152a73bbcc3de02e5a84a7c7567f51ad336710c78e58d654a921de666b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp27-cp27mu-manylinux1_x86_64.whl
| Download URL | admesh-0.98.9-cp27-cp27mu-manylinux1_x86_64.whl |
|---|---|
| Size | 185.2 kB |
| Tags | CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
2b03be7cac244068d80bb3c564edcbaca7c8486111f3266fd53e7aea0ae9a0f7
|
|
BLAKE2b-256 checksum How to use checksums |
5bb7ff73b4182b5008faf8f66f71463cd0ed0f4b4959457e5a829b2bdd79758d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp27-cp27mu-manylinux1_i686.whl
| Download URL | admesh-0.98.9-cp27-cp27mu-manylinux1_i686.whl |
|---|---|
| Size | 168.9 kB |
| Tags | CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
21c9b058ac03f6ffec08a89d41842462216aa2a22010203caa89ec0b8dca2265
|
|
BLAKE2b-256 checksum How to use checksums |
e9cd0222b14f22ea978134c35ea287aa076fea2d98d5e2dbe8a070bb23600ebf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp27-cp27m-manylinux1_x86_64.whl
| Download URL | admesh-0.98.9-cp27-cp27m-manylinux1_x86_64.whl |
|---|---|
| Size | 185.1 kB |
| Tags | CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
d3bce239a44ddcbde4f0e4e4f1dc6a529507fe0b24e5af6f45ea5c1d7650b517
|
|
BLAKE2b-256 checksum How to use checksums |
49085cac45f81e3b343b2de43378d137e505bad247ece694d5736209fd81fb17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp27-cp27m-manylinux1_i686.whl
| Download URL | admesh-0.98.9-cp27-cp27m-manylinux1_i686.whl |
|---|---|
| Size | 168.9 kB |
| Tags | CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
398d31d505be5569345fe28d0bec9917aed74a78e8fec5870002de0b69974280
|
|
BLAKE2b-256 checksum How to use checksums |
333d2abf1a7fe120262a092a7e57a5214418f794074f8176485dba0300e227db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / admesh-0.98.9-cp27-cp27m-macosx_10_6_intel.whl
| Download URL | admesh-0.98.9-cp27-cp27m-macosx_10_6_intel.whl |
|---|---|
| Size | 100.8 kB |
| Tags | CPython 2.7 CPython 2.7 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
b41ddfc57db9239b19b48a22c5cae34d1199203854fe46c95e9c00f939e72d1f
|
|
BLAKE2b-256 checksum How to use checksums |
bfc91eac76ea5e1cc8929dc47216d7166056aceb30b1a24a3e06a2e656ccf915
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |