Skip to main content
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.

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
admesh-0.98.6.tar.gz 14.9 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

0.98.7

1 release file

This release

0.98.6 This release

2 release files

0.98.5

2 release files

0.98.4

1 release file

0.98.3

1 release file

0.98.2

1 release file

0.98.1

1 release file

0.98

1 release file

0.96

1 release file

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