A lightweight library for importing and exporting surface mesh files in multiple formats
Project description
pylmesh
pylmesh is a lightweight python library for importing and exporting surface mesh files in multiple formats. The library is designed in C++ with python bindings to feature high performance and loading large scale meshes.
Supported Formats
- OBJ (Wavefront) - Import/Export
- STL (ASCII) - Import/Export
- PLY (ASCII) - Import/Export
- OFF (Object File Format) - Import/Export
- GLTF - Import/Export
- GLB - Import/Export (with Draco compression)
Usage
Python
import pylmesh
# Load mesh
mesh = pylmesh.load_mesh("model.obj")
print(f"Vertices: {mesh.vertex_count()}")
print(f"Faces: {mesh.face_count()}")
# Compute surface area
area = mesh.surface_area()
print(f"Surface area: {area}")
# Save mesh
pylmesh.save_mesh("output.stl", mesh)
C++
#include <pylmesh/loader.h>
#include <pylmesh/exporter.h>
pylmesh::Mesh mesh;
if (pylmesh::MeshLoaderFactory::loadMesh("model.obj", mesh)) {
// Use mesh data
pylmesh::MeshExporterFactory::saveMesh("output.stl", mesh);
}
Installation
Python Package
pip install .
With trimesh support:
pip install .[trimesh]
With development tools:
pip install .[dev]
Dependencies are automatically downloaded during build. No manual setup required!
C++ Library
mkdir build && cd build
cmake ..
make
All dependencies (tinygltf, nlohmann/json, stb, draco) are automatically downloaded.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylmesh-0.0.5.tar.gz.
File metadata
- Download URL: pylmesh-0.0.5.tar.gz
- Upload date:
- Size: 19.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67d95700b714352197e5af038e812d4c565a13ca293ce6ebddf9cbc3c977bea6
|
|
| MD5 |
26ed4573dae1d7865b7e241f8c987f18
|
|
| BLAKE2b-256 |
3882975df899e43611293659e5edfd9dfcfde09dd045e860c325b5441b6e7775
|
Provenance
The following attestation bundles were made for pylmesh-0.0.5.tar.gz:
Publisher:
ci.yml on openbraininstitute/pylmesh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylmesh-0.0.5.tar.gz -
Subject digest:
67d95700b714352197e5af038e812d4c565a13ca293ce6ebddf9cbc3c977bea6 - Sigstore transparency entry: 1090810408
- Sigstore integration time:
-
Permalink:
openbraininstitute/pylmesh@1d9d6362b7ec2bf17fd5c1450f00df2d747223c7 -
Branch / Tag:
refs/tags/v0.0.5-rc1 - Owner: https://github.com/openbraininstitute
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@1d9d6362b7ec2bf17fd5c1450f00df2d747223c7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylmesh-0.0.5-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pylmesh-0.0.5-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32398ab2d0b416ea0760279cb5078ab5d4b5eed23dd0b39eb4cdf729e2022942
|
|
| MD5 |
ce71a2c52baf263abd48a2d8972bfeac
|
|
| BLAKE2b-256 |
2dda0188112f7549e681b1c81baf715e4553595d0d43662350ccc7da8eb0acfb
|
Provenance
The following attestation bundles were made for pylmesh-0.0.5-cp312-cp312-manylinux_2_28_x86_64.whl:
Publisher:
ci.yml on openbraininstitute/pylmesh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylmesh-0.0.5-cp312-cp312-manylinux_2_28_x86_64.whl -
Subject digest:
32398ab2d0b416ea0760279cb5078ab5d4b5eed23dd0b39eb4cdf729e2022942 - Sigstore transparency entry: 1090810465
- Sigstore integration time:
-
Permalink:
openbraininstitute/pylmesh@1d9d6362b7ec2bf17fd5c1450f00df2d747223c7 -
Branch / Tag:
refs/tags/v0.0.5-rc1 - Owner: https://github.com/openbraininstitute
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@1d9d6362b7ec2bf17fd5c1450f00df2d747223c7 -
Trigger Event:
push
-
Statement type: