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

Uploaded CPython 3.12Windows x86-64

mesh_reducer-1.0.5-cp312-cp312-manylinux_2_34_x86_64.whl (633.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.5-cp312-cp312-macosx_11_0_arm64.whl (566.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mesh_reducer-1.0.5-cp311-none-win_amd64.whl (539.0 kB view details)

Uploaded CPython 3.11Windows x86-64

mesh_reducer-1.0.5-cp311-cp311-manylinux_2_34_x86_64.whl (634.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.5-cp311-cp311-macosx_11_0_arm64.whl (567.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mesh_reducer-1.0.5-cp310-none-win_amd64.whl (539.2 kB view details)

Uploaded CPython 3.10Windows x86-64

mesh_reducer-1.0.5-cp310-cp310-manylinux_2_34_x86_64.whl (634.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.5-cp310-cp310-macosx_11_0_arm64.whl (567.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mesh_reducer-1.0.5-cp39-none-win_amd64.whl (539.2 kB view details)

Uploaded CPython 3.9Windows x86-64

mesh_reducer-1.0.5-cp39-cp39-manylinux_2_34_x86_64.whl (634.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

mesh_reducer-1.0.5-cp39-cp39-macosx_11_0_arm64.whl (567.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: mesh_reducer-1.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 43f62a721ff5263b91c1421b2244050aa2be5e280cc3f83f7aa9144347ed1f18
MD5 be017c41bf113fe08fd662e33fb83a74
BLAKE2b-256 d21c1b9008517ba5517c0e39c6d6ba5556ae87be5027202c9f4e5953f1ef84bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 046e24cdefb033b0cddcb4cae16a19d1c992db35eb9eedbef36d3f074617c438
MD5 b8698a725c7301e091f3010286d0f1ad
BLAKE2b-256 a2f22f3d040f2d09e00e6fcf9594f461985d18e56ab9c6d688b1ae11e5d15370

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e3dbcc40a42ada377b27734c0012b90c73b500c68fe74ee174c118a9ced6c6c0
MD5 6f07225b6eea2ad78172c83ae30107b7
BLAKE2b-256 94287dffd03e5b8ae56c206a461779897f2586a0f27cf49087e7da421c6e4ddb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d506a24bb0d47ae55c47412b2b24c37e6a60edaf66db44f191945c4f3b472ab
MD5 6e9af79ca134f617d4c9f9c4fac33e8b
BLAKE2b-256 60ca7b0eec354e450fc32de0a9022ac8c367d397490aceb5f30b2797723cf82a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 500dd090a1310991e1990d96e84a4aafbb18042b7882f8ea40f0b70cd3b86d70
MD5 884daa7ddff8a82a0eb9c4baed5e2a53
BLAKE2b-256 6b67adf7130d307bf7406c76d213989181979bc6b16656b95c7a1de341f15593

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 43c63e4dee9dbd712448c0a0caa81a49184d805958ab2c747c5c7e50f7bada34
MD5 299be6987d97309aa53652aefef9425f
BLAKE2b-256 c9742550c798f5c02ff25c624b30c6004d492eae276b7afcf99e17b01e7d8440

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f0aba16c071db28bdb4748a5248da2348db47c45c48e4a51ab0bb668102e996
MD5 12b1694b4c49388ce34b83d741e57185
BLAKE2b-256 0d45bd285fc1a8d7b65db6567272dd697d584c61a7531a99570e9afc4026ba70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 34c2c56c394e9060e5fa46aa96a86bc8a0b9da73b1183a9a731949ab080b4383
MD5 74ee729219c08d9da8867011a35c2336
BLAKE2b-256 9d935f8d053b420ca11eb92a9c28220e0b3dd4f5110eb2ec49410ab28c25c936

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 01ee90b26f9e324dbec501a4f593959bdd114b9f56d10d830ac5e367a913b51e
MD5 03a07d8e3de42df5883611cccc2739cf
BLAKE2b-256 63fe6d1afb31e24906820f508950efe3ac2ef1e424e987eb40553e6df2c8dfc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 742d1fbb0f5550a2ce46f0447b75f55df066a524bc9bdb3d2de0914342d239b4
MD5 05ce6e069d4c6c0bd05beb18b59e2218
BLAKE2b-256 e004f8fd7dd94b1a15785aab9168673a910c5870f6dad6bbc87dd4fe3d996027

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mesh_reducer-1.0.5-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 539.2 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.5-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 07d515b119578bf012df03e21dbf19464d91064eb64ba0c837dece84e294e785
MD5 bbdced60123916233775de667f1ad87a
BLAKE2b-256 19124aafa01edf361ba82b77e0e3e39967e7af1a958ae7180e7067aaf61dcffa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a17538f2c6c6a340b25db05d71a325cf7e2451c05966b6c382712b9fbca7804e
MD5 8bcb4149a2049e184b2b863b996c4536
BLAKE2b-256 6a3f16352aa1de1d0c70e856b44778090ad94285bc58be79cf78bdff316aec7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-1.0.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a70e40a0024e8036d9912b405c19e153a81149a5f86e4df2c0332e54c8ca11e1
MD5 1b99d162f9567f261ce0daeb0b83ea9c
BLAKE2b-256 1f9c1ac2cdceea9e74919699edb8757c62a2b37a0f9effec460f352b1d5cc33f

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