Swiss building rules to CAD to 3D
From a Swiss address to the rules that apply, the legal building envelope, and an Archicad-ready 3D model.
- status
- Working prototype
- role
- AI consultant and developer, independent
- stack
- LLM document extraction, geodata, BIM / IFC generation, 3D
- 1,900+legal documents: federal, cantonal, and the regulations of 119 communes
- 18,000+pages of communal regulations read in a first pass
- 729federal and cantonal rules consolidated so far, each with its source
- <1minfrom an address to an IFC file that opens in Archicad
Problem
Before architects in Switzerland can draw a line, they have to work out what may be built on the plot. That answer is spread over four layers of rules:
| Layer | Volume | Covers |
|---|---|---|
| Federal | 58 documents | Planning, environment, natural hazards, heritage, energy, accessibility, safety |
| Canton (Fribourg) | 226 documents | Building law, definitions, fire protection, procedures |
| Commune | 1,600+ documents, 18,000+ pages, 119 communes | Local building regulations, in French or German |
| Zone | Per plot | Zoning maps, overlays, special prescriptions |
Volume is only half of it:
- The texts are entangled. A communal rule points to a cantonal definition, which applies a federal law. No layer can be read on its own.
- They have to be cross-checked. A regulation only counts once it is approved and in force, so every value is checked against approvals, amendments and the layers above it.
- They keep changing. Documents are revised and replaced, so each one has to be tracked by version, and an update must never silently overwrite what was valid before.
After that comes more manual work: typing terrain heights into the CAD program and drawing every wall by hand.
What the system does
Input: an address and a rough project brief (use, size, a few design choices).
| Step | Output |
|---|---|
| 1. Find the plot | Boundary, area and zone from public geodata |
| 2. Apply the rules | Density, heights, distances, legal building envelope |
| 3. Build the site | Terrain with contour lines and point cloud |
| 4. Generate the model | IFC file for Archicad with walls, slabs and openings |
| 5. Interior | 3D scene and a rendered proposal |
How I keep it trustworthy
A wrong number here means a building that cannot be approved, so the system is built to show its sources and admit doubt.
- Every value is traceable. A rule is stored with the document, the article and the quoted sentence. Source files are kept by hash, so a changed regulation cannot silently replace an old one.
- Machine-checked is not expert-approved. A second LLM pass re-reads each extraction, and the two states are kept apart. Nothing is labelled as approved by an expert until one has looked at it.
- “Needs review” is a valid answer. Several zones on one plot, conflicting texts, or special prescriptions return a review flag instead of a confident guess.
- It is a first assessment, not a permit decision, and the interface says so.
Status
In progress, as a working prototype for an architecture office in the canton of Fribourg. Commune regulations with full numeric rules cover 7 communes so far; the federal and cantonal layers are consolidated into one rule base (729 rules today), and a first reading pass over the regulations of all 119 communes of the canton is done and being checked. Next: connecting communal and zone values across more communes, and validation with the architects.
My role
I design and build the whole system: the rule extraction pipeline and its data model, the geodata and terrain processing, the IFC generation, the interior module, and the web application that ties them together.