Skip to main content

A lightweight library for importing and exporting surface mesh files in multiple formats

Project description

pylmesh logo

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

System Requirements

macOS:

brew install libomp

Linux (Ubuntu/Debian):

sudo apt-get install libomp-dev

Linux (Fedora/RHEL):

sudo dnf install libomp-devel

Python Package

Core functionality only (no dependencies):

pip install pylmesh

With optional features:

# Add development tools
pip install pylmesh[dev]

From source:

pip install .

C++ Library

mkdir build && cd build
cmake ..
make

Copyright (c) 2025-2026 Open Brain Institute

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.9.tar.gz (19.7 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.9-cp312-cp312-manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

File details

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

File metadata

  • Download URL: pylmesh-0.0.9.tar.gz
  • Upload date:
  • Size: 19.7 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.9.tar.gz
Algorithm Hash digest
SHA256 60b19956cc9fd6646ab23905c24b6f294635d70d247875a7c26be3e3e1c86367
MD5 f29c150a9f711f8b508579e3d31398bc
BLAKE2b-256 11bd08f287a65959a6b23f50c50b0770f9cd92d87df5af7ff927a296590d8e59

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmesh-0.0.9.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.9-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmesh-0.0.9-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1af60b2440d9da3e049365d3c3d86ae141484f00bcce4b5e72bc9edc9a26c72b
MD5 f7cb2ba30b610654967c96e2a6e020cb
BLAKE2b-256 71fc5e773f4293f01893b1a2311de7123ba1ec07184133f9fb500a1311e65e87

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmesh-0.0.9-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