Constructing geometric tilings and transforming them into origami crease patterns
Project description
Pleat
Construct geometric tilings, and turn them into origami tessellations.
Pleat is a Python library for constructing, manipulating, and visualizing geometric tilings across Euclidean, hyperbolic, and spherical geometries. It can generate crease patterns for origami tessellations and corrugations using several algorithms which can be exported for printing or plotting, and can preview folded states.
Features
- Half-edge data structure — efficient DCEL representation for planar graphs with topology, angles, and positions
- Tiling construction — all 11 Archimedean tilings, Platonic solids, hyperbolic tilings, and custom prototiles
- Conway operators — dual, ambo, truncate, kis, join, gyro, starify, and more (including alternating flagstones, loft, lace, expand, chamfer)
- Three geometries — Euclidean plane, Poincaré disk model (hyperbolic), spherical
- Origami pipelines — shrink-rotate, intersecting cylinders, alternating flagstones
- Folding simulation — flat folding, finding a face ordering by solving an ILP
- Multiple renderers — Cairo for pretty pictures, svgwrite for optimized output for cutting plotters (or laser cutters)
Installation
pip install pleat
To run the example notebooks locally, clone and install with all extras:
git clone https://github.com/imagirom/pleat.git && cd pleat
uv venv --python 3.14
uv pip install -e ".[all]"
jupyter lab docs/notebooks
Finer-grained extras (e.g. to skip heavy dependencies such as torch) are listed in the installation guide.
Quick start
The whole pipeline — build a tiling, turn it into a crease pattern, preview the folded state:
import numpy as np
import pleat
from pleat.shrink_rotate import crease_orientation, shrink_rotate_pattern
# build a tiling: two rings of hexagons around a central one
G = pleat.example_graphs.from_tiles(pleat.example_tilesets.platonic(n=6), rings=2)
# decide which faces fold on top, then construct the crease pattern
crease_orientation.assign_this_way_from_center(G)
CP = shrink_rotate_pattern(G, simplify_boundary=True, alpha=np.pi / 5, factor=0.5)
# fold it: preview the folded state with solved layer ordering
pleat.overlap.fold_complete(CP, quiet=True).show()
Documentation
The full documentation lives at imagirom.github.io/pleat.
Its heart is a series of executed Jupyter notebooks — starting with the
pipeline overview — covering tiling
construction, and methods to turn them into origami tesselations. The notebook
sources are in docs/notebooks/.
To build the site locally:
uv pip install -e ".[docs]"
mkdocs serve # dev server at http://127.0.0.1:8000
Development
uv venv --python 3.14 && uv pip install -e ".[dev]" # contributor setup (in a clone)
uv run pytest -m "not slow" # tests (drop the -m flag for the full suite)
uv run --extra dev black --check pleat tests # formatting check
pre-commit install # install git hooks
GitHub Actions CI runs tests, lint, and mkdocs build --strict on every push and pull request (.github/workflows/ci.yml).
License
The code is MIT-licensed — see LICENSE.
The photographs of folded origami models (in docs/notebooks/images/) are © Roman Remme and licensed under CC BY-NC-ND 4.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pleat-0.1.0.tar.gz.
File metadata
- Download URL: pleat-0.1.0.tar.gz
- Upload date:
- Size: 9.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bf87a1f064165df64b64161bbf4aa990a3e7a43957c73d4b094fd55e112c625
|
|
| MD5 |
03a1214aa3a24d1bd2eef2e1c939ef8b
|
|
| BLAKE2b-256 |
c3a09af0484fe46c1400104d7ef4a9a76c35d8936136be04b6fcd92151b05c5c
|
Provenance
The following attestation bundles were made for pleat-0.1.0.tar.gz:
Publisher:
release.yml on imagirom/pleat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pleat-0.1.0.tar.gz -
Subject digest:
3bf87a1f064165df64b64161bbf4aa990a3e7a43957c73d4b094fd55e112c625 - Sigstore transparency entry: 2191650416
- Sigstore integration time:
-
Permalink:
imagirom/pleat@eff0cf09dfcc14b148d58c85394e5ac603d0c1ed -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/imagirom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eff0cf09dfcc14b148d58c85394e5ac603d0c1ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file pleat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pleat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 196.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f20de4280dc149030c24c10c4f45661c6e3ea52532b5b73f627a78646bc8fc92
|
|
| MD5 |
e8a18997bc3bebe44d4dbb1ba70fdcb9
|
|
| BLAKE2b-256 |
8e66556f471319dd752955fbdced6344f3548aff865872df27e39d16a3bafa98
|
Provenance
The following attestation bundles were made for pleat-0.1.0-py3-none-any.whl:
Publisher:
release.yml on imagirom/pleat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pleat-0.1.0-py3-none-any.whl -
Subject digest:
f20de4280dc149030c24c10c4f45661c6e3ea52532b5b73f627a78646bc8fc92 - Sigstore transparency entry: 2191650429
- Sigstore integration time:
-
Permalink:
imagirom/pleat@eff0cf09dfcc14b148d58c85394e5ac603d0c1ed -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/imagirom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eff0cf09dfcc14b148d58c85394e5ac603d0c1ed -
Trigger Event:
push
-
Statement type: