Skip to main content

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()}")

# 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

pylmesh-0.0.3.tar.gz (19.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylmesh-0.0.3-cp312-cp312-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

File details

Details for the file pylmesh-0.0.3.tar.gz.

File metadata

  • Download URL: pylmesh-0.0.3.tar.gz
  • Upload date:
  • Size: 19.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pylmesh-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a63257e7a98675b643969c4e053799be94dff39ea358e49ae30cb07e42ff4489
MD5 957dfd44faf8631c5b91dc349ece17ec
BLAKE2b-256 6081f56618061fc7255912bd18438e7540f757f0443a12f51d67c3c5e5693049

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmesh-0.0.3.tar.gz:

Publisher: ci.yml on openbraininstitute/pylmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmesh-0.0.3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmesh-0.0.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c0053cc6ca38804e2372fe6c6be2df26625c49dc5faf763a8466ae6d43f7211b
MD5 9ac1db95f752b77fa39126fc39b39fff
BLAKE2b-256 e4ff040fed4aa1ff5755f3b191e500ce2ed7b56cdaa738208501fe13f5e192c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmesh-0.0.3-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on openbraininstitute/pylmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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