← Projects

Sketch to CAD

wip

Hand-drawn cabinet sketches to shop drawings, by email

for
A cabinetmaker. Client work, so he isn't named.
started
22 August 2026
in
A phone photo of a hand sketch
out
An A3 shop drawing and an A4 sheet of questions
accuracy
Not quoted yet

A cabinetmaker draws every job by hand on graph paper. He photographs the sketch and emails it, and gets back an A3 shop drawing and an A4 run sheet of questions about anything the pipeline wasn’t sure of.

A hand-drawn laundry elevation on grid paper: a tall unit on the left, four overhead cupboards across the top, base cupboards below, and a row of handwritten widths along the bottom with 3373 written as the overall

One of his real sketches, a laundry, turned the right way up. The customer’s name is blacked out.

A CAD shop drawing of a laundry: tall unit, four overhead cupboards, base cupboards with washing machine and dryer spaces, and full dimension chains

The drawing made from that sketch. The title block is a placeholder.

  • Reads the photo with Claude into a structured description of every cabinet, after turning it the right way up.
  • Checks the arithmetic. Widths along a run must add up to the overall he wrote. A gap is drawn and named on the sheet, never hidden.
  • Draws it with ordinary, deterministic code, in his own title block.
  • Asks. One A4 page of numbered right/wrong, fill-in and A/B items, with crops of his own ink beside them. He marks it up and replies to the email.

No accuracy figure is quoted yet, and every drawing is a draft for him to check. It’s a client tool, so there’s no public link, and the client isn’t named.

Stack

Claude
Reads the photo into a structured description of every cabinet.
OpenCV
Straightens and cleans the photo, and works out which way the writing runs.
Python
Checks the widths add up, then draws the sheet as hand-written SVG. No CAD engine.
Cairo
Turns the SVG into the PDF he gets.
Microsoft Graph
The mailbox. A sketch comes in, the drawing goes back in the same thread.
FastAPI
The phone app for answering the questions.

Build log

  1. Tap a dimension on the drawing to correct it, with an undo. Built and running. He hasn't used the app yet.

  2. A phone app asks the run sheet's questions one per screen, each with a crop of his sketch, then redraws the job.

  3. He answered a round of right/wrong claims about how he draws. His corrections went into the rules.

  4. A plan and an elevation from the one job.

  5. Email a sketch, get a drawing and a run sheet back, with nobody in the middle. Proven on three of his earlier sketches.  Read →

  6. The first real photo goes all the way through to an A3 drawing.

  7. Started. A day of tests ran on photos the model was seeing upside down. Turned upright, two of its "limitations" went away.

Writing