NativeBIM by NativeCAD

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.

What runs today: the plan cut, the recognizer, the IFC builder and the fidelity scorer, all committed scripts in the NativeBIM repository. Drawings shown are derived from CC BY 4.0 samples and are NOT FOR CONSTRUCTION.

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.

PlanElements in the sourceCame backRecallPrecisionF1Plan overlapSource
Duplex, Level 1413790.2%100.0%94.9%94.1%Scored with docs/launch/site/capture_drawings.js (method)
Duplex, Level 2615285.3%86.7%86.0%95.7%Scored with docs/launch/site/capture_drawings.js (method)
Clinic, floor 11,00290189.9%94.4%92.1%83.9%Scored with docs/launch/site/capture_drawings.js (method)
Clinic, floor 265260793.1%93.1%93.1%85.5%Scored with docs/launch/site/capture_drawings.js (method)

By kind of element

PlanKindCame backRebuiltF1Area covered (source / rebuilt)Position error, 95th percentileSource
Duplex, Level 1Walls17 of 211789.5%92.7% / 100.0%0.21 mScored with docs/launch/site/capture_drawings.js (method)
Doors6 of 66100.0%by position0.04 mScored with docs/launch/site/capture_drawings.js (method)
Windows4 of 44100.0%by position0.00 mScored with docs/launch/site/capture_drawings.js (method)
Rooms10 of 1010100.0%100.0% / 100.0%0.00 mScored with docs/launch/site/capture_drawings.js (method)
Duplex, Level 2Walls16 of 252465.3%97.4% / 98.1%0.54 mScored with docs/launch/site/capture_drawings.js (method)
Doors8 of 88100.0%by position0.00 mScored with docs/launch/site/capture_drawings.js (method)
Windows18 of 1818100.0%by position0.00 mScored with docs/launch/site/capture_drawings.js (method)
Rooms10 of 1010100.0%100.0% / 100.0%0.00 mScored with docs/launch/site/capture_drawings.js (method)
Clinic, floor 1Walls561 of 65661288.5%85.6% / 98.2%0.13 mScored with docs/launch/site/capture_drawings.js (method)
IfcCurtainWall10 of 141276.9%96.0% / 85.2%0.04 mScored with docs/launch/site/capture_drawings.js (method)
Doors154 of 15615499.4%by position0.04 mScored with docs/launch/site/capture_drawings.js (method)
Windows22 of 2222100.0%by position0.00 mScored with docs/launch/site/capture_drawings.js (method)
Rooms154 of 154154100.0%100.0% / 100.0%0.00 mScored with docs/launch/site/capture_drawings.js (method)
Clinic, floor 2Walls360 of 40440589.0%88.8% / 98.3%0.11 mScored with docs/launch/site/capture_drawings.js (method)
IfcCurtainWall6 of 7692.3%87.0% / 98.6%0.07 mScored with docs/launch/site/capture_drawings.js (method)
Doors96 of 9696100.0%by position0.01 mScored with docs/launch/site/capture_drawings.js (method)
Windows36 of 3636100.0%by position0.00 mScored with docs/launch/site/capture_drawings.js (method)
Rooms109 of 109109100.0%100.0% / 100.0%0.00 mScored 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

Level 2 of the Duplex apartment in plan: walls and openings of the source model that came back in grey, the source windows with no match in red, and rebuilt walls with no one-to-one match outlined in blue, over the rooms in pale green.
Duplex, Level 2: grey came back, red is missing from the rebuilt model, blue is in the rebuilt model with no one-to-one match in the source. 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.

The same map for the other plans: Duplex, Level 1, Clinic, floor 1, Clinic, floor 2.

What the round trip loses, and why

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

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.