Specialization kata · BIM-001

Inspect an IFC model: schema, units, spatial tree and relationships

Open a real IFC file with IfcOpenShell and write down what it declares: schema, units, the spatial tree, each element with its GlobalId, and how the opening and window are related to the wall.

Draft. This recipe is a draft. Its checks may not have been run, and it can change.

Status
Draft
Kata ID
BIM-001
Maintainer
BIM pathway maintainer
Last verified
Not available. Built and checked by the Dojo maintainers and CI; no independent or professional review yet.
Found a problem?
Report it

The outcome

An inspection record of the sample IFC file, with every claim traced to an entity in the file.

For: Learners who have done the foundations and want to read a BIM model as data rather than as a picture.

Done when

  • You name the schema (IFC4) and the length unit (millimetre), and say where in the file each is declared
  • You draw the spatial tree from project to storey and list what the storey contains
  • You show that the opening voids the wall and the window fills the opening, with the relationship entities
  • Your counts match /examples/bim-pathway/generated/original/inspection.json

You make: Model evidence. Outcome: Read model.

Showcase and provenance

The Dojo’s worked example, made by the maintainers rather than by a learner: buildingSMART’s wall-with-opening-and-window sample, a practice IDS, an edited copy and every check result, computed by the site’s CI.

See the showcase

Made by
buildingSMART International (sample model); Developer Dojo maintainers (IDS, edit and checks)
Source
buildingSMART Certification-datasets, pinned commit 80d976a9b193a26a8e928c3e79bff67af1de68a8; checks from /examples/bim-pathway/tools/bim_pathway.py
Licence
Sample model CC BY 4.0 (buildingSMART International); IDS files, script and outputs MIT
Date

Brief, inputs and constraints

Inputs

  • wall-with-opening-and-window.ifc. Source: buildingsmart/ifc-wall-example (copy on /examples/bim-pathway/). Terms: CC BY 4.0, buildingSMART International; credit the source when you share a copy.

Constraints

  • Licensed sample only
  • No paid tools
  • Offline capable

Capabilities practised

  • Inspect model
  • Verify evidence

Stack, permissions and cost

Stack components with version, permissions and cost
PartComponentVersionPermissionsCost
ToolIfcOpenShell0.9.0.post1Reads the IFC copy you open; writes only the file your script savesFree (LGPL-3.0-or-later)
ToolIfcTester0.9.0Reads the IDS file and the IFC copy; writes only the report you ask forFree (LGPL-3.0-or-later)
RuntimePython in a virtual environment3.12Runs on your own machine; network only to install the pinned packagesFree
DatabuildingSMART wall-with-opening-and-window sample (IFC4)Certification-datasets commit 80d976a, SHA-256 73b0e45d…097832Read a copy; the licence allows changes with creditFree (CC BY 4.0)
HarnessAny chat assistant or coding agentNot available. Not fixed; an assistant may draft a script or explain an entity, and every claim it makes is checked against the fileReads what you paste in; if it runs commands, give it only the copy of the modelNot available. Depends on your assistant and plan; not measured

Stack recipes

  • Ifcopenshell and python

Why this stack

IfcOpenShell and IfcTester are open source, run offline once installed and implement the buildingSMART IFC and IDS standards, so every learner can rerun the same checks on the same file and get the same output. CI runs the identical script on every pipeline.

Alternatives

  • A desktop BIM authoring tool (for example Bonsai for Blender, or a commercial tool). Shows the model visually and edits it by hand, but results depend on the tool and its export settings. Not tried for this pathway. Not tested for this recipe.
  • A web IFC viewer. Lets you look at the geometry in a browser without installing anything, but a viewer is not a validator. No viewer was checked for this pathway. Not tested for this recipe.

Agents and review gates

  1. Explaining assistant

    Explains an IFC entity or relationship you paste in, and drafts the Python to list it.

    Review gate: You run the code on the file and keep only what the output shows.

  2. Learner as reviewer

    Compares the record with the file and with the Dojo's CI output.

    Depends on: Explaining assistant

    Review gate: A claim stays only if it cites an entity number or GlobalId.

Setup and smoke test

  1. Create a virtual environment with Python 3.12: python3.12 -m venv .venv
  2. Install the pinned packages: .venv/bin/pip install --require-hashes -r /examples/bim-pathway/tools/requirements.txt, or pip install ifcopenshell==0.9.0.post1 ifctester==0.9.0
  3. Download the sample model and the practice IDS from /katas/bim-pathway into a new, empty folder. Work on copies; keep the original.

Sign-in and access: None. Nothing here needs an account.

Smoke test

Do
Run: .venv/bin/python -I -c "import ifcopenshell; print(ifcopenshell.open('wall-with-opening-and-window.ifc').schema)"
Expect
IFC4
Result
Passed /examples/bim-pathway/generated/original/inspection.json (schema)

Prompts

Copy a prompt into the assistant you use. Replace anything that does not fit your situation, and never paste private or personal data you are not allowed to share.

Explain a relationship entity

Learn what an IfcRel entity connects, without trusting the explanation blindly.

You can also select and copy the text.

Practice exercise

IFC wall with opening and window sample. From IFC wall with opening and window sample (buildingSMART International).

Terms: CC BY 4.0, buildingSMART International.

Execution and handoffs

  1. Learner: Open the file in a text editor and find FILE_SCHEMA, the unit assignment and the project.
  2. Explaining assistant: Drafts a script that prints the spatial tree and each element's container. Hand-off: You run it and compare the output with the file.
  3. Learner: Write the inspection record and compare it with the CI output.

Tests, failures and corrections

Checks with expected and recorded results
CheckExpectedResultEvidence
Inspect the sample with the pathway scriptIFC4, length unit millimetre, Project > Site > Building > Storey; the storey contains the wall (#45) and the window (#102); the opening (#80) voids the wall and the window fills itPassed on /examples/bim-pathway/generated/original/inspection.json, recomputed by CI on every pipeline
Your own inspection record matches the CI outputSame schema, units, tree, counts and relationshipsNot runNot run, so there is no evidence. This is not a pass.

Failures and corrections

  • Observed: The opening has no container of its own in the storey's contained elements Correction: That is correct. An opening belongs to the wall it voids (IfcRelVoidsElement); the script reports its container through the wall.

Adapt it

  • Use another openly licensed IFC file Record its licence first; bigger files have many more entities, so list counts by class before you read single elements.

Unseen Randori

See the BIM Randori recipe, BIM-R01.

Constraints

  • Every claim cites the file

How it is judged: The record matches the CI output for the same file.

More Randori challenges

Belt evidence

Belt stages are proposed practice stages, not issued credentials. Evidence below is what a reviewer would look for; it is not a record that anyone has shown it.

Evidence a reviewer looks for

  • An inspection record (schema, units, spatial tree, elements and relationships) that matches the Dojo's CI output for the same file (Automated check, against Industry Foundation Classes (IFC))
  • Each claim in the record points to an entity number or GlobalId in the file (Self-check)

Belt criteria

  • Practice: Reproduces the inspection record for the sample and explains why the opening is not in the storey's contained elements
  • Adapt: Inspects a different openly licensed IFC file and records its units and spatial tree
  • Demonstrate: Explains to a reviewer which claims about a model an inspection can support and which it cannot

See the belt stages

Connections

Used by
No other kata names this one as a foundation yet.
Professional review
Required. Any real use of this outcome needs independent validation and any approval required from a qualified professional. Practice here does not grant a licence.

Standards in scope

  • Industry Foundation Classes (IFC), IFC4 ADD2 TC1 (ISO 16739-1:2018), as declared by the sample file. Applies to: The buildingSMART practice sample and copies of it only. Review scope: What the listed checks test: the schema the file declares, its entities and relationships. No claim about any real building.

Sources

Maintenance and caveats

Review cadence: Every six months, when IfcOpenShell or IfcTester releases a new minor version, or when buildingSMART revises IFC or IDS

  • This recipe is a draft: the example was built and checked by the Dojo maintainers and CI, and no learner has run it yet.
  • The sample is a three-element test file, not a building. Nothing learned from it is evidence about a real project.
  • No model, property value or check result here is professionally reviewed or approved. A real project needs the qualified people its contract and jurisdiction name.
  • Information (IDS), schema and geometry checks are separate outcomes. Passing one says nothing about the others, and there is no combined score.
  • The earlier kata Find the story in a building model (/katas/inspect-ifc) reads the same sample by hand; this recipe reads it with code.

All kata recipes · Back to katas