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-2.0.2.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-2.0.2-cp312-none-win_amd64.whl (550.6 kB view details)

Uploaded CPython 3.12Windows x86-64

mesh_reducer-2.0.2-cp312-cp312-manylinux_2_34_x86_64.whl (646.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.2-cp312-cp312-macosx_11_0_arm64.whl (576.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mesh_reducer-2.0.2-cp311-none-win_amd64.whl (551.4 kB view details)

Uploaded CPython 3.11Windows x86-64

mesh_reducer-2.0.2-cp311-cp311-manylinux_2_34_x86_64.whl (646.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.2-cp311-cp311-macosx_11_0_arm64.whl (578.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mesh_reducer-2.0.2-cp310-none-win_amd64.whl (551.5 kB view details)

Uploaded CPython 3.10Windows x86-64

mesh_reducer-2.0.2-cp310-cp310-manylinux_2_34_x86_64.whl (646.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.2-cp310-cp310-macosx_11_0_arm64.whl (578.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mesh_reducer-2.0.2-cp39-none-win_amd64.whl (551.8 kB view details)

Uploaded CPython 3.9Windows x86-64

mesh_reducer-2.0.2-cp39-cp39-manylinux_2_34_x86_64.whl (646.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.2-cp39-cp39-macosx_11_0_arm64.whl (578.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: mesh_reducer-2.0.2.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-2.0.2.tar.gz
Algorithm Hash digest
SHA256 ea8f2499ebb7e609e59f42611d1559d4e08f789308d6b844a67f715c127ad331
MD5 da073713b2bc49011b8e538a2d3d4573
BLAKE2b-256 8af95d1c17672b612a075b897ca146279ded94e4405df53d0a6fba8d775053aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 09cfa626dd845af35cf5a86e3899e5ce0b9d798666c62afd08740f49b6e0e516
MD5 658daeae33bcd93aac345646b55c7e2e
BLAKE2b-256 9644636a342774952378f6ecba68997f89862b1a7e89d4e475efea77ed1e8c5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2d577e4ee5c07596b475318c2e3acb5ab7d686c0fd4b19409e38a92a709018ff
MD5 38d8df57df9ee443db8ea10dd994141b
BLAKE2b-256 07ec1a64175e48337841327fde64b83ad2b61ee3810ee3c67c5d31d63cb8cc39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1aa6f258a3541558a8e4f665f93f8b3dbee620945381703bd310e6defcaaf266
MD5 d2bb1d458c2489908a814da15203f540
BLAKE2b-256 790c2d3c7d467e75a1153138e4e806faa0f57cbe2c2f55ae039ebb118fe3a6d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 f65d48bad96f9f5cc15a00e2c314458e1c904167e059ac13330ee660c116cdd9
MD5 fb9badaef1b0d119564a49a91167904e
BLAKE2b-256 07098df5301cd1a064857422411e8add73336456b7b1a21104f1eeedfc3924d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9c7739cd48db2d725f361e653421363df0c42c4bd8f05d1c1ff72006639c9432
MD5 78f8a316e3d46be2d549512830e3dfdf
BLAKE2b-256 76b1845cb7395c6b1b207357c28465c72f82525a65a758c6e2e5a88e29afff19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 552fd3b78556290d90020227634b986cf01ff15b26f91d8e345db121695eb6e4
MD5 7d001ef0c460f4ff7ecd1d287b8beca2
BLAKE2b-256 2fa87a2c98c966bf8992490ae8bb4ead7c2a94bc78bad8702cf074f5c433ee5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 291f121bd12f84777dffc7a63aabe94155b7d753cc766b10b1018ec7306d89e1
MD5 405a8dd5ded60b55f347dd1949101837
BLAKE2b-256 a424a78737ccad2dbc2c37ba03a851f2f220a2f3178e6bb6ca0f1b0b7dfce6c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6452b7b57d6a0b425ef9c43bb183063bc537f43fec196782faa69be2948563d7
MD5 28e69a595cf738824559a57a084bb0af
BLAKE2b-256 cfb25f13e35a0723e06b5ac685b1ab838c87987c85a6da38932c422457a758eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 012ff28a501b3291b3ab2d94e4738d2c32d125bae859b3d22d50a4f5d04b3b06
MD5 caa069dfcb2739c9b3db5e5b472ca453
BLAKE2b-256 e58069818fc2bd2891d7ea14e619854a6e50902a8019179c8cfca3fe15f4df3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mesh_reducer-2.0.2-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 551.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-2.0.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 5a3506eb946c4813d9cc0a82350393c5370b6342791ed370f0b4cb8e100c01b2
MD5 4c7f51d7760f8afdaa5cf4125a935ab3
BLAKE2b-256 05e3a773d7ba937661afbd40cf1e1af6e29f4487b6dac046e33df71ca5b31021

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f6ac1dcbb501639a4fa53de46538b745b1535c4d0af8c02e8dde65795c09aef2
MD5 e10700fe1afa4784bcfd653a6c64cde3
BLAKE2b-256 8a309520c6c9894b4f66f8161817e6135318d1a7f9442aeb02bda55419d9a7c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2983ae939439b9484fec664d90dc71ddcdfb57e4822df08ef347f75d4454060b
MD5 41b89ff23baa7460cd9a9c19edc96d1d
BLAKE2b-256 5d5a2e39315cba1b9ebb22851b228f81d90f5bb32d9d8d93a3aa3553eaacbe05

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