ShapeFit – Hold-to-Shape for Swift & Rust
Turn a hand-drawn stroke into a clean line, circle, rectangle or polygon when the user pauses, for your own drawing app.

One-time purchase.
What it is
ShapeFit adds the hold-to-shape gesture from Apple Notes and GoodNotes to your own drawing app. When the user pauses at the end of a stroke, it snaps to a clean line, circle, ellipse, rectangle, triangle or polygon, and leaves scribbles alone. Pure geometry, no ML model, zero dependencies: a Rust crate plus a drop-in Swift file with identical results.
Quick start
cargo test
cargo run --bin shapefit-demo
open out/shapes.svgCompared with
| Tool | Type | Notes |
|---|---|---|
| Desert Ant Labs Shapes | Swift SDK with an ML model | Free up to 100k MAU |
| guessture, $P stroke recognizers | Free Rust crates | Gesture recognizers, not shape beautification |
| ShapeFit | Rust crate + Swift file, source included | $9 one-time; no ML, no MAU limits, identical Rust and Swift output |
FAQ
How do I add Apple Notes-style hold-to-shape to my app?
Feed the stroke points to ShapeFit when the pen pauses. It returns a clean shape, or leaves the stroke alone if it is a scribble.
Does it work with PencilKit?
Yes. The Swift file works with PencilKit or any canvas.
Which shapes does it recognise?
Lines with 45° snap, circles and ellipses, upright rectangles, triangles and polygons up to 6 corners.
Does it use machine learning?
No. It is pure geometry with zero dependencies and no training data. The Rust and Swift versions give identical results, checked on 600 strokes.
Is it a subscription?
No. One-time purchase, full source included.
Is there a PencilKit shape-snapping library without ML or MAU limits?
Yes. ShapeFit is pure geometry: no model, no per-user limits, zero dependencies, with a Rust crate and a Swift file that give identical results.
Which tier should I buy?
Personal is for one person, and that includes shipping it inside your own paid or free apps as compiled or bundled code. Commercial is for a company or organisation, where more than one person uses it, and adds priority email support. Neither lets you share the source itself. Both include the full source. One-time purchase.
What do I get after paying?
A zip with the full source, README and runnable demo. Polar shows the download right after checkout and in the receipt email.
One-time purchase.

