BBL Plan-Check — BBL Plan Checker / Prüfplattform Flächenmanagement - A prototype for validating floor plan drawings against Swiss Federal BBL CAD standards.
Live Demo (Working Viewer and Checking Engine): https://bbl-dres.github.io/plan-check/
All processing runs locally in the browser via LibreDWG WebAssembly — no files are uploaded to a server.
Prototype (Project and IAM Management): https://bbl-dres.github.io/plan-check/prototype1/
A prototype mockup frontend that explore possible integration of project, building and file structures with user management, roles and access control.
- DWG/DXF Processing — Upload and parse AutoCAD files (R13–R2024) directly in the browser using LibreDWG WebAssembly
- Room Extraction — Automatic detection of room polygons on the
A1Z21---E-layer with text label matching - Area Extraction — Recognition of area polygons on BGF/EBF/GF layers
- Validation Rules — Configurable rule engine checking labels, geometry closure, polygon integrity, and minimum area
- Interactive Viewer — Canvas 2D floor plan renderer with pan, zoom (mouse wheel + pinch), and click-to-select
- Kennzahlen — SIA 416 / DIN 277 area breakdowns (GF, NGF, KF, HNF, NNF, VF, FF) with donut chart visualization
- PDF Report — 6-page report with cover, layer overview, error list, room list, area list, and Kennzahlen
- Excel Report — XLSX workbook with 6 sheets matching the PDF structure
- GeoJSON / BCF Export — Export room geometries and BIM Collaboration Format issues (planned)
- API Documentation — Swagger-style docs rendered from an OpenAPI 3.0 spec (
?view=api-docs) - Responsive Design — Mobile-first layout with hamburger menu, touch gestures, and adaptive split view
Visit bbl-dres.github.io/plan-check and either upload a DWG/DXF file or click «Demo-Projekt laden».
git clone https://github.com/bbl-dres/plan-check.git
cd plan-check
python -m http.server 8000
# Visit http://localhost:8000No build step, no dependencies — just a static file server.
plan-check/
├── index.html # Application entry point
├── css/
│ ├── tokens.css # Design tokens (colors, spacing, typography)
│ └── styles.css # Component styles (~1100 lines)
├── js/
│ ├── router.js # URL-based view router (app vs. api-docs)
│ ├── app.js # File handling, pan/zoom, event wiring
│ ├── state.js # Centralized application state
│ ├── dwg-processing.js # LibreDWG WASM integration, entity parsing
│ ├── renderer.js # Canvas 2D drawing, hit testing, popups
│ ├── validation.js # Room extraction, rules engine, tab UI
│ ├── export.js # PDF (jsPDF) and Excel (SheetJS) generation
│ ├── api-docs.js # OpenAPI spec renderer
│ └── utils.js # Shared helpers (formatting, geometry)
├── assets/
│ ├── openapi.json # OpenAPI 3.0 specification
│ ├── test-files/ # Sample DWG files for demo
│ └── swiss-logo-*.svg # Federal identity assets
├── docs/
│ ├── anleitung-de.md # User guide and FAQ (German)
│ └── pruefregeln-de.md # Validation rules reference (German)
└── prototype1/ # Earlier mockup prototype (archived)
| Component | Technology |
|---|---|
| DWG Parsing | libredwg-web (WebAssembly) |
| Rendering | Canvas 2D API |
| PDF Export | jsPDF + jspdf-autotable |
| Excel Export | SheetJS |
| Build Tools | None — vanilla HTML/CSS/JS |
- Project & Building Management — Multi-project backend with hierarchical structure (projects, buildings, floors, documents) and user/role management (Admin, Editor, Viewer) as demonstrated in the prototype.
- REST API — Backend service for automated batch validation. Documented at
?view=api-docswith an OpenAPI 3.0 spec. Key endpoints:/validate,/jobs/{jobId}/result,/export,/batch. - Configurable Rule Sets — Interchangeable checking configurations and rule definitions loaded from external files, replacing the currently hard-coded validation rules.
- Advanced Geometry Checks — Geometry consistency validation including duplicate detection, overlapping polygons, gap analysis, and self-intersection checks.
- Auto-Corrections — Suggesting fixes and automatically applying corrections to the drawing — closing open polygons, snapping endpoints, removing duplicate entities.
- Plugins for Authoring Tools — Integration with CAD/BIM authoring tools via plugins. Investigating Speckle and similar platforms for interoperability with AutoCAD, Revit, and other design software.
- Anleitung und FAQ (DE) — User guide covering upload, validation, viewer, exports
- API Documentation — REST API reference
- Swiss Federal Design System
- SIA 416 — Areas and Volumes of Buildings
- libredwg-web — LibreDWG WebAssembly
- BBL — Bundesamt für Bauten und Logistik
MIT License — See LICENSE for details.






