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

Uploaded CPython 3.12Windows x86-64

mesh_reducer-2.0.0-cp312-cp312-manylinux_2_34_x86_64.whl (642.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.0-cp312-cp312-macosx_11_0_arm64.whl (573.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mesh_reducer-2.0.0-cp311-none-win_amd64.whl (547.9 kB view details)

Uploaded CPython 3.11Windows x86-64

mesh_reducer-2.0.0-cp311-cp311-manylinux_2_34_x86_64.whl (643.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.0-cp311-cp311-macosx_11_0_arm64.whl (574.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mesh_reducer-2.0.0-cp310-none-win_amd64.whl (548.1 kB view details)

Uploaded CPython 3.10Windows x86-64

mesh_reducer-2.0.0-cp310-cp310-manylinux_2_34_x86_64.whl (643.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.0-cp310-cp310-macosx_11_0_arm64.whl (574.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mesh_reducer-2.0.0-cp39-none-win_amd64.whl (548.4 kB view details)

Uploaded CPython 3.9Windows x86-64

mesh_reducer-2.0.0-cp39-cp39-manylinux_2_34_x86_64.whl (643.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.0-cp39-cp39-macosx_11_0_arm64.whl (574.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: mesh_reducer-2.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e2b24289aef3d91626275eb37d795951049bf64bf4647113250fcbfdb23b9c36
MD5 f73b42bdac3f4fb4c4e534a8c61434de
BLAKE2b-256 35680ae58a741dd5f16a6d90491311cdc8c0f7ef87e9dbc1d79173c3d71231f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 7ae227eec3645299965344860a41a0413b5729310dcfd44de7fe7b6d74e52104
MD5 494e5b4da9fa8fc9f01a6e99a98a0364
BLAKE2b-256 c82f0587c4aafdece4415a3e70843608db6442ba5c283d108bc1691ac530a4c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 10a5dde2b1df489ee40986b94262d3def024c5f9c82b7b85c4e98769d0515377
MD5 3843d31e0147af40c4f5feb3ed85d4b2
BLAKE2b-256 8f02d6ac67c4b26b5584856f621deb35c1150aa471b69cffac932cbbba2ba758

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1e992fec681b9768cefa28a9e445be5c216f1b9921ae244a31c7e9fac0126290
MD5 2bb5b40b381cd2fe226d93dff9d86d49
BLAKE2b-256 70f2f6033eb2d3bda4a9115365b913f8ef216e4fc0816706866c5706ef4c13b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 66ed8c84effe19d1663647459630961f7d17aa5832dd7bffd33833687d1ed01f
MD5 ed66c7ace35c92886eedb37592dbe37c
BLAKE2b-256 dd454c365ecc9fe5084ca46fd4e0e2398fe0e3d4a73fb9933314874ce042fb16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f25a3a24b4980078386d2760013656d158fbd3fc8a40c2b927a888335bcf16e9
MD5 1d5c63edbf0ad6009dcb1c31cce60832
BLAKE2b-256 5df2bccf11087229b9d96c17ef0f59c32ad2a981851386c35fd85c64c6df1e80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 90a2bdf8f3e15526becddbde540a1788e2d25cd21e45a2fee8ddc785b11122f0
MD5 7ae47cfe8a1fad8ff18c6c9edec1fe1b
BLAKE2b-256 e1f8e3dd13ac45c272ef3729cc75dbad19ca3fb062e5c193e0d7c0ad775d517d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 d6b743a1c32cc3b744bf4182ef511b97fdf5ae3ded7608dc72695b63861bb0a4
MD5 c183fc60a23be9fda63a7ff065ff9c3a
BLAKE2b-256 f163798d76159c41980eb493dccf471467591f4c8413e5240ee901f5c5e25987

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4b5ed46ce14130292635019151bcbc0b7bc923c4726f0a5bcba2e174463e5148
MD5 16f1f0390afe4f7ef60309c63a3578bc
BLAKE2b-256 67970014608a34ae6dc5716d41ecc072f91d8898caa604fa2d74347046b85932

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6b71b5b53078950d208dc7a3bad83af9b337fc367d9ef0770f61a597f265d51a
MD5 e81d5c55411339b952ff88177cb2e46f
BLAKE2b-256 208cd1feaabc57965bc67cd1fdc0b91889832132735cd4167c918c80112ac125

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mesh_reducer-2.0.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 548.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-2.0.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 403fb82e0ef5a294124071ea64b3895324e7b4f4bbae89421baccb0759989fd4
MD5 e12bc82f6f79e77c98bcf5a28e790a13
BLAKE2b-256 61e56ae68b5d9e5a2f6dfe27fb31e00e8c998712d28ff4ca95a670e22013748a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 104404e1d55c0b04b2133d77fcafacd7a0a702103e215e2e1aabd752f08eda2a
MD5 5d141dfdad3b32f3ee583b8c6c6fe0cc
BLAKE2b-256 12a6abbf90e5808081533d3c81ccbdcc9dfc7adcb793b925a0f7ec09b7d62e0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4940ba94728a0105f1d0b5e58ae5c6639b55aa29b241755a3ce709f1cc3ccbb4
MD5 62bc5aea7340968507e2acd663ff739a
BLAKE2b-256 282b70b11b0cfe16ec03917392f82763c827d749e63da782f585bd2b5e06b19a

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