Skip to main content

ADMesh bindings for Python

https://badge.fury.io/py/admesh.svg https://travis-ci.org/admesh/python-admesh.png?branch=master https://pypip.in/d/admesh/badge.png

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

First, you’ll need to install the 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']

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

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for admesh 0.98.6
File Size Uploaded Provenance Actions
admesh-0.98.6.tar.gz 14.9 kB Without provenance Details for admesh-0.98.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for admesh 0.98.6
File Interpreter ABI Platform Actions
admesh-0.98.6-py2.7-linux-x86_64.egg Legacy Egg format - - Details for admesh-0.98.6-py2.7-linux-x86_64.egg

Total release size: 71.7 kB

Release files / admesh-0.98.6.tar.gz

Download URL admesh-0.98.6.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9ef3895d3bac6962a6532b44f5aeaa2591a21c860e466a560020ecfea89af273
BLAKE2b-256 checksum
How to use checksums
8b45d1146bf465cb233ef1e9f89df77a56d976643ce5f251ceb16eb3a90ee45a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / admesh-0.98.6-py2.7-linux-x86_64.egg

Download URL admesh-0.98.6-py2.7-linux-x86_64.egg
Size 56.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
2ba1972c3248d113c90f5a1209181f8c936377a29e3ac85c2fa03cd5112e2f32
BLAKE2b-256 checksum
How to use checksums
18d4c83ddeef529e339533ba3245ae4ab8d3ad891f5635b629bd4c9a85ee6756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for admesh 0.98.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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