A Python package for subdivision and smoothing of 3D meshes.
Project description
Subdivision and Smoothing
This library contains a class SubdivisionSmoothing that provides methods for performing subdivision and smoothing operations on 3D meshes. The class includes methods for Simple Subdivsion, Laplacian Smoothing, and a custom Subdivision Method that takes into account vertex position and edge sharpness. It also includes some helpful methods for making a subdivision or smoothing method yourself.
Installation
To use this library, you need to have Python installed.
- Create and navigate to your project directory.
- Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install the package using pip:
For normal installation:
pip install subdivision-smoothing
For development installation:pip install subdivision-smoothing[dev]
- For development, clone the
subdivision_smoothing\debugdir from the repository. You can use thedebug.pyscript to visualize the intermediate steps of the algorithms.
Usage
Here's a basic example of how to use the SubdivisionSmoothing class:
from subdivision_smoothing import SubdivisionSmoothing
import trimesh
# Load a mesh
mesh = trimesh.load_mesh('path_to_your_mesh.obj')
# Use a sudivision method on the mesh
subdivided_mesh = SubdivisionSmoothing.simple_subdivide(mesh, iterations=2)
# Save or visualize the subdivided mesh
subdivided_mesh.export('subdivided_mesh.obj')
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file subdivision_smoothing-0.1.4.tar.gz.
File metadata
- Download URL: subdivision_smoothing-0.1.4.tar.gz
- Upload date:
- Size: 17.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c5515036037ba8462b692bf73d6f85d3be8f3deb4f844173d720e61aa2df100
|
|
| MD5 |
18eafab574e25f342db09378c067f7cd
|
|
| BLAKE2b-256 |
2acf494b1ff763ddb358510ee834bc09d1ab6c92275b7762996b851e2a7bf5c8
|
File details
Details for the file subdivision_smoothing-0.1.4-py2.py3-none-any.whl.
File metadata
- Download URL: subdivision_smoothing-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a2ee57feaa8909766258780d0c20d07c5bd8ec86e98abfbde33b3ec4cf2550a
|
|
| MD5 |
b1517cad97fb66f28dda3999d74879bb
|
|
| BLAKE2b-256 |
837e0d96173c3044c41cdd4382322986f4cc749505602b50d7df6764b5acf78c
|