Skip to main content

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.

  1. Create and navigate to your project directory.
  2. Create a virtual environment (optional but recommended):
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
  3. Install the package using pip: For normal installation:
    pip install subdivision-smoothing
    
    For development installation:
    pip install subdivision-smoothing[dev]
    
  4. For development, clone the subdivision_smoothing\debug dir from the repository. You can use the debug.py script 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

subdivision_smoothing-0.1.3.tar.gz (17.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

subdivision_smoothing-0.1.3-py2.py3-none-any.whl (13.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file subdivision_smoothing-0.1.3.tar.gz.

File metadata

  • Download URL: subdivision_smoothing-0.1.3.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

Hashes for subdivision_smoothing-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b8397a6a367eb3f8ac6ce691cf822dcd3e92ba32acc873215ba715ec8f1128c0
MD5 94819c70a5864eddcb35d389b25fd9ae
BLAKE2b-256 e95866ae9adcdd3aa802ce8ca2c4c597b80a3d42371a25d0ba7f0fd52418cb5c

See more details on using hashes here.

File details

Details for the file subdivision_smoothing-0.1.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for subdivision_smoothing-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 17d38f8f73e7d8e8ce723ca2b0a5525618c27b507d51d8e777a881614b2d6f2f
MD5 e60bafefc13a5eae0ccdf6d2adce3916
BLAKE2b-256 dfe6e437d0619630b68221eb199a64566739cddb75e02b8d5bcf5963f4dd78fd

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