mesh-reducer


Namemesh-reducer JSON
Version 2.0.2 PyPI version JSON
download
home_pageNone
SummaryA Python package for reading STL, OBJ files and extracting points
upload_time2024-11-25 09:36:01
maintainerNone
docs_urlNone
authorvffuunnyy <vffuunnyy@gmail.com>
requires_python>=3.9
licenseMIT
keywords stl reducer python rust pyo3 grid voxel mesh obj
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/vffuunnyy/ai_hack).

### Python

```bash
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mesh-reducer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "stl, reducer, python, rust, pyo3, grid, voxel, mesh, obj",
    "author": "vffuunnyy <vffuunnyy@gmail.com>",
    "author_email": "vffuunnyy <vffuunnyy@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/8a/f9/5d1c17672b612a075b897ca146279ded94e4405df53d0a6fba8d775053aa/mesh_reducer-2.0.2.tar.gz",
    "platform": null,
    "description": "# Mesh Reducer\n\nThis 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.\n\n## Features\n\n- Read STL, OBJ, PLY, and STEP files and extract points.\n- Reduce the number of points using a fast grid sampling method.\n- Python bindings for seamless integration with Python projects.\n\n## Supported Formats\n- STL\n- OBJ\n- PLY\n- STEP (initial implementation with future improvements expected)\n\n## Usage\n\nExample usage in Python: [click here](https://github.com/vffuunnyy/ai_hack).\n\n### Python\n\n```bash\npip install mesh-reducer\n```\n\n## Functions\n\n#### `load_mesh(file_path: Path, clusters: int) -> List[Tuple[float, float, float]]`\nReduces the number of points in a mesh file using fast grid clustering.\n\n**Args:**\n\n- file_path (Path): Path to the mesh file.\n- clusters (int): Number of clusters to reduce the points to.\n\n**Returns:**\n\n`List[Tuple[float, float, float]]`: A list of tuples containing the reduced points.\n\n#### `load_meshes(file_paths: List[Path], clusters: int) -> List[List[Tuple[float, float, float]]]`\nReduces the number of points in multiple mesh files using fast grid clustering.\n\n**Args:**\n\n- file_paths (List[Path]): List of paths to the mesh files.\n- clusters (int): Number of clusters to reduce the points to.\n\n**Returns:**\n\n`List[List[Tuple[float, float, float]]]`: A list of lists of tuples containing the reduced points for each file.\n\n## License\n\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package for reading STL, OBJ files and extracting points",
    "version": "2.0.2",
    "project_urls": {
        "Documentation": "https://github.com/vffuunnyy/stl_reducer/",
        "Homepage": "https://github.com/vffuunnyy/stl_reducer/",
        "Issues": "https://github.com/vffuunnyy/stl_reducer/issues",
        "Repository": "https://github.com/vffuunnyy/stl_reducer.git"
    },
    "split_keywords": [
        "stl",
        " reducer",
        " python",
        " rust",
        " pyo3",
        " grid",
        " voxel",
        " mesh",
        " obj"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e58069818fc2bd2891d7ea14e619854a6e50902a8019179c8cfca3fe15f4df3a",
                "md5": "caa069dfcb2739c9b3db5e5b472ca453",
                "sha256": "012ff28a501b3291b3ab2d94e4738d2c32d125bae859b3d22d50a4f5d04b3b06"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp310-cp310-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "caa069dfcb2739c9b3db5e5b472ca453",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 578425,
            "upload_time": "2024-11-25T09:35:44",
            "upload_time_iso_8601": "2024-11-25T09:35:44.069617Z",
            "url": "https://files.pythonhosted.org/packages/e5/80/69818fc2bd2891d7ea14e619854a6e50902a8019179c8cfca3fe15f4df3a/mesh_reducer-2.0.2-cp310-cp310-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cfb25f13e35a0723e06b5ac685b1ab838c87987c85a6da38932c422457a758eb",
                "md5": "28e69a595cf738824559a57a084bb0af",
                "sha256": "6452b7b57d6a0b425ef9c43bb183063bc537f43fec196782faa69be2948563d7"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp310-cp310-manylinux_2_34_x86_64.whl",
            "has_sig": false,
            "md5_digest": "28e69a595cf738824559a57a084bb0af",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 646694,
            "upload_time": "2024-11-25T09:35:49",
            "upload_time_iso_8601": "2024-11-25T09:35:49.798163Z",
            "url": "https://files.pythonhosted.org/packages/cf/b2/5f13e35a0723e06b5ac685b1ab838c87987c85a6da38932c422457a758eb/mesh_reducer-2.0.2-cp310-cp310-manylinux_2_34_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a424a78737ccad2dbc2c37ba03a851f2f220a2f3178e6bb6ca0f1b0b7dfce6c0",
                "md5": "405a8dd5ded60b55f347dd1949101837",
                "sha256": "291f121bd12f84777dffc7a63aabe94155b7d753cc766b10b1018ec7306d89e1"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp310-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "405a8dd5ded60b55f347dd1949101837",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 551492,
            "upload_time": "2024-11-25T09:35:55",
            "upload_time_iso_8601": "2024-11-25T09:35:55.202603Z",
            "url": "https://files.pythonhosted.org/packages/a4/24/a78737ccad2dbc2c37ba03a851f2f220a2f3178e6bb6ca0f1b0b7dfce6c0/mesh_reducer-2.0.2-cp310-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fa87a2c98c966bf8992490ae8bb4ead7c2a94bc78bad8702cf074f5c433ee5f",
                "md5": "7d001ef0c460f4ff7ecd1d287b8beca2",
                "sha256": "552fd3b78556290d90020227634b986cf01ff15b26f91d8e345db121695eb6e4"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp311-cp311-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "7d001ef0c460f4ff7ecd1d287b8beca2",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 578337,
            "upload_time": "2024-11-25T09:35:45",
            "upload_time_iso_8601": "2024-11-25T09:35:45.266194Z",
            "url": "https://files.pythonhosted.org/packages/2f/a8/7a2c98c966bf8992490ae8bb4ead7c2a94bc78bad8702cf074f5c433ee5f/mesh_reducer-2.0.2-cp311-cp311-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76b1845cb7395c6b1b207357c28465c72f82525a65a758c6e2e5a88e29afff19",
                "md5": "78f8a316e3d46be2d549512830e3dfdf",
                "sha256": "9c7739cd48db2d725f361e653421363df0c42c4bd8f05d1c1ff72006639c9432"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp311-cp311-manylinux_2_34_x86_64.whl",
            "has_sig": false,
            "md5_digest": "78f8a316e3d46be2d549512830e3dfdf",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 646514,
            "upload_time": "2024-11-25T09:35:50",
            "upload_time_iso_8601": "2024-11-25T09:35:50.892701Z",
            "url": "https://files.pythonhosted.org/packages/76/b1/845cb7395c6b1b207357c28465c72f82525a65a758c6e2e5a88e29afff19/mesh_reducer-2.0.2-cp311-cp311-manylinux_2_34_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07098df5301cd1a064857422411e8add73336456b7b1a21104f1eeedfc3924d6",
                "md5": "fb9badaef1b0d119564a49a91167904e",
                "sha256": "f65d48bad96f9f5cc15a00e2c314458e1c904167e059ac13330ee660c116cdd9"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp311-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "fb9badaef1b0d119564a49a91167904e",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 551380,
            "upload_time": "2024-11-25T09:35:56",
            "upload_time_iso_8601": "2024-11-25T09:35:56.723596Z",
            "url": "https://files.pythonhosted.org/packages/07/09/8df5301cd1a064857422411e8add73336456b7b1a21104f1eeedfc3924d6/mesh_reducer-2.0.2-cp311-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "790c2d3c7d467e75a1153138e4e806faa0f57cbe2c2f55ae039ebb118fe3a6d4",
                "md5": "d2bb1d458c2489908a814da15203f540",
                "sha256": "1aa6f258a3541558a8e4f665f93f8b3dbee620945381703bd310e6defcaaf266"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "d2bb1d458c2489908a814da15203f540",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 576941,
            "upload_time": "2024-11-25T09:35:47",
            "upload_time_iso_8601": "2024-11-25T09:35:47.476176Z",
            "url": "https://files.pythonhosted.org/packages/79/0c/2d3c7d467e75a1153138e4e806faa0f57cbe2c2f55ae039ebb118fe3a6d4/mesh_reducer-2.0.2-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07ec1a64175e48337841327fde64b83ad2b61ee3810ee3c67c5d31d63cb8cc39",
                "md5": "38d8df57df9ee443db8ea10dd994141b",
                "sha256": "2d577e4ee5c07596b475318c2e3acb5ab7d686c0fd4b19409e38a92a709018ff"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp312-cp312-manylinux_2_34_x86_64.whl",
            "has_sig": false,
            "md5_digest": "38d8df57df9ee443db8ea10dd994141b",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 645994,
            "upload_time": "2024-11-25T09:35:52",
            "upload_time_iso_8601": "2024-11-25T09:35:52.026327Z",
            "url": "https://files.pythonhosted.org/packages/07/ec/1a64175e48337841327fde64b83ad2b61ee3810ee3c67c5d31d63cb8cc39/mesh_reducer-2.0.2-cp312-cp312-manylinux_2_34_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9644636a342774952378f6ecba68997f89862b1a7e89d4e475efea77ed1e8c5e",
                "md5": "658daeae33bcd93aac345646b55c7e2e",
                "sha256": "09cfa626dd845af35cf5a86e3899e5ce0b9d798666c62afd08740f49b6e0e516"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp312-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "658daeae33bcd93aac345646b55c7e2e",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 550641,
            "upload_time": "2024-11-25T09:35:58",
            "upload_time_iso_8601": "2024-11-25T09:35:58.600944Z",
            "url": "https://files.pythonhosted.org/packages/96/44/636a342774952378f6ecba68997f89862b1a7e89d4e475efea77ed1e8c5e/mesh_reducer-2.0.2-cp312-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d5a2e39315cba1b9ebb22851b228f81d90f5bb32d9d8d93a3aa3553eaacbe05",
                "md5": "41b89ff23baa7460cd9a9c19edc96d1d",
                "sha256": "2983ae939439b9484fec664d90dc71ddcdfb57e4822df08ef347f75d4454060b"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp39-cp39-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "41b89ff23baa7460cd9a9c19edc96d1d",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 578558,
            "upload_time": "2024-11-25T09:35:48",
            "upload_time_iso_8601": "2024-11-25T09:35:48.642663Z",
            "url": "https://files.pythonhosted.org/packages/5d/5a/2e39315cba1b9ebb22851b228f81d90f5bb32d9d8d93a3aa3553eaacbe05/mesh_reducer-2.0.2-cp39-cp39-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a309520c6c9894b4f66f8161817e6135318d1a7f9442aeb02bda55419d9a7c2",
                "md5": "e10700fe1afa4784bcfd653a6c64cde3",
                "sha256": "f6ac1dcbb501639a4fa53de46538b745b1535c4d0af8c02e8dde65795c09aef2"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp39-cp39-manylinux_2_34_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e10700fe1afa4784bcfd653a6c64cde3",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 646947,
            "upload_time": "2024-11-25T09:35:53",
            "upload_time_iso_8601": "2024-11-25T09:35:53.400938Z",
            "url": "https://files.pythonhosted.org/packages/8a/30/9520c6c9894b4f66f8161817e6135318d1a7f9442aeb02bda55419d9a7c2/mesh_reducer-2.0.2-cp39-cp39-manylinux_2_34_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "05e3a773d7ba937661afbd40cf1e1af6e29f4487b6dac046e33df71ca5b31021",
                "md5": "4c7f51d7760f8afdaa5cf4125a935ab3",
                "sha256": "5a3506eb946c4813d9cc0a82350393c5370b6342791ed370f0b4cb8e100c01b2"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2-cp39-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "4c7f51d7760f8afdaa5cf4125a935ab3",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 551787,
            "upload_time": "2024-11-25T09:36:00",
            "upload_time_iso_8601": "2024-11-25T09:36:00.376420Z",
            "url": "https://files.pythonhosted.org/packages/05/e3/a773d7ba937661afbd40cf1e1af6e29f4487b6dac046e33df71ca5b31021/mesh_reducer-2.0.2-cp39-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8af95d1c17672b612a075b897ca146279ded94e4405df53d0a6fba8d775053aa",
                "md5": "da073713b2bc49011b8e538a2d3d4573",
                "sha256": "ea8f2499ebb7e609e59f42611d1559d4e08f789308d6b844a67f715c127ad331"
            },
            "downloads": -1,
            "filename": "mesh_reducer-2.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "da073713b2bc49011b8e538a2d3d4573",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7086446,
            "upload_time": "2024-11-25T09:36:01",
            "upload_time_iso_8601": "2024-11-25T09:36:01.843894Z",
            "url": "https://files.pythonhosted.org/packages/8a/f9/5d1c17672b612a075b897ca146279ded94e4405df53d0a6fba8d775053aa/mesh_reducer-2.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-25 09:36:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vffuunnyy",
    "github_project": "stl_reducer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mesh-reducer"
}
        
Elapsed time: 0.38043s