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

Uploaded CPython 3.12Windows x86-64

mesh_reducer-1.0.3-cp312-cp312-manylinux_2_34_x86_64.whl (574.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.3-cp312-cp312-macosx_11_0_arm64.whl (510.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mesh_reducer-1.0.3-cp311-none-win_amd64.whl (477.4 kB view details)

Uploaded CPython 3.11Windows x86-64

mesh_reducer-1.0.3-cp311-cp311-manylinux_2_34_x86_64.whl (575.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.3-cp311-cp311-macosx_11_0_arm64.whl (511.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mesh_reducer-1.0.3-cp310-none-win_amd64.whl (477.5 kB view details)

Uploaded CPython 3.10Windows x86-64

mesh_reducer-1.0.3-cp310-cp310-manylinux_2_34_x86_64.whl (575.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.3-cp310-cp310-macosx_11_0_arm64.whl (511.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mesh_reducer-1.0.3-cp39-none-win_amd64.whl (477.5 kB view details)

Uploaded CPython 3.9Windows x86-64

mesh_reducer-1.0.3-cp39-cp39-manylinux_2_34_x86_64.whl (575.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.3-cp39-cp39-macosx_11_0_arm64.whl (511.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: mesh_reducer-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 d4766f813f5ae07130580baa88be62fd9e1cf21b1851ee07c68adfd9e66378a1
MD5 c46c212849b6d7a818aef887879584a5
BLAKE2b-256 c53208cd79b65c2464d7325b482cf9c4f50e4d5861acd78331a0fcf896af7b5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 e814a3dd8ec9c3aead0a8b79c679c4a4db59fd82b6d3916ad2a0ed5fbd0c5a2b
MD5 185b462b94301015cc76c0ac1ff4ef35
BLAKE2b-256 e2c3781e21ab8dfa29cc18ad46007cd03a26e3c5148c653dbeea99070293a8f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e65058b78ff9b4a21284cff2f0e971f049f8b462a502ce3e73809d28c2cb9362
MD5 87dbc2539544da929763599c9935a29e
BLAKE2b-256 1a95799cfff0456858013e63e587211b2def343380032bb38600da3ef79df707

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 815444b835a5f905c60eb8e82935f2b70474939c40e10375607f38cc62a73c24
MD5 0a220a577ebec55fb24ee1400a88a883
BLAKE2b-256 179e2877ba2c4078207fae262b6dd707b53c5e524fb0bd31f4249aca76cef22a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 a5b69dcb3ee5f6974f0ab71db5f56213b0a5975d949043cd142a75c8d844683d
MD5 740430ebbb569fdd2160ba96e97f9c2b
BLAKE2b-256 3f3473cd670c7140d135496a982d9c1bcb0a33c55993f45136887ef4b563e04e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9eb2d20781d1e9d1e950bdce92ec050ac44bf9f2b4af03ad1841619889c029bf
MD5 a38c5b16ed2e41ea5129b59dfc02ce7a
BLAKE2b-256 a3bd61ba63941c892898528a7a9eaacbea9ef88b91188b6020ba41137023542d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 711e443145390c201006d6e55e2695edc6158ca203b13d2acc6991226f649cd8
MD5 5cdd68c1be101b3ccd097c5dd80728fe
BLAKE2b-256 cb1b2eebfd54272dbc04ab7985cc3e8e2bf4fd9493652fd63ccb5775da3c3ea3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 6ceb6edf3943a2cdc6e7bae5e091b91bcaa991f7398f2ce4b4b4ff11655d0c97
MD5 61654a32c79f6149a259ae75e618df13
BLAKE2b-256 c7cb456bc684e58417ddb6993f62ae26f184043f943a2d2a75890d36a2e86be5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c005db44543769f498170548948127d94523aebcb6580a31fbb1a3e0c600ec19
MD5 e7fa5a128c423ff25064a854a1d91af0
BLAKE2b-256 66e38aa30deca01e127ed20e77dfd048edaf513484dcc36780dcf21758f0a5d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 94d84c282796e89cb3ffb99ec4a1facec23e21e0f4acd58b760cbc51eeccd72e
MD5 6eca00c56ebc9fa817cc9225dc22c952
BLAKE2b-256 5a759a6a8531d7697c94798205039e63c413bf5900b6cb0c50bb4c91029976c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mesh_reducer-1.0.3-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 477.5 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.3-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 53c2d28ba64fc5f66baf19b947bf5423db479799d4042715e4986b34121e24fd
MD5 7e317597948aa3e0137132cf9776817f
BLAKE2b-256 e5e84a483de61938ead4195386a478d770c9aef2d178c67054c3caa59307de3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0277469e98e9e644b23a0219e68b8e5dcdaa2b7eaef8bbd6df3127c7a4ae0a9f
MD5 179b2e954f18575aaeff942d2ff172c2
BLAKE2b-256 b2c333ddd7e42ebf72069c72b63bc9c6bcc714a24f62de8fcb54baf4b638ab06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be1da904e23c299fa4e4eb5c5e41dd99ce37a39d213a6cf8b7ee9ee3d3fefe24
MD5 60a3ab13ebfd3818d9a7574596f5ca1a
BLAKE2b-256 fe52eafb0ffbe0a47b4c9892465c68282c0a1431c5c2b17b2c297e1e1bb03831

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