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

Uploaded CPython 3.12Windows x86-64

mesh_reducer-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl (313.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.0-cp312-cp312-macosx_11_0_arm64.whl (271.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mesh_reducer-1.0.0-cp311-none-win_amd64.whl (219.3 kB view details)

Uploaded CPython 3.11Windows x86-64

mesh_reducer-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl (314.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.0-cp311-cp311-macosx_11_0_arm64.whl (271.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mesh_reducer-1.0.0-cp310-none-win_amd64.whl (219.4 kB view details)

Uploaded CPython 3.10Windows x86-64

mesh_reducer-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl (314.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.0-cp310-cp310-macosx_11_0_arm64.whl (271.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mesh_reducer-1.0.0-cp39-none-win_amd64.whl (219.4 kB view details)

Uploaded CPython 3.9Windows x86-64

mesh_reducer-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl (314.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.0-cp39-cp39-macosx_11_0_arm64.whl (271.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: mesh_reducer-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1400b48c3732d68036298fbb3f9b3975c6e78d6be256fbff2bbc41daddf2636b
MD5 b2458a925fd0dfab1a335de2b604ed18
BLAKE2b-256 5c9122fc2b0c314039066e2aabcfc704a4e0dc0a538be1f173975b4548b7c448

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 e3a5e55286abe86a36ff0f73beb48eb4ee4a4316af65d2b02daf37027687a381
MD5 62d4833d64c0bf30836760dc59716275
BLAKE2b-256 3fbfcbf79fb9853211d16392874632182ad771322fe787074549bc1de00d0941

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5a3fb2463d48d5f93086440facf6df32884b328877822a1e36bf6879e0991e0f
MD5 1d245c2164a1020ac3fbc4d7125ffe82
BLAKE2b-256 8d2ce49506215914c8cab2606b4eb3258b2a85362c5a090f5e999bc85a9e6c5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 820567eda53c8fb2133705fe65df000d3d082fd4232bd4cc20728a1f14ae5f0b
MD5 a323c173d3134c46786041647d14339e
BLAKE2b-256 1eecfd0a9592e3b0f27346801dccc043fe35f9709fb1df5c199d12c4783de34e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 98a3f6440b6e2ab4f62e0a53437565d0a186e48dedc85e34ad6977c25658238a
MD5 9c4b1ecca5c14721446d4b4724d8ddd0
BLAKE2b-256 53e9005f9d87cd3cb3e9c396cb915927565f7126d2d01418c6154c365dca633e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 62bae739a37870661e178b95ddbe2363ab8304a3bf82f7670468573691aaa4f1
MD5 54cfd190c89ae7d630e0df02ad826992
BLAKE2b-256 9b17059a36a9400374caf0c14cc23a059bcab815038b4de2f0b3a0dd56ec99f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dac37750ad5bfc9131dde65993ceaa289252eed89c1079e08a192df2cb9f39cc
MD5 4947c84de04ccfcf578dd22e421c88d5
BLAKE2b-256 efa33b112da171ceb6693ffbe0b7e9bc0f82b869cc5bd53fc339b9ff92aaa8b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 22b57e2cf397a69617cbb8b31f2e1bceb4e8b8724dd2d629e2f4e481b0fca844
MD5 34d304ef6cfcaabe1a54bdb8300a7dce
BLAKE2b-256 4568a9da6ec0fa1d167995b5048890c821dea9df8e3350e156577c503662041e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 dad4a35159ff90c38f68a0406e0e0b4cf9ab1bb90c54486bb5ff63a13f268082
MD5 608328b40aea3c56f6554bff90a5f43e
BLAKE2b-256 64ea6b7978fe59483fbf1c4fd058132dc15018a93d41cd40b822e170ef240e0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 174adb0109e8f6ec0cbf576225ae7a7b6de92bef1919da3b85d89c0e7126d648
MD5 9e5559d010a56864a2454449bff6f769
BLAKE2b-256 7665e238d672a9c6d2b9d0593973e33221b4b79087563e91737327d60c114e56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mesh_reducer-1.0.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 219.4 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.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 b90e46e2240db0adba7304c5579151ec94e13c8054b254da42d4c80d38233d91
MD5 5af562c2d146804e07e66345363841f1
BLAKE2b-256 db727ad3ddb6d81c61789f6812c0bcf5430bd6ee34739f628fa6d85dc2a4acb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 61c60349ad69f00c589ab20e0508cfa288370f63e8b5e1fef334b279b3d93d8e
MD5 01167cd6587597d66ea1ab90fb0ea36d
BLAKE2b-256 66a4a59065292420cf93c3203830f33213f923315c7cf6cfed6fdb1507eb1707

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a0abd03e585c61ab07daa7fcf81b0f52e800f7fbd7c115a63907e854be69129
MD5 7b666c78b6c9b48e34476c392607f49b
BLAKE2b-256 7dbd85c50c84098b9bde3707994cb7e590faa5587fc86fd0c4705e72f2144c66

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