Skip to main content

A Python package for reading STL, OBJ files and extracting points

Project description

Mesh Reducer

This project provides a Rust implementation for reading and reducing points from various 3D mesh file formats (STL, OBJ, PLY, and STEP) using a fast grid sampling method. The functionality is exposed to Python using PyO3.

Features

  • Read STL, OBJ, PLY, and STEP files and extract points.
  • Reduce the number of points using a fast grid sampling method.
  • Python bindings for seamless integration with Python projects.

Supported Formats

  • STL
  • OBJ
  • PLY
  • STEP (initial implementation with future improvements expected)

Usage

Example usage in Python: click here.

Python

pip install mesh-reducer

Functions

load_mesh(file_path: Path, clusters: int) -> List[Tuple[float, float, float]]

Reduces the number of points in a mesh file using fast grid clustering.

Args:

  • file_path (Path): Path to the mesh file.
  • clusters (int): Number of clusters to reduce the points to.

Returns:

List[Tuple[float, float, float]]: A list of tuples containing the reduced points.

load_meshes(file_paths: List[Path], clusters: int) -> List[List[Tuple[float, float, float]]]

Reduces the number of points in multiple mesh files using fast grid clustering.

Args:

  • file_paths (List[Path]): List of paths to the mesh files.
  • clusters (int): Number of clusters to reduce the points to.

Returns:

List[List[Tuple[float, float, float]]]: A list of lists of tuples containing the reduced points for each file.

License

This project is licensed under the MIT License.

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

mesh_reducer-1.0.4.tar.gz (7.1 MB view details)

Uploaded Source

Built Distributions

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

mesh_reducer-1.0.4-cp312-none-win_amd64.whl (477.0 kB view details)

Uploaded CPython 3.12Windows x86-64

mesh_reducer-1.0.4-cp312-cp312-manylinux_2_34_x86_64.whl (574.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.4-cp312-cp312-macosx_11_0_arm64.whl (510.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mesh_reducer-1.0.4-cp311-none-win_amd64.whl (477.7 kB view details)

Uploaded CPython 3.11Windows x86-64

mesh_reducer-1.0.4-cp311-cp311-manylinux_2_34_x86_64.whl (575.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.4-cp311-cp311-macosx_11_0_arm64.whl (511.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mesh_reducer-1.0.4-cp310-none-win_amd64.whl (477.8 kB view details)

Uploaded CPython 3.10Windows x86-64

mesh_reducer-1.0.4-cp310-cp310-manylinux_2_34_x86_64.whl (575.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.4-cp310-cp310-macosx_11_0_arm64.whl (511.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mesh_reducer-1.0.4-cp39-none-win_amd64.whl (477.8 kB view details)

Uploaded CPython 3.9Windows x86-64

mesh_reducer-1.0.4-cp39-cp39-manylinux_2_34_x86_64.whl (575.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.4-cp39-cp39-macosx_11_0_arm64.whl (511.5 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file mesh_reducer-1.0.4.tar.gz.

File metadata

  • Download URL: mesh_reducer-1.0.4.tar.gz
  • Upload date:
  • Size: 7.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mesh_reducer-1.0.4.tar.gz
Algorithm Hash digest
SHA256 0f9ace7855a4500997863cf56b6ad8ee60bc5ef39f5bb048903e420bb12124cc
MD5 15cfe2cf096fb20bc3cac29aaf092092
BLAKE2b-256 0cb37d1a5389a170753aee7904be67b72402294110697f99290664f06123db4f

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp312-none-win_amd64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 3a4c8aa64de6870e633dbcd978b542fc14120fb6fb1abd66a6164be7f707cd9a
MD5 d5a12dc824c3d769aeaa50a1c26ae384
BLAKE2b-256 358b9868a8ac1d2a76bbf84d2bc3a98983630228d223e73d21c1977de2e53f91

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c2773d7301193cbfb334372c066fa6407fb2182ce08237b8ee2d027724e4ada5
MD5 4df98e1e2175ba8cfd2d443effb735b4
BLAKE2b-256 e09766c213edec645b3164ffbf53a40c8861c6a6efdc3ea7ad11a5ef098178b9

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d00a8d49eaec2e6523b0c156d75991b3806074283acb787aa7db14fadf15fcc2
MD5 f164a15a5a26946037a6de14dbcb8fe2
BLAKE2b-256 e2fc984c3154c3aca5277b0da764eb0596b37041481a72e439b8c187597eb28c

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 595fc6683497ba626e7fd7b19756c618facafe3231047914733aa78134a0f395
MD5 fd340db4e7fd4c40ab95791d2a4c1a76
BLAKE2b-256 a6b82ad870a9e2725004cac75c2c8378413605bbbf4382e79be4ef104944df42

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 be4d49e7165458ce0282804e72913363e5746dfba8055ae2d03b60d239eb938e
MD5 d7e6e8cf66100dcc76c3841bf693e9aa
BLAKE2b-256 4d0704603f912d6b8cdd63b9baa5562ad7faf5c6076522f80e8858325f8c92f4

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d301e02a385457bad1cb841c5ad91f3f7667741b31d6ea69f2287969e23fa1b8
MD5 2780e63f8b8c78f62dc3c4958db55dfe
BLAKE2b-256 01753e979358ba34cc1f007ae3ee7cd58bfbe8a94250eed530de4d1064c93760

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 abaa7cc9a6bb9f56d38b1998b97de63a7ea5e02931a500571b2d1d1b5be10086
MD5 4a9a0b807dbacd6959ccdc19ff8c197e
BLAKE2b-256 fa667624e23cba42b6520df00dc80db75cc7b4983a45ef53916abd6124d58f04

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3884c5e9b5e0b8f2bf436858f011120b3b8294a261dc2a429ebe6e3ce0a6e450
MD5 b33b14ccb4782917b0a0955d17e6a94e
BLAKE2b-256 a3beb6d347e3464bd308e74e7ae396ae7c6de21d12b007a256349bd410960cae

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7179ae123f22934efe9534509d55b075a5623f899361fc688709c2aed0100c20
MD5 c0f7555e1e5483e57bb023b5da45388f
BLAKE2b-256 c2642f5b49cc7d2c3a219a14cf33c52557a4724f7c2d004755e6741e04bb7179

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp39-none-win_amd64.whl.

File metadata

  • Download URL: mesh_reducer-1.0.4-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 477.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mesh_reducer-1.0.4-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 f6d1e6093fb018a622c062ec516159a682aada039ecb0d9c7ccc3a83ce18d80a
MD5 a0be63489c5ddb76d159154cc93d7ba5
BLAKE2b-256 7a19f29f874d0bf1ce2885718c92d51880d43e3dbbee2aa5b8ca8a2018ab814e

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 27f08f712dee3e34c5b9ea508157dfe1a8cf9860761328e017c5d802babd1343
MD5 93b24fc2d09aa44ebb08accfabad80ba
BLAKE2b-256 fd351366670cf16c3d58637068a4587d41e83645300e1149e09f2e2922aee7af

See more details on using hashes here.

File details

Details for the file mesh_reducer-1.0.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mesh_reducer-1.0.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 77c498faa512097c328ab19da9537c269d67a46ae24fda9d18b64905971edc74
MD5 cc1ec02961db3b0d877d56fed3584111
BLAKE2b-256 f65eb4a615b1046f75ee038059346881980d6eb64faedf78e93c679ad82884c4

See more details on using hashes here.

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