Examples
Worked examples accompanying the tutorials.
The scripts/ directory of the source repository is split into:
scripts/tutorials/— short, focused examples that exercise the front-end API one feature at a time.scripts/dev_tests/— longer feature-regression scripts kept around for development. These are not pytest tests; the proper pytest suite lives intests/, and the formal evaluation suite for chapter 4 of the underlying thesis lives inthesis/appendix/A/with its ownrun_all.pyrunner.
Each script is intended to be runnable from the repository root with the
compas-ifc conda environment.
Tutorials
Script |
What it shows |
|---|---|
|
Quickstart: open a model and print its hierarchy. |
|
Filter elements by IFC type and by name. |
|
Walk a multi-storey project tree. |
|
Project metadata, units, and contexts. |
|
Site coordinates, north direction, building list. |
|
Inspect a single window’s properties and host opening. |
|
Render a model in |
|
Render only a sub-tree of elements. |
|
Modify properties and write the result back. |
|
Build a model from scratch using the template factory. |
|
Draft Rhino-to-IFC export pipeline (run inside Rhino). |
|
Add Python-side helpers to IFC entities via |
|
Volume and surface-area queries on a single element. |
Feature-regression scripts
Script |
What it shows |
|---|---|
|
Generates 26 STEP fixtures for the B-Rep test corpus. |
|
|
|
Mix schema attributes and pset properties through
|
|
Programmatic creation of walls, slabs, beams. |
|
Placement-chain rectification on import. |
|
Granular subset extraction across multiple scenarios. |
|
Inspect the interaction graph. |
|
|
|
Collision detection and interactive viewer. |
|
The reproducible evaluation suite for chapter 4 of the thesis is in
thesis/appendix/A/ and includes run_all.py, which executes every
section and writes a consolidated report to
thesis/appendix/A/outputs/A-summary.txt.