Exhibit P·07
box-pleating
A Python package for creating, analyzing, and validating box-pleated origami patterns.
A Python package for creating and validating box-pleated origami patterns
box-pleating is a Python package that provides tools for working with box-pleating origami patterns. It includes features for pattern creation, validation, and FOLD format conversion. It was meant to be a basis for an AI origami crease pattern generation project, but we'll see where it goes from here. :)
What it does
You can create patterns on customizable grids with mountain, valley, and border folds. The package handles intersection detection automatically and validates that creases align to the grid at 45 and 90 degree angles.
For validation, it implements Kawasaki's theorem (alternating angles sum to 180) and Maekawa's theorem (mountain/valley crease difference is 2), along with crease intersection detection and grid alignment verification.
It also supports importing from and exporting to the FOLD format, with automatic grid size optimization and redundant vertex removal.