NativeBIM by NativeCAD

NativeBIM / Demos / Drawing to model

NativeBIM by NativeCAD

IFC from a 2D floor plan: walls, doors, windows and rooms read from a DXF

Many existing buildings are documented in drawings, not models. NativeBIM reads a DXF floor plan, finds the walls with their thickness, the doors and windows in them and the rooms they enclose, and builds an IFC4 model from what it found. To show how well that works, each plan here was cut from a published model, so every wall, door and room the software reads can be scored against the one it came from.

What runs today: the plan recognizer in the core library (bim.recognize) and two committed scripts. No MCP tool hands this to an assistant yet; it is in development. Drawings shown are derived from CC BY 4.0 samples and are NOT FOR CONSTRUCTION.

What it reads

Level 2 of the Duplex apartment as a floor plan: thin grey drawing lines, with the walls the software found drawn over them in dark grey at their thickness, doors in green, windows in orange and each room shaded pale green with its name and area.
Duplex, Level 2: the DXF drawing in grey and what NativeBIM read from it in colour. Drawn with docs/launch/site/capture_drawings.js (method). BSI (2020) "Duplex Apartment Test Files," buildingSMART International, CC BY 4.0; cut to a 2D floor plan by NativeBIM, read back and rebuilt.

Two more figures, for the larger plan: Clinic, floor 1 and Clinic, floor 2 (each a few hundred KB).

How well it reads

Each plan was cut from a published IFC model at 1.2 m above the floor by tools/recognize/plan_dxf.js, and written as a DXF on the usual AIA/NCS layers (walls, doors, glazing, columns, room outlines and names), the kind of drawing a design office hands an owner. The recognizer reads it back and tools/recognize/score.js compares what it found with the model.

PlanDrawing linesWall overlap (IoU)Wall area foundDoors and windows foundOf those found, rightRooms from walls alone (IoU)Source
Duplex, Level 12960.9597.6%10 of 10100.0%0.40Measured with docs/launch/site/capture_drawings.js (method)
Duplex, Level 24600.8890.2%18 of 18100.0%0.92Measured with docs/launch/site/capture_drawings.js (method)
Clinic, floor 16,0720.8692.6%147 of 149100.0%0.81Measured with docs/launch/site/capture_drawings.js (method)
Clinic, floor 24,2800.9496.6%132 of 132100.0%0.78Measured with docs/launch/site/capture_drawings.js (method)
Generated warehousen/a1.00100.0%116 of 116100.0%0.99Measured with docs/launch/site/capture_drawings.js (method)

The model it builds

tools/recognize/dxf_to_ifc.js builds an IFC4 model from the drawing alone: one wall type per thickness found, walls on their centre lines, doors and windows hosted in them, a space for each room and a floor slab on the outline. It reads the file back and checks it against the EXPRESS rules of the schema.

PlanWallsWall typesDoorsWindowsSpacesRule violationsElements not builtSource
Duplex, Level 1217641000Built and checked with docs/launch/site/capture_drawings.js (method)
Duplex, Level 21968101000Built and checked with docs/launch/site/capture_drawings.js (method)
Clinic, floor 146818147015400Built and checked with docs/launch/site/capture_drawings.js (method)
Clinic, floor 232015963610900Built and checked with docs/launch/site/capture_drawings.js (method)

A floor plan has no heights. These are assumptions, written into the model's project description: stories 3 m, doors 2.1 m, windows 1.5 m from a 0.9 m sill, slab 0.2 m. Gaps in a wall with no door or window drawn in them stay gaps in the wall. Materials are recorded as unspecified. The Clinic's floor 1 has no windows because its glazing is curtain wall, which the recognizer does not read yet. Any element the builder refuses is listed in the script's report with the reason; none was refused on these plans.

The rebuilt model in 3D

Both Duplex plans, and both Clinic plans, rebuilt as one IFC4 model per building from the drawings alone and drawn by NativeBIM's geometry engine. The "Duplex apartment" tab is the model the plans were cut from, so you can compare the two. Drag to orbit, use "Story by story" to step through the levels, and click an element to read what the drawing gave it. The heights are the assumptions above.

The 3D view loads when it scrolls into view. It is the 3D viewer with these models; the rebuilt models are built by docs/launch/viewer/build-viewer.js with tools/recognize/dxf_to_ifc.js. Models: BSI (2020) "Duplex Apartment Test Files," buildingSMART International, CC BY 4.0 and BSI (2020) "Medical-Dental Test Files," buildingSMART International, CC BY 4.0; cut to DXF floor plans by NativeBIM, rebuilt as IFC4 from the drawings and converted to glTF. NOT FOR CONSTRUCTION.

What it does not do yet

Models

Reproduce it

node tools/corpus/fetch.js --id community-duplex-arch
node tools/corpus/fetch.js --id community-clinic-arch
node docs/launch/site/capture_drawings.js
node tools/recognize/plan_dxf.js corpus/community-duplex-arch/<file>.ifc --storey "Level 2" --out level2.dxf
node tools/recognize/dxf_to_ifc.js level2.dxf --report level2.json

docs/launch/site/capture_drawings.js writes docs/launch/site/data/drawings.json and the figures; --check confirms they are current. Recognition is deterministic: the same drawing gives the same walls, and the same model GlobalIds.

Notices

NativeBIM is licensed software. It does not provide design, engineering or other professional services. Outputs are drafts for review by the licensed professional of record.

Sheets are marked NOT FOR CONSTRUCTION by default.

NativeBIM is not affiliated with, endorsed by or sponsored by the companies and organizations named here. Product names and marks belong to their owners.

IFC and Industry Foundation Classes are marks of buildingSMART International.

NativeBIM is provided as is, without warranty of any kind. To the extent the law allows, FeatureBoard Labs Incorporated is not liable for indirect, incidental or consequential damages, lost profits or lost data, and its total liability is limited to the license fees paid in the 12 months before the claim. Read the license.