PROJECT SPECIFICATION
1) Purpose and scope of the project
Purpose: To build an AI-based web application that automatically performs measurements from project documentation (architecture, construction, installations/industries, pzt), combines drawings into a whole, identifies elements (e.g., walls, windows, doors, plasters, structural and installation elements), and then presents a complete measurement in tables with the possibility of visual verification (2D/3D) and pricing.
To start:
- Support for vector files: *.dwg, *.pdf (vector)
- Scope of industries: architecture, construction, installations (HVAC, plumbing, electrical), pzt
- Functions: automatic combining of documentation – for application needs, recognition of elements and measurements, visualization, manual correction option, adding prices and creating preliminary estimates
2) Main product assumptions
- Uploading: the user uploads a package of DWG/PDF files – vector files (plans, sections, elevations, descriptions, legends; possible backgrounds and XREFs).
- Automatic processing: the system parses files, normalizes layers, units, and scales, combines and fuses drawings into a coherent reference model.
- AI recognizes elements: recognizes all elements in the projects
- Measurement: calculates quantities according to measurement rules (lengths, areas, volumes, pieces); takes into account openings, thicknesses, layers – measurements according to global rules
- Verification: tabular result + 2D/3D preview with highlighting of counted elements; "compare/explain" mode for ambiguities (conflicts between sheets, missing dimensions, inconsistent scales).
- Manual correction: editable classifications and geometry (drawing/editing polylines/openings), acceptance/rejection of elements.
- Prices and estimates: attaching price items and rates (unit price, markups, VAT), export CSV/XLSX/BC3/PDF.
- Audit and versioning: change history, comparison of measurements, differences between versions of documentation
3) User flow
- New project → name, investor, location, default units and currencies
- File upload → drag&drop, consistency check
- Processing → parsing, normalization, fusion, AI classification, measurement.
- Review → tables + 2D/3D view; ambiguity panel; filters (industry, floor, layer, type).
- Correction → geometry editor, change class, combine/split elements, acceptance.
- Prices → assignment of items, rates, markups.
- Export/report → XLSX/CSV/BC3, PDF summaries, ambiguity report.
5) Functional requirements (detailed)
5.1 Import and validation of files
- Support: vector files: DWG, DXF (optional), vector PDF
- Automatic detection of scale: from viewports (DWG), from title block (OCR), from markings (e.g., 1:100), from dimensions (DIMSTYLE / recognition of dimension text).
- Normalization of units (mm/m) and reference system (translations, rotations, local systems, UCS).
- Detection of deficiencies and errors
5.2 Fusion of documentation (combining into a whole)
- Grouping of sheets: floors, sections, elevations, industries.
- Registration and alignment of plans/sections (matching axis markers, grids, levels; total 2D/3D transformation).
- Combining architecture with construction
5.3 Recognition of elements (AI + rules)
Requirement: Recognition of elements cannot rely solely on layer names. Layer names are treated only as low-weight auxiliary signals.
Implementation rules:
- Classification decisions are primarily based on geometry and topology – based on machine learning
- In case of conflicting information: priority: DIM/dimensions > unambiguous textual description > legend/diagram > geometric features > layer name.
- The system must operate with any/non-standard layer naming (different languages, abbreviations, lack of standards). For testing, complete anonymization of layer names is possible.
- The AI/rules component should allow disabling the influence of layers (feature flag) – the result must still be correct.
5.4 Measurement - measurement based on accepted rules and recognition of elements
5.5 Verification and editing
- View 2D (plan, section) and 3D (simple extruded model) with highlighting of counted elements.
- Check mode: click on an element → measurement details + sources (sheets, descriptions), tolerance/uncertainty.
- Editing tools: drawing/editing polylines, moving/scaling, changing class, combining/splitting.
- List of ambiguities: questions to the user, proposed solutions, acceptance/rejection.
5.6 Prices and estimates
- Price dictionaries/items: global item database (for the system) and local for the user – the user can change the local price)
- Mapping: element type → formula → price item.
- Formulas: price = quantity × rate ± markups (labor, materials, equipment, profit, overhead, VAT).
- Versioning of price lists, currencies, price indexing (inflation).
- Export: XLSX/ (Estimate), PDF summaries.
5.7 Exports and integrations
- XLSX/CSV/BC3, PDF reports (screenshots of visualizations + tables).
6) Non-functional requirements
- Measurement accuracy: geometric error ≤ ±2 mm at correct scales;
- Performance: project up to 200 sheets/2 GB – full processing ≤ 20 min; plan for preview ≤ 3 s.
- Scalability: horizontal (task queues), storage for files up to 10 GB/project.
- Security: GDPR, encryption at-rest and in-transit, IAM, audit log, WAF, backups.
- Reliability: processing SLO 99.5%/month; retry/compensations, versioning of models.
8) Processing pipeline (technical steps)
- Upload & validation → AV scan, metadata extraction, XREF detection.
- Parsing:
- DWG/DXF: reading layers, block references, geometry, DIMSTYLE, viewport scale, Model/Paper Space.
- PDF (vector): paths, polylines, texts (TrueType), layers; OCR only for vector texts as a fallback.
- Normalization of scale and units: from viewports and titles; automatic matching; flags in case of conflicts.
- Registration of sheets: matching axes/grids/markers (ICP/feature matching on vectors), 2D/3D transformations.
- Extraction of semantic objects:
- Layer rules (e.g., A-WALL, K-…); name templates; dictionary classification.
- AI on vector graph: polylines → walls (parallel lines), hatch → fills/floors, blocks → equipment.
- Texts and legends → parsing parameters (thicknesses, materials, types, room numbers).
- Fusion: conflict resolution (arch vs const), hierarchy of reliability (DIM > description > legend > layer), tracking data provenance.
- Measurement: rules, units, deductions for openings, aggregations by floors/rooms.
- Detection of ambiguities: missing parameters, inconsistent scales, conflicting thicknesses – generating questions.
- Visualization: generation of backgrounds, overlay of objects, simplified 3D (extrusion according to floor height).
- Estimates: mapping element→item, formulas, markups, export.
9) AI model and learning
- Representation: vector graph (nodes: geometry vertices and blocks; edges: segments/polylines; attributes: layer, type, line style, nearby texts), additionally rasterization for contextual features.
- Architecture: Graph Neural Network (GAT/GraphSAGE) + Transformer on sequences of vectors; late fusion with CAD rules and heuristics.
- Training data: anchored in real DWG (semi-automatic annotation) + synthetic drawing generators; active learning from user interaction (feedback in UI).
- OCR/NLP: recognition of descriptions, tables, legends; normalization of units (mm/m), parsing expressions (e.g., “wall 24 cm, gypsum plaster 1.5 cm”).
- Metrics: mAP/F1 for classes, MAE/SMAPE for quantities, processing time.
- MLOps: model registry, dataset versioning, validations, A/B in the background per project.
10) Measurement rules – details (configurable examples)
- Walls:
- Length from the wall axis; Height: from sections / default from the floor; Thickness: from description/layer.
- Plaster area = 2 × (length × height) – deductions for openings > t_deduction; threshold rules (e.g., do not deduct < 0.5 m²).
- Openings: Width, height from dimensions/markings; number of pieces; area in light.
- Ceilings/slabs: Area from the contour; volume = area × thickness; perimeter (formwork).
- Stairs: Number of runs, area of steps (anti-slip), risers (mb), railings (mb).
- Floors/coverings: Net area after deductions; skirting boards (mb along walls).
- Installations: Lengths of routes along the axis; fittings – detection rules from blocks/symbol dictionary.
Each rule has: quantity definition, data sources, formula, tolerance and priority.
11) UI/UX – key screens
- Project dashboard: processing statuses, latest measurements.
- Documentation review: list of sheets (thumbnails), layers, filters.
- Verification view: 2D/3D canvas with overlay; color legends for classes; element detail panel.
- Measurement table: grouping by industry/floor/room/type; in-line edit; change tracking.
- Ambiguity panel: questions, proposed solutions, acceptance.
- Price lists and mapping: overview of items, formulas, preview of cost impact.
- Exports: range and format selection wizard.