CAD-to-BIM: An Agentic Approach
What happens when you give an AI agent domain expertise in structural engineering, teach it to read CAD drawings, and let it build 3D models — with a human architect in the loop?
You get insanely realistic BIM outputs. Here's how.
The Big Idea
We figured out how to make AI agents — specifically Claude Code — act as a structural engineering copilot that can read 2D floor plans and generate full 3D Building Information Models.
Not toy models. Not wireframes. Production-grade IFC4 files with columns, walls, beams, slabs, drop panels, glass curtain walls — the works. Multi-storey buildings, correct spatial hierarchy, proper materials.
The secret sauce? Custom skills — domain knowledge packages that give the agent deep expertise in CAD understanding and BIM generation. Think of it as giving the agent a structural engineering degree, an architecture license, and years of Indian construction practice experience — all encoded as reusable knowledge.
How It Actually Works
💡 The core loop: Agent reads drawings → Human validates nuances → Agent builds the model
Step 1: The Agent Reads Your DXF
You hand the agent a 2D CAD floor plan. Could be clean, could be messy — doesn't matter.
The agent's CAD Understanding skill kicks in. It figures out what it's looking at:
- Extracts every line, polyline, and geometric entity
- Repairs broken topology (real CAD files are never clean)
- Identifies closed regions — these become your structural elements
- Classifies them: that's a column, that's a wall, that's a beam
The skill handles everything from pristine standards-compliant drawings down to the nightmare single-layer DXFs that show up on real construction sites.
Step 2: Human-in-the-Loop (Where the Magic Happens)
Here's where it gets interesting. The agent is good, but structural engineering has nuances. A 0.3m × 1.2m rectangle — is that a column or a short wall? A large polygon near a column — drop panel or slab panel?
Enter Assistive Segmentation: an interactive tool where you and the agent collaborate.
You see the drawing. You see the agent's classifications. You fix the ones it got wrong — maybe 40-50 corrections out of 800+ elements. And then the agent propagates your corrections. Each fix cascades to ~7 similar elements automatically.
One floor's corrections become training data for the entire building.
The agent learns: "On this project, shapes like THIS are drop panels, not slab panels." Then it applies that understanding to every other floor — no additional input needed.
Step 3: The Agent Builds the BIM
The BIM Generation skill takes over. The agent:
- Promotes every 2D polygon to a 3D element with the right IFC entity type
- Uses exact polygon boundaries as extrusion profiles — no approximation
- Stacks floors at correct elevations with proper slab continuity
- Assigns materials (Concrete M30, Glass with transparency)
- Wraps everything in a proper IFC4 spatial hierarchy
The output opens in any BIM viewer — BIMvision, BlenderBIM, Xeokit — and looks like a real building.
What Makes This Different
| Traditional Approach | Our Agentic Approach | | ---------------------------------- | ------------------------------------------------ | | Manual Revit modeling from scratch | Agent reads the DXF directly | | Hours per floor | Minutes per floor | | Requires BIM specialist | Requires structural engineer for validation only | | Static — changes need re-modeling | Re-run the agent with updated parameters | | Single floor at a time | Multi-storey in one pass |
The agent isn't replacing the engineer. It's amplifying them. The engineer focuses on what humans are good at — judgment calls, design intent, structural nuance — while the agent handles the tedious geometry extraction and model assembly.
What We're Targeting Right Now
✅ Currently Working
- Indian Residential Construction (IS 456:2000 conventions)
- Multi-storey flat-slab buildings
- Columns, walls, beams, slab panels, drop panels
- Glass curtain wall facades
- 4+ storey models from raw DXF files
- Drawing Types
- Floor plans (structural)
- Section cuts (top/bottom)
- Single-layer and multi-layer DXFs
- Output
- IFC4 with full spatial hierarchy
- Proper materials and surface styles
- Cross-floor element alignment
🔜 Next Up
- Commercial Buildings — larger spans, different beam-depth ratios, steel sections
- Foundation Plans — isolated footings, strip footings, pile caps
- Reinforcement Detailing — reading bar bending schedules from CAD
- Section & Elevation Correlation — using vertical drawings to extract actual floor heights instead of heuristic defaults
🎯 On the Radar
- Point Cloud Integration — as-built verification against the generated BIM
- Automated BOQ Extraction — quantities directly from the model
- Multi-building Campus — site-level assembly from separate building models
The Tech Stack
The entire pipeline runs through Claude Code with two custom skills:
🔧 CAD 2D Understanding Skill
Gives the agent expertise in DXF parsing, layer conventions (IS/BIS, AIA, BS 1192), geometric pattern recognition, and structural element classification. Handles the full messiness spectrum of real-world drawings.
🏗️ BIM 3D Generation Skill
Gives the agent expertise in IFC4 schema, structural element promotion (2D → 3D), spatial hierarchy assembly, material assignment, and engineering defaults for Indian construction practice.
These aren't just prompts. They're structured knowledge systems — reference files, decision trees, codebase mappings, and engineering lookup tables that the agent loads on-demand based on what it's doing.
The Results
From a single manually-validated reference floor + three additional raw DXF files:
- 2,300+ structural elements across 4 storeys
- Columns consistent within 10% across floors (82-93 per floor)
- Glass curtain walls with proper IFC transparency rendering
- ~2.7 MB IFC file — efficient, standards-compliant, viewer-ready
The models aren't perfect — auto-classification on unseen floors still needs refinement, and some edge cases (curved walls, irregular slab openings) need human input. But for a pipeline that takes raw construction DXFs and produces a navigable 3D BIM in minutes?
It's a completely different game.
Validated on live residential projects in urban India. The pipeline is designed for Indian construction practice but the agentic approach generalizes to any building type with recalibrated domain knowledge.