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

Uploaded CPython 3.12Windows x86-64

mesh_reducer-2.0.1-cp312-cp312-manylinux_2_34_x86_64.whl (642.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.1-cp312-cp312-macosx_11_0_arm64.whl (573.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mesh_reducer-2.0.1-cp311-none-win_amd64.whl (548.3 kB view details)

Uploaded CPython 3.11Windows x86-64

mesh_reducer-2.0.1-cp311-cp311-manylinux_2_34_x86_64.whl (643.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

mesh_reducer-2.0.1-cp310-none-win_amd64.whl (548.3 kB view details)

Uploaded CPython 3.10Windows x86-64

mesh_reducer-2.0.1-cp310-cp310-manylinux_2_34_x86_64.whl (643.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

mesh_reducer-2.0.1-cp310-cp310-macosx_11_0_arm64.whl (574.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mesh_reducer-2.0.1-cp39-none-win_amd64.whl (548.5 kB view details)

Uploaded CPython 3.9Windows x86-64

mesh_reducer-2.0.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: mesh_reducer-2.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a009d3290de2c6074fc0dfde59869886f0fb57b1d158f63ec8719dc868167354
MD5 a4020434aac75195eb39c79c417c305e
BLAKE2b-256 f138d7f131358f1064b7657f1272adcdcd715abd80179cb61619c1f6108d8f7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 e20d3a91d53c20e954d0530227d21b7b5a597a30555f4732f55bf5a67c410a18
MD5 18b4568aa9ee5067de1ff3d5750a29c0
BLAKE2b-256 4e0273e640b30e4c773452b8f9e2f03330692885151dddd1ff2748454d5bd554

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7e4c19f13d6feae9390278f704cc63ba7e854062dc1fdf07c75f217d4b83811c
MD5 954a28d11351d8f925eb6dcc644d22f9
BLAKE2b-256 6fb472124663bc69dee8a7221d43c3802af939a65e20dd6bf8ea47fca38e1ac5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0bb56e9ba2344a08103da7e082c485aa1181aa4e00d419bbdc9f5e05945934b6
MD5 1e0e3c6d252fec05049517cc1c6e1028
BLAKE2b-256 2b8f32a467977eed7c533278f2ce85120ec3dc9d79f171efac19df84038857f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 4f1d936b0eef0ddff589bfd8a4930f0dff5c4ae5a7d775f844c04d2b6327a429
MD5 70b8e5845d0eecbb12f8c43081814e98
BLAKE2b-256 503695e63a63b9e3b1f8a0a1457b11be9261d2c6eb9f33d4551bbf185abc1f2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4fb456cbde81e49bf8445c002b3d54b8b1c9d6e9d46867b6c81a6869cf8dbb81
MD5 5031e57894da042abcb168e75a3ae555
BLAKE2b-256 b7e817d3b9a8ce70f8cf649b2109739eb61421bb437299b4ac0bd897d56f37e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 719f51ad0b30bb8f1ddb8793c2d57e4691118572410e48757f36ae19d8079ec6
MD5 9ebad805c6d7640d06560bf4aba45acb
BLAKE2b-256 127d7094d7fb68d5d9f1b46160f6f5d07dc3806f0b01fe712ccc35d207f15db1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 2dd0d87bb9b70bba86825cd0f4e04c91e180f2196083cae030e1d50c6ccf8f35
MD5 ea1837f933ee286b8df3291c5301b6a1
BLAKE2b-256 ac411f9e16ca008f00c4c7a6f56755e707a55d1ebb4f7f57dcb79e0ec3e11906

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6a27f0e6d9ff5d7f0ff9ff6a3b6d8b679119c8edae17c588b471ba338172bee3
MD5 a20f4d8ee1768c0f5b9b308eb710eb51
BLAKE2b-256 4202025abb94ca5c87755aa47856e4378e3a25793b708ddbfd9e9a22e5ce8fd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de05342b961edad82e6b53f023280528737029cd8579ba38f81e1c147c62bc44
MD5 5c3bf51961b68298203e78112b28049b
BLAKE2b-256 030eadc88b1b86c94c7a63158271883dd79d7146ba09ad38df0701b856d4b480

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mesh_reducer-2.0.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 548.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-2.0.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 83cacd34ff87db12e1df4b8d69f08e28943c325eb232c7b2da89c61e3ed59e05
MD5 b3a51000346ca43b77899b92de00fba6
BLAKE2b-256 2b08caa018588f5f848054b6cf818d5705ae832009cce3cece589ffe19e800d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f5e8c89b9dc9a4bb707c122c601bda800029d58da1ba39f0c796f9b9ef9b7963
MD5 c148de6fd4b6b007e3049dab144bf2ef
BLAKE2b-256 280fe494ab508e136847dd012b780d40cd555fbd16602031f54d298d92fbfa88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mesh_reducer-2.0.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 23c58c379d6f456898308ad7456a93a2c79204c5696a0c3142ab0cf66aba55bc
MD5 11956bac9d5d5118187eac2968d5bc57
BLAKE2b-256 cb2fc0e21f1758b19b1885fb0361ca0af5b822a790e6f2d8ab0464fdc6327f41

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