PyPLAML
An extension for Manim (https://www.manim.community/) supporting class diagrams. Allows creating various types of classes (interfaces, enums, ...) and relations between them, which can be later animated using Manim interface.
There is also a parser for PlantUML (https://plantuml.com/class-diagram), which can automatically create a diagram from provided .puml file.
Requirements
- ffmpeg, https://ffmpeg.org/download.html
- graphviz, https://graphviz.org/download
- (Windows only) Microsoft Visual C++ 14.0 or newer and Windows SDK (https://visualstudio.microsoft.com/visual-cpp-build-tools/ under Desktop development with C++)
All requirements for Linux can be installed using:
sudo apt -y install python3-venv python3-dev pkg-config build-essential libpango1.0-dev graphviz libgraphviz-dev ffmpeg
If there are any problems you can also refer to Manim install guide (https://docs.manim.community/en/stable/installation.html)
Installation
Before installation, make sure ffmpeg and graphviz are included in PATH. All commands should be run in package root (where pyproject.toml is).
Virtual environment in Linux:
python3 -m venv pyplaml_venv
source pyplaml_venv/bin/activate
Virtual environment in Windows:
python3 -m venv pyplaml_venv
.\pyplaml_venv\Scripts\activate
Install required Python packages:
pip install .
Fix for Windows Graphviz "Failed building wheel" error
python -m pip install --use-pep517 `
--config-settings="--global-option=build_ext" `
--config-settings="--global-option=-IC:\Program Files\Graphviz\include" `
--config-settings="--global-option=-LC:\Program Files\Graphviz\lib" `
pygraphviz
Usage
Usage is same as running any other manim scene. To run a scene from examples run:
manim examples/scenes/animals.py -pql
Example
Other examples available at https://gitlab.vsb.cz/tomas.orvisky.st/pyplaml/-/tree/main/examples/gif