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.9698.8%10 of 10100.0%0.40Measured with docs/launch/site/capture_drawings.js (method)
Duplex, Level 26040.9090.1%26 of 26100.0%0.93Measured with docs/launch/site/capture_drawings.js (method)
Clinic, floor 16,4760.9495.7%173 of 17598.3%0.76Measured with docs/launch/site/capture_drawings.js (method)
Clinic, floor 24,4840.9797.8%132 of 132100.0%0.73Measured with docs/launch/site/capture_drawings.js (method)
Generated warehousen/a1.00100.0%120 of 120100.0%1.00Measured 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 1175641000Built and checked with docs/launch/site/capture_drawings.js (method)
Duplex, Level 22468181000Built and checked with docs/launch/site/capture_drawings.js (method)
Clinic, floor 1612181542215400Built and checked with docs/launch/site/capture_drawings.js (method)
Clinic, floor 240515963610900Built and checked with docs/launch/site/capture_drawings.js (method)

Heights come from the drawing where it gives them: every door and window is tagged, and the door and window schedules give each one's height and sill (10, 26, 176, 132 tagged openings on the four plans). What a floor plan does not carry is assumed and written into the model's project description: stories 3 m (a wall runs higher where a scheduled opening reaches above that), slab 0.2 m, and for an opening with no tag, doors 2.1 m and windows 1.5 m from a 0.9 m sill. Gaps in a wall with no door or window drawn in them stay gaps in the wall. Curtain walls are read from their own layer as glazed runs, with the doors and windows set in them. Materials are recorded as unspecified. 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.