The short answer
A plan exported to PDF from ARCHICAD, Revit or Allplan keeps its vectors: lines, fills, text with positions and often the CAD layers too. From this data, rules can read walls (from the hatching), windows and doors (from gaps in walls and their symbols), rooms (from labels and the area schedule) and the drawing's scale. The result is a house model in JSON that a 3D viewer renders as a virtual walkthrough of a house plan.
That's how the converter works in Plan2Walk, our own SaaS product.
Why not AI?
The first instinct is "let's feed the plan to a vision model". For drawings from CAD software, though, that's a detour:
- The PDF already contains the geometry. Recognising walls from an image when the file has exact line coordinates means throwing information away and guessing it back.
- Dimensions must be right to the centimetre. A model that "roughly" matches a wall's thickness or a window's width is no good for judging a design.
- Repeatability. The same file always gives the same result, and every error can be traced to a specific rule and fixed.
- Cost and time. A conversion takes seconds on an ordinary server, with no fee per model call.
AI makes sense where there are no vectors – for example with scans of paper drawings.
Step by step: what the converter reads
1. The file's content
The pdf.js library provides the list of drawing operations: paths, fills, text with positions and images, each with its layer (PDF optional content). Hatching is a clip region with lines inside – that's how wall sections are recognised.
2. Which pages are floor plans
A project often has dozens of pages: plans, sections, elevations, services, details. The converter picks the floor plans by their content (hatched walls) and titles, and skips pages titled "Section" or "Elevation".
3. Layers and scale
Layer names such as 220-Walls or A-WALL say directly what's drawn on them. The scale is read from the title block ("1:100") and then checked against the room areas on the drawing – if it doesn't match, the plan is rescaled.
4. Walls
Wall hatching is painted into a bitmap at 1 cm resolution, where we look for bands of constant thickness. These become straight walls, joined at junctions and extended to their centre lines.
5. Windows and doors
An opening is a gap in a wall with a window (a glass line) or a door (the leaf's arc) drawn in it. A label like "O1 hp 90 150/200" gives the width, height and sill, and the direction of the arc tells which way the door opens.
6. Rooms, slopes and furniture
Spaces closed by walls and openings get their name and area from the room stamp ("kitchen 13.21 m²") or from the room schedule. In the attic, dashed lines with notes like "h=190 cm" let us rebuild the sloping ceilings. The converter even recognises furniture drawn on the plan – beds, tables with chairs, kitchen units – and places it in the rooms.
7. Checks
Finally we compare the calculated areas with the labels (±5%), check that opening labels were matched and that the format is valid. The result gets a confidence rating, and the customer gets a report and a plan editor to fix whatever needs fixing.
Architecture: a queue and worker threads
Converting a large PDF means seconds of heavy computation, so it can't block the API. Files go into a queue and are processed one at a time in a separate thread (Node.js worker threads). A project's first model becomes the current one straight away, while later uploads wait as new versions so they never overwrite the customer's edits. It's an example of custom software where the value lies in the algorithm, not in off-the-shelf building blocks.
What we learned
- Data format first. A shared, versioned house model let us develop the converter, the editor and the 3D viewer independently.
- Real files teach the most. Every studio draws a little differently – layer names, labels, schedules. The converter grows with every new example.
- The report is part of the product. A list of what the converter wasn't sure about builds more trust than a promise of "100% automatic".
Do you have files that data needs to be extracted from automatically – drawings, invoices, technical documents? We'll build a converter fitted to your data, with AI where it helps and without it where rules are enough. And if you just want to check a house plan before building, upload your plan to Plan2Walk.
Related services: custom software, web apps, saas development.