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, and STEP) using a fast grid sampling method. The functionality is exposed to Python using PyO3.

Features

  • Read STL, OBJ, 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
  • STEP (initial implementation with future improvements expected)

Usage

Example usage in Python: click here.

Python

pip install mesh-reducer

Functions

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

Reads a mesh file (STL, OBJ, STEP) and reduces the number of points.

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.

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

Reads multiple mesh files (STL, OBJ, STEP) and reduces the number of points in each file.

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.1.tar.gz (58.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.1-cp312-none-win_amd64.whl (218.0 kB view details)

Uploaded CPython 3.12Windows x86-64

mesh_reducer-1.0.1-cp312-cp312-manylinux_2_34_x86_64.whl (312.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.1-cp312-cp312-macosx_11_0_arm64.whl (270.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mesh_reducer-1.0.1-cp311-none-win_amd64.whl (218.6 kB view details)

Uploaded CPython 3.11Windows x86-64

mesh_reducer-1.0.1-cp311-cp311-manylinux_2_34_x86_64.whl (313.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.1-cp311-cp311-macosx_11_0_arm64.whl (270.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mesh_reducer-1.0.1-cp310-none-win_amd64.whl (218.6 kB view details)

Uploaded CPython 3.10Windows x86-64

mesh_reducer-1.0.1-cp310-cp310-manylinux_2_34_x86_64.whl (313.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.1-cp310-cp310-macosx_11_0_arm64.whl (271.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mesh_reducer-1.0.1-cp39-none-win_amd64.whl (218.6 kB view details)

Uploaded CPython 3.9Windows x86-64

mesh_reducer-1.0.1-cp39-cp39-manylinux_2_34_x86_64.whl (313.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.1-cp39-cp39-macosx_11_0_arm64.whl (271.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: mesh_reducer-1.0.1.tar.gz
  • Upload date:
  • Size: 58.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.1.tar.gz
Algorithm Hash digest
SHA256 c4b0e0e9a10fa6ce709a18034d274216b58deba8f068ee1a987809bf1dac992a
MD5 df6e586b160c61cf1436d7f400f93148
BLAKE2b-256 8df33f5f35e54cbd8ff64836ba0de56863670acb8b9b6dbc430a9955662571d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 a42bf61863d70276962f697f59401100bcf1e1111e18f60f9b786237b1a5a11e
MD5 24e7c78ccda7c2d860edcda63dbbdeb6
BLAKE2b-256 82324d24e990ea986648b781dd872037d877b415e863c372e7bc50df48c3a54b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2bb32107c17a3ea5e8ddcaf3e8a459b58e71264075cedca811a7519b9fe977d9
MD5 9a9b5ca0d7397eb65a937dad4400132d
BLAKE2b-256 99208d80da54ff1fc0e7081a4f18f3daac2f4ad3784966ae89bdc75f9866d244

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 84456c90e6af1fb5572f97ff2be21a4dd295b0c70f6abe5551cbc46ffd38a3ad
MD5 0964a8fc54c7afb3eeda4b3ad224317e
BLAKE2b-256 532eed9b357bf73b588e09648c0f7eda5cdabefb106b0a974858f2324b6de782

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 20da38149bc6e8dc266ab3fd54e0eed56489160966137f62559718e4bc803ab1
MD5 5978a5ee85f0783167b3350163ea63c7
BLAKE2b-256 dde39d741f76e2ab934597cfc6804f50a6998c03789e294190eeb4ada2fe8580

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 88e387c6e210d977121694e0659f2420ee2ddabd7446bf2f9340d2fd7ffba431
MD5 9b1ff589df54dd57db9486a58ebd3485
BLAKE2b-256 6fe04129bd8802d0799015ded56d592bc8b48abde6a0e896470d2e328dbe072c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ffd2a5a6af0d06261b3a5b328592c9ab3a8b1e44e81c7870b88aa65d9f4fa154
MD5 f95cb536f9dfd98bdc5d6f0ec8f69cb1
BLAKE2b-256 fb26adddd25272a2b7577221d4f88e5630342126353332cbbc37f0822de66a59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 687a56c35eb18688a8dd653f1b4669f5ecb092131789fc50b3aab432ad3926cc
MD5 2c28222946835b01e5d6e3a997b30970
BLAKE2b-256 9003c65b6b2e8714552eaa0671087d0b648588289f3af8a4c6165ae7b6efbcb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a8558dd716af359da3998738ec3d0c82673478931ee0b2ea2b192442b6b2c301
MD5 6fe20b5081a0fcd4c34860707fb7e0cf
BLAKE2b-256 51e272e308e571df235c2091402d35d820701830a27596f4cb06577d5f8c890c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a0ed37993488bb2ffae5331306a134b2c4fa670edde5adb004f5ff3dee7fa31
MD5 f5ec23f3fd27fe526cf1a8f98e9798dd
BLAKE2b-256 0559f64a949c1d2c2a14f0c321a526871c5a481414480981e604bba03c6410c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mesh_reducer-1.0.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 218.6 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.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 04b85972db3992a531c93a154893757ae6ed5131d119985120f19970aecbe389
MD5 7145f975d66568e22fc3a319a6199c57
BLAKE2b-256 04fccd5978078ee861adc87db30a2619c008dba1749212b54901a4f20bffb232

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6b5e22d8a34232900881e59f86f074cf82b15e7a29f0d703a2a38ee7633415f8
MD5 4dbbfb828786016c553f14056ce7c629
BLAKE2b-256 a44442f3aa0673193f3a3bb1271b30c086eb6729cb8f8898a6d8db509c4aa99d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af9f809273dce26708fe19c9bd1bdb5e5196ff4ca960eeaf720f72872dc12811
MD5 4b014f737c3cd4ac3ef2a813fd6b80cf
BLAKE2b-256 839007631ea1b61bac7b480978fc9f0e2b23db9b5b09f2ef16f8d0c5e591f5a5

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