Metadata-Version: 2.4
Name: ansys-tools-usdviewer
Version: 0.1.0
Summary: A USD viewer built with PySide6 and Pixar's USD library.
Project-URL: Bugs, https://github.com/ansys/python-usd-viewer/issues
Project-URL: Documentation, https://usd-viewer.docs.pyansys.com/
Project-URL: Source, https://github.com/ansys/python-usd-viewer
Project-URL: Discussions, https://github.com/ansys/python-usd-viewer/discussions
Project-URL: Releases, https://github.com/ansys/python-usd-viewer/releases
Project-URL: Changelog, https://github.com/ansys/python-usd-viewer/blob/main/doc/source/changelog.rst
Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
Classifier: Topic :: Multimedia :: Graphics :: Viewers
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: <4,>=3.11
Requires-Dist: numpy
Requires-Dist: pyopengl
Requires-Dist: pyside6
Requires-Dist: vtk
Description-Content-Type: text/markdown

# Python USD Viewer

## Goals
The Python USD Viewer lets you visualize VTK-based 3D models (such as meshes and point clouds), even though USD and VTK are different 3D formats. This library converts between the two ecosystems.

## How the conversion works

The `_VTKConverter` class processes VTK assets by performing these steps:

1. Reads the VTK file using the appropriate VTK reader.
2. Converts the VTK geometry data to polydata (surface representation) or at least extracts the surface.
3. Translates the VTK polydata to a USD mesh.
4. Embeds the USD mesh into a USD stage for visualization.

## Installation

**Prerequisites**

You must have a C++ compiler. Linux typically includes one by default. On Windows, you can use Visual Studio.

1. Create a new Python environment for this repository:

```bash
pip install uv
```

2. Create a virtual environment and install the project:
```bash
uv venv .venv
```

3. Activate the environment:

```bash
# On Linux or macOS
source .venv/bin/activate
```

```bash
# On Windows
.venv\Scripts\activate
```

3. Install the project:

```bash
uv sync
```

4. Set up OpenUSD using the OpenUSD auto-installer:

```bash
usd-setup
```

Or, follow the instructions in the OpenUSD repository.

## Usage

Python USD Viewer uses Maya-style controls. To move the camera with the mouse, press and hold the **Alt** key.
