NativeBIM / Demos / Round trip
NativeBIM by NativeCAD
IFC to floor plan to IFC: the round trip, scored element by element
A model rebuilt from drawings is only as good as its distance from the building it describes, and that distance is rarely published. Here two published IFC models are cut to DXF floor plans, read back, rebuilt as IFC4, and the rebuilt model is compared with the source one element at a time: which walls, doors, windows and rooms came back, how far they moved, and what was lost on the way.
How much comes back
Each storey is cut at 1.2 m above its floor to a DXF floor plan, read back and rebuilt by tools/recognize/dxf_to_ifc.js, then scored by tools/fidelity/fidelity.js. Only what a floor plan carries is scored: walls, curtain walls, doors, windows, columns and rooms. Beams, slabs, railings and ceilings are not in the drawing.
| Plan | Elements in the source | Came back | Recall | Precision | F1 | Plan overlap | Source |
|---|---|---|---|---|---|---|---|
| Duplex, Level 1 | 41 | 37 | 90.2% | 100.0% | 94.9% | 94.1% | Scored with docs/launch/site/capture_drawings.js (method) |
| Duplex, Level 2 | 61 | 52 | 85.3% | 86.7% | 86.0% | 95.7% | Scored with docs/launch/site/capture_drawings.js (method) |
| Clinic, floor 1 | 1,002 | 901 | 89.9% | 94.4% | 92.1% | 83.9% | Scored with docs/launch/site/capture_drawings.js (method) |
| Clinic, floor 2 | 652 | 607 | 93.1% | 93.1% | 93.1% | 85.5% | Scored with docs/launch/site/capture_drawings.js (method) |
- Came back counts source elements paired one to one with a rebuilt element of the same kind: walls and rooms when their plan footprints overlap by at least 0.5 (intersection over union), doors and windows when their plan positions are within 0.5 m. Recall is the share of source elements that came back, precision the share of rebuilt elements that match one in the source, F1 their harmonic mean. Scored with
docs/launch/site/capture_drawings.js(method). - Plan overlap compares everything solid in the two plans at once, on a 0.1 m grid: 100% means the two plans cover exactly the same ground. Scored with
docs/launch/site/capture_drawings.js(method).
By kind of element
| Plan | Kind | Came back | Rebuilt | F1 | Area covered (source / rebuilt) | Position error, 95th percentile | Source |
|---|---|---|---|---|---|---|---|
| Duplex, Level 1 | Walls | 17 of 21 | 17 | 89.5% | 92.7% / 100.0% | 0.21 m | Scored with docs/launch/site/capture_drawings.js (method) |
| Doors | 6 of 6 | 6 | 100.0% | by position | 0.04 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Windows | 4 of 4 | 4 | 100.0% | by position | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Rooms | 10 of 10 | 10 | 100.0% | 100.0% / 100.0% | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Duplex, Level 2 | Walls | 16 of 25 | 24 | 65.3% | 97.4% / 98.1% | 0.54 m | Scored with docs/launch/site/capture_drawings.js (method) |
| Doors | 8 of 8 | 8 | 100.0% | by position | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Windows | 18 of 18 | 18 | 100.0% | by position | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Rooms | 10 of 10 | 10 | 100.0% | 100.0% / 100.0% | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Clinic, floor 1 | Walls | 561 of 656 | 612 | 88.5% | 85.6% / 98.2% | 0.13 m | Scored with docs/launch/site/capture_drawings.js (method) |
| IfcCurtainWall | 10 of 14 | 12 | 76.9% | 96.0% / 85.2% | 0.04 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Doors | 154 of 156 | 154 | 99.4% | by position | 0.04 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Windows | 22 of 22 | 22 | 100.0% | by position | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Rooms | 154 of 154 | 154 | 100.0% | 100.0% / 100.0% | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Clinic, floor 2 | Walls | 360 of 404 | 405 | 89.0% | 88.8% / 98.3% | 0.11 m | Scored with docs/launch/site/capture_drawings.js (method) |
| IfcCurtainWall | 6 of 7 | 6 | 92.3% | 87.0% / 98.6% | 0.07 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Doors | 96 of 96 | 96 | 100.0% | by position | 0.01 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Windows | 36 of 36 | 36 | 100.0% | by position | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) | |
| Rooms | 109 of 109 | 109 | 100.0% | 100.0% / 100.0% | 0.00 m | Scored with docs/launch/site/capture_drawings.js (method) |
Area covered is the share of the source's footprint of that kind that the rebuilt elements cover, and the reverse. It separates a merge from a miss: the recognizer draws a straight run of wall as one wall where the source model ends walls at some of its junctions and runs them through others, so walls pair one to one less often than they cover each other. On the Clinic's floor 1, 85.5% of the source walls pair one to one, but the rebuilt walls cover 85.6% of the source wall area. Doors and windows are thin in plan and are paired by position instead. Scored with docs/launch/site/capture_drawings.js (method).
Where it differs
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.The same map for the other plans: Duplex, Level 1, Clinic, floor 1, Clinic, floor 2.
What the round trip loses, and why
- Heights. A floor plan has none, but a set of drawings does: every door and window is tagged, and the door and window schedules give each one's height and sill, so openings come back at their own heights. Storey heights are still assumed (3 m), which is why only plan positions are scored here. Sections and elevations carry the rest; reading them is in development.
- Windows above or below the cut. On Duplex, Level 2 the windows stand three high in tall walls, and a plan cut at 1.2 m passes through the middle row only. The others are drawn as a plan draws overhead and low elements, each with its tag, and the schedule gives each its sill: 18 of 18 windows came back. Scored with
docs/launch/site/capture_drawings.js(method). - Curtain walls. They are drawn from their panels and mullions on their own layer and read back as glazed runs, with the doors set in them: 10 of 14 on Clinic, floor 1 and 6 of 7 on Clinic, floor 2. A run that the cut does not reach (a chain-link fence) is not in the drawing, and its panel grid is not rebuilt. Scored with
docs/launch/site/capture_drawings.js(method). - Where the floor is. Each storey is cut 1.2 m above the floor most of its rooms stand on. The Clinic's floor 1 has a mechanical yard 1 m below the rest; taken from that room, the cut ran under every window of the floor.
- Walls above the cut. Furring built out at ceiling level, a bulkhead or a soffit, is above the cut and not in a floor plan, so it does not come back.
- Walls split differently. Across the 2 Clinic plans, rebuilt walls cover 85.6% and 88.8% of the source wall area and pair one to one at 85.5% and 89.1%: the difference is walls the source model ends at a junction where the drawing shows one run going on. Scored with
docs/launch/site/capture_drawings.js(method).
The source and the rebuild in 3D
The Duplex rebuilt from its two plans beside the model the plans were cut from. Drag to orbit, and switch between the tabs to compare; the rebuilt heights are the assumptions above.
How the score works
tools/fidelity/fidelity.js turns every element of both models into its plan footprint and bounding box, pairs them per kind with an optimal one-to-one assignment, and reports recall, precision, F1, overlap, area covered and position and size error, with every element that found no partner listed by GlobalId. The same scorer will measure the other round trips NativeBIM is building: point clouds to model and meshes to IFC types. It is deterministic: the same two models give the same report. Method and tests: docs/FIDELITY.md.
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
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 --out level2.ifc
node tools/fidelity/score.js corpus/community-duplex-arch/<file>.ifc level2.ifc --match plan \
--source-storey "Level 2" --rebuilt-storey "Level 1" --classes IfcWall,IfcDoor,IfcWindow,IfcColumn,IfcSpace
docs/launch/site/capture_drawings.js writes docs/launch/site/data/drawings.json and the maps; --check confirms they are current.
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.