- Overview
- Current Status
- Repository Layout
- Requirements
- Setup
- Usage
- Testing
- Known Limitations
- Contributing
- License
MeshTBD is a script-driven 3D mesh workflow focused on generating cast-like structures from scanned body-part meshes, with Voronoi-style openings and Blender post-processing.
The current primary runnable pipeline is VoronoiFinal.py.
- Active end-to-end script:
VoronoiFinal.py - In-progress consumable package:
mesh_interlibrary_formatter/ - Regression harness:
tests/test_phase4_regressions.py
VoronoiFinal.py: interactive cast-generation workflow (PyVista + PyMeshLab + Blender).mesh_interlibrary_formatter/: package scaffold for cross-library mesh loading/formatting.mesh_interlibrary_formatter/adapters/: adapter loaders for PyVista and Open3D.mesh_interlibrary_formatter/cli/scale_calibrate.py: minimal CLI scaffold (not full calibration implementation yet).tests/: regression tests for key correctness and packaging behaviors.
- Python
3.11.13(pinned inpyproject.toml) - Blender-compatible Python environment for
bpy/bmeshruntime usage
Core dependencies include:
bpynumpyopen3dpymeshlabpyvistascipytrimesh
- Clone the repository:
git clone https://github.com/mydkm/MeshTBD.git
cd MeshTBD- Install dependencies:
uv syncIf you'd like to download uv, you could do so here.
- Run the main script:
uv run python VoronoiFinal.py -i input_forearm.ply -o output_cast.stl- Create and activate a virtual environment:
python3.11 -m venv .venv
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Run the script:
python VoronoiFinal.py -i input_forearm.ply -o output_cast.stlRun:
python VoronoiFinal.py -i <input_mesh.(stl|ply)> -o <output_mesh.(stl|ply)>The script will:
- Open an interactive PyVista picker to select two landmarks on the surface.
- Compute geodesic distance between those points.
- Prompt for real-world distance to derive scale.
- Run reconstruction, Voronoi color projection, thresholding, remeshing, and Blender modifiers.
- Export final
.stlor.ply.
Useful options:
--right-click: use right-click picking.--auto-close: close picker window after second pick.--picker {hardware,cell,point,volume}: choose VTK picker.--scaled-polydata-out <path>: save scaled intermediate mesh.
Current scaffold command:
python -m mesh_interlibrary_formatter.cli.scale_calibrate --helpThis CLI exists and parses arguments, but full calibration behavior is still pending.
Run the current regression suite with stdlib unittest:
python -m unittest discover -s tests -p "test_*.py" -vVoronoiFinal.pyis interactive and GUI-dependent (PyVista + Blender context).- End-to-end Blender pipeline validation is not fully automated.
mesh_interlibrary_formatteris importable but still functionally incomplete as a full consumable package.
Issues and PRs are welcome. Please keep changes reproducible and include clear validation steps (commands, sample inputs, and expected outputs).
MIT License. See LICENSE.