Metadata-Version: 2.4
Name: py3dconvert
Version: 1.0.1
Summary: A Python toolkit for converting, inspecting, validating and optimizing static 3D assets
License-Expression: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: trimesh>=4.4
Requires-Dist: numpy>=1.24
Requires-Dist: Pillow>=10.0
Provides-Extra: gui
Requires-Dist: PySide6>=6.6; extra == "gui"
Requires-Dist: pyvista>=0.43; extra == "gui"
Requires-Dist: pyvistaqt>=0.11; extra == "gui"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"
Provides-Extra: all
Requires-Dist: PySide6>=6.6; extra == "all"
Requires-Dist: pyvista>=0.43; extra == "all"
Requires-Dist: pyvistaqt>=0.11; extra == "all"
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Dynamic: license-file

# Py3DConvert

**Py3DConvert** is a Python library and CLI for converting, inspecting, validating and performing conservative cleanup on static 3D mesh assets. The desktop GUI is optional. It uses the Python `trimesh` ecosystem and does not require Blender, Assimp executables or a REST service.

## Install

```bash
python -m pip install py3dconvert
python -m pip install "py3dconvert[gui]"  # optional desktop UI
python -m pip install "py3dconvert[dev]"  # build, tests, lint and PyPI checks
```

## Python API

```python
from py3dconvert import Converter, Inspector, Validator, Optimizer

result = Converter().convert("model.obj", "model.glb")
print(result.output, result.output_size)

info = Inspector.inspect("model.glb")
print(info.geometry_count, info.vertex_count, info.face_count, info.bounds)

report = Validator.validate("model.glb")
if not report.valid:
    print(report.errors)

Optimizer.repair_basic("model.obj", "model-clean.obj")
```

## Batch conversion

```python
from pathlib import Path
from py3dconvert import Converter

report = Converter().convert_batch(
    Path("models").glob("*.obj"), "converted", "glb",
    continue_on_error=True,
)
print(len(report.results), report.errors)
```

## CLI

```bash
py3dconvert formats
py3dconvert capabilities
py3dconvert convert input.obj output.glb
py3dconvert inspect model.glb
py3dconvert validate model.stl --watertight
py3dconvert batch ./models ./converted --to glb --continue-on-error
py3dconvert-gui  # requires [gui] extra
```

## Format support and fidelity

The exact import/export capabilities depend on the installed `trimesh` version and optional Python dependencies. Run `py3dconvert formats` to see known extensions, `py3dconvert capabilities` to see the installed import/export registrations, or call `format_capabilities()` from Python. A listed extension is not a guarantee that every source/target pair works. Some formats need optional handlers; some exporters produce sidecar files. Always validate outputs in the application that will consume them.

This release targets **static triangle-mesh assets**. It does not claim full preservation or conversion of skeletal rigs, skinning, morph targets, animation timelines, CAD parametric history, physics, cameras, lights or every material/shader graph. Material and texture fidelity is format- and backend-dependent. It is not a universal replacement for Blender or specialist CAD tools.


## Development

```bash
python -m pip install -e ".[dev]"
python -m pytest
```

