About this project
Browser-based cutting sheet optimiser that packs rectangular pieces onto plywood sheets with minimal waste. Zero-dependency, runs entirely in-browser with PDF export and CSV import.
Background
CutWise is a woodworking tool that I built because I needed it. When you're cutting a cabinet or a set of shelves from sheet plywood, you have a list of pieces that need to come from standard 2400×1200mm sheets. Figuring out how to arrange them to minimise waste is a 2D bin packing problem — straightforward to understand, surprisingly annoying to do by hand for more than a few pieces.
The algorithm is Guillotine Best-Area-Fit: at each step, choose the free rectangle whose area most closely matches the piece being placed, and split the remaining space into two rectangles with a guillotine cut. It's not optimal — 2D bin packing is NP-hard — but it's fast, produces good results in practice, and the guillotine constraint is actually useful for woodworking because it reflects how real cuts are made: you run a sheet through a table saw, which produces a guillotine split.
The grain direction feature came from practical experience. For furniture work, the wood grain usually needs to run in a specific direction relative to the piece. The tool supports locking grain direction per piece and evaluates both 0° and 90° orientations when placing, choosing the one that fits better while respecting the grain constraint. The canvas rendering gives you an immediate visual of the placement, colour-coded by piece name, so you can sanity-check the output before cutting. PDF export produces a print-ready sheet at scale.
Highlights
- Guillotine Best-Area-Fit packing algorithm — pieces sorted largest-to-smallest by area
- Grain direction lock with dual-orientation (0°/90°) evaluation per placement
- Named pieces with unique colour coding for at-a-glance identification
- CSV drag-and-drop import for cut lists (name, width, height, quantity)
- Per-sheet utilisation percentage and print-ready PDF export