Metadata-Version: 2.4
Name: ply3d
Version: 0.1.0
Summary: A Python library for manipulating PLY 3D geometries of multicellular tissues
Author-email: Ross Carter <ross.carter@slcu.cam.ac.uk>, John Fozard <john.fozard@jic.ac.uk>, Guillaume Cerutti <guillaume.cerutti@ens-lyon.fr>
Maintainer-email: Guillaume Cerutti <guillaume.cerutti@ens-lyon.fr>
Project-URL: Homepage, https://gitlab.com/morphodynamics/mesh/ply3d_python
Description-Content-Type: text/markdown
Requires-Dist: matplotlib
Requires-Dist: meshio
Requires-Dist: pyvista[colormaps]
Requires-Dist: tqdm

# PLY 3D

A Python library for manipulating PLY 3D geometries of multicellular tissues.

## Motivation

**PLY 3D** is an extension of the [PLY format](https://paulbourke.net/dataformats/ply/) introduced to store 3D meshes composed of interconnected, arbitrary polyhedral cells. While complying with the specifications of the original format, it introduces a number of specific syntaxes for mesh elements and properties.

## Usage

In Python, you can use the library to load and manipulate such meshes, and visualize them with all their properties using `pyvista`:

```python
from ply3d.ply_parser import read_ply_mesh

mesh = read_ply_mesh("example_data/CylinderCells.ply")
# mesh.vertices.points, mesh.volumes.face_indices, ...
```

```python
from ply3d.vtk_export import unstructured_grid_from_mesh

grid = unstructured_grid_from_mesh(mesh, elements_to_export=['volume'])
```

```python
import pyvista as pv

plotter = pv.Plotter()
plotter.add_mesh(
    grid.shrink(0.9), 
    scalars='label', cmap='glasbey', clim=(0, 255), show_scalar_bar=False
)
plotter.show()
```

## Installation

`ply3d` is available on PyPI (the Python Package Index) and can be installed by running:

```bash
pip install ply3d
```

## Documentation

Please take a look at the [documentation](https://morphodynamics.gitlab.io/mesh/ply3d_python/) for more information on installation and usage


## Authors

This project is developed and maintained by the [Computational Morphodynamics Group](https://computationalmorphodynamics.org/); find out more about the [research groups](https://computationalmorphodynamics.org/research-groups/) involved.
