Skip to main content

Constructing geometric tilings and transforming them into origami crease patterns

Project description

Pleat

PyPI CI Documentation License: MIT

Construct geometric tilings, and turn them into origami tessellations.

Seven Flowers — folded shrink-rotate tessellation Double Dodecagon — folded intersecting-cylinders tessellation 7.4.3 Circles — folded shrink-rotate tessellation

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()

Quick start output: crease pattern and backlit folded stateQuick start output: folded top and bottom views

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pleat-0.1.0.tar.gz (9.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pleat-0.1.0-py3-none-any.whl (196.5 kB view details)

Uploaded Python 3

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

Hashes for pleat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3bf87a1f064165df64b64161bbf4aa990a3e7a43957c73d4b094fd55e112c625
MD5 03a1214aa3a24d1bd2eef2e1c939ef8b
BLAKE2b-256 c3a09af0484fe46c1400104d7ef4a9a76c35d8936136be04b6fcd92151b05c5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pleat-0.1.0.tar.gz:

Publisher: release.yml on imagirom/pleat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pleat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f20de4280dc149030c24c10c4f45661c6e3ea52532b5b73f627a78646bc8fc92
MD5 e8a18997bc3bebe44d4dbb1ba70fdcb9
BLAKE2b-256 8e66556f471319dd752955fbdced6344f3548aff865872df27e39d16a3bafa98

See more details on using hashes here.

Provenance

The following attestation bundles were made for pleat-0.1.0-py3-none-any.whl:

Publisher: release.yml on imagirom/pleat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page