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 it reads
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.
| Plan | Drawing lines | Wall overlap (IoU) | Wall area found | Doors and windows found | Of those found, right | Rooms from walls alone (IoU) | Source |
|---|---|---|---|---|---|---|---|
| Duplex, Level 1 | 296 | 0.96 | 98.8% | 10 of 10 | 100.0% | 0.40 | Measured with docs/launch/site/capture_drawings.js (method) |
| Duplex, Level 2 | 604 | 0.90 | 90.1% | 26 of 26 | 100.0% | 0.93 | Measured with docs/launch/site/capture_drawings.js (method) |
| Clinic, floor 1 | 6,476 | 0.94 | 95.7% | 173 of 175 | 98.3% | 0.76 | Measured with docs/launch/site/capture_drawings.js (method) |
| Clinic, floor 2 | 4,484 | 0.97 | 97.8% | 132 of 132 | 100.0% | 0.73 | Measured with docs/launch/site/capture_drawings.js (method) |
| Generated warehouse | n/a | 1.00 | 100.0% | 120 of 120 | 100.0% | 1.00 | Measured with docs/launch/site/capture_drawings.js (method) |
- Wall overlap is the intersection over union of the wall area the software found and the wall area in the model, on a fine grid: 1.00 means the two are the same. Wall area found is the share of the model's wall area the recognized walls cover. Measured with
docs/launch/site/capture_drawings.js(method). - Doors and windows found counts the model's doors and windows that have one recognized within 0.5 m, of the same kind; of those found, right is the share of recognized ones that match one in the model. On floor 1 of the Clinic the 2 it missed are double chain-link gates in a fence that the plan cut does not draw, so they have no wall or curtain wall to sit in. Measured with
docs/launch/site/capture_drawings.js(method). - Rooms from walls alone is the mean overlap of each room in the model with the room traced from the walls, with the room-outline layer removed from the drawing. With that layer present the mean overlap is 1.00, 1.00, 1.00, 1.00 on the four plans, in the order of the table. Level 1 of the Duplex scores 0.40 because its living, dining and kitchen are one open space with no walls between them: the model divides it into rooms that a plan without room outlines does not show. Measured with
docs/launch/site/capture_drawings.js(method). - The Clinic model has 3 doors on floor 1 modelled twice in the same place; each pair is counted once. Measured 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.
| Plan | Walls | Wall types | Doors | Windows | Spaces | Rule violations | Elements not built | Source |
|---|---|---|---|---|---|---|---|---|
| Duplex, Level 1 | 17 | 5 | 6 | 4 | 10 | 0 | 0 | Built and checked with docs/launch/site/capture_drawings.js (method) |
| Duplex, Level 2 | 24 | 6 | 8 | 18 | 10 | 0 | 0 | Built and checked with docs/launch/site/capture_drawings.js (method) |
| Clinic, floor 1 | 612 | 18 | 154 | 22 | 154 | 0 | 0 | Built and checked with docs/launch/site/capture_drawings.js (method) |
| Clinic, floor 2 | 405 | 15 | 96 | 36 | 109 | 0 | 0 | Built 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
- A curved wall is read when both its faces are drawn as arcs; one drawn as a chain of short straight lines is not. A curtain wall is read from a curtain-wall layer (
A-GLAZ-CWMG); one drawn as single lines on the wall layer is not a wall pair and is not read as one. - Layer names are read by the AIA/NCS convention and common variants (
A-WALL,WALLS,A-GLAZ,WINDOWS). A drawing with every line on one layer is not read. - Scanned drawings and PDFs are not read: the input is a DXF with real lines. Plans exported from another program have not been scored here, because there is no published set of such drawings with a model to compare against.
- One story per drawing. Stairs, furniture and dimensions are ignored.
Models
- BSI (2020) "Duplex Apartment Test Files," buildingSMART International, CC BY 4.0. Changes made: cut to a 2D floor plan by NativeBIM, read back and rebuilt. Source repository
- BSI (2020) "Medical-Dental Test Files," buildingSMART International, CC BY 4.0. Changes made: cut to a 2D floor plan by NativeBIM, read back, re-planned as office space. Source repository
- The warehouse is generated by NativeBIM (
tests/authoring/builder/warehouse_sample.js).
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.