CH NEO-ZÜRICH EDITION
WEATHER · CLEAR 11°C
BLEND OF THE DAY · 07/ROGUE
EST. 2027
THE AEC CYBER MORNING NEWS

PAZ Kaffi

DESIGN · DEMOLITION · CAFFEINE · DISPATCH
EDITION 0912 · 12 September 2026
BROADCAST 04:42 CET
2,400 BROADSHEETS PRINTED
READ TIME · 47 MIN
Day one of the Python sprint: the humble `if`, taught on your own IFC model
ACADEMY
FRAME · 06:50
12-09-2026

Day one of the Python sprint: the humble `if`, taught on your own IFC model

Day one of the PAZ 7-day Python sprint: turn W3Schools' if statement into a real IfcOpenShell fire-rating gate on your own IFC4 model in six lines.

The most advanced thing our field does with a computer — a generative solver proposing the structural grid for a steel residential block, then handing the engineer the candidates to validate — is, when you crack it open, a very tall tower built from one small brick. The ScienceDirect reviews on generative design like to draw a ladder of autonomy: L0 is fully manual, the engineer in full control, and every rung above learns to optimise for cost, performance and code compliance at once. But holding that whole ladder up, at the very bottom, is the humblest decision a machine can make: if this, then that; else, the other.

W3Schools, the site half of us quietly learned to code on, teaches exactly that on its If Statements in Programming page. The first example is a dice game: roll a six, launch the confetti; roll anything else, print “Try again.” It lines the same block up in four languages — Python, JavaScript, Java and C++ — so you can see the shape survives the language. Its second example ladders age < 13 → child, elif age < 20 → teenager, else → adult, then nests one more if age > 17 to catch the special case of 18 and 19, when you are both teenager and adult. It is a genuinely good lesson. The umbrella-if is cute — until the condition is a fire rating.

←TODAY: In 2026, a single if in a 20-line script catches the wall with no fire rating that a tired manual review misses at 18:00.
→3012: By the Zurich-3012 horizon the model checks itself before a human ever opens it — the gate is the review.
Fulcrum: The confetti line and the fire-rating gate are the same line of code. Learn it once, own both.

Here is the part nobody tells the beginner: the if is where your judgement enters the machine. The concept panels in the PAZ corpus put it well — in generative work the human role migrates from author to curator; you set the objectives, you draw the constraint fence, and the enumeration is the computer’s. The if statement is the smallest board in that fence. This is why we open the 7-day Python-for-architects sprint here, on day one, instead of with clever list comprehensions.

The Tool: IfcOpenShell — the open library behind the Native IFC / OSArch movement, maintained by Thomas Krijnen and a wide open-source community. It reads and writes real IFC files in plain Python, which means the very first if you write can be pointed at an actual building instead of a dice roll. IFC — Industry Foundation Classes — is arguably the most important language our industry has produced in a century: open, uncompiled, readable in Notepad, built to outlive whichever vendor owns your CAD this decade. Learning to interrogate it with a conditional is an afternoon that pays rent for years.

Setup:

python -m venv .venv
.venv\Scripts\activate      # Windows  (macOS/Linux: source .venv/bin/activate)
pip install ifcopenshell
python -c "import ifcopenshell; print(ifcopenshell.version)"
# prints a version string, e.g. 0.8.x — you are ready

First steps:

  1. Export any small project from Archicad (IFC4) or drop in a sample, and save it as sample.ifc next to your script.
  2. Open it and count what you have: model = ifcopenshell.open("sample.ifc"), then print(len(model.by_type("IfcWall")), "walls"). You will see your own building answer back.
  3. Now add a decision — the moment the script stops describing and starts judging. That is the Hack below.

Atelier: For a Swiss studio living with AI on the canvas, the value of the if is not the syntax — it is the point where a policy becomes an automated check instead of a hopeful PDF in the BEP. That pattern already has an industrial name: an IDS-style gate, the same requirement-as-check logic buildingSMART ships in its Validation Service. An office adopting model-checking this quarter tends to drown trying to validate everything at once. Your Monday move: pick the one requirement that has actually bitten you — a missing Pset_WallCommon.FireRating, a missing LOIN attribute, a missing storey — and write the six-line if that flags it, wired to fail the export. One gate, running before the model reaches the engineer, beats a hundred rules that never ship.

Hack: Flag every wall that ships without a fire rating before it reaches the engineer’s desk. The if is doing the whole job here — not fr is your condition, printing the FAIL is your “then”, and silence is your implicit “else”.

import ifcopenshell, ifcopenshell.util.element as el
model = ifcopenshell.open("sample.ifc")
for w in model.by_type("IfcWall"):
    fr = el.get_psets(w).get("Pset_WallCommon", {}).get("FireRating")
    if not fr:
        print("FAIL", w.GlobalId, "→ no FireRating")

Run it. Every GlobalId it prints is a wall that would have slipped through. Change if not fr to if fr and float(str(fr).rstrip('R')) < 30 and you are checking a threshold, not just presence — same primitive, sharper fence.

The honest trade-off: an if is only as good as the condition you knew to write. It catches the failure you anticipated and nothing else, so a green run means “passed my one test,” never “the model is clean.” That is a property of every gate, from the dice game to the L4 solver — worth saying out loud before you trust the confetti.

If you are choosing a stack this quarter, the deeper reason to learn this on IFC and not on a toy is longevity. The buildings that aged worst were never the ugly ones — they were the ones nobody could reopen after a proprietary format went dark. An open format you can walk with six lines of Python is a hedge against that. Write your first if against a file a 25-year-old will still be able to open, and roll it into the PAZ Programming Bootcamp when you want the other six days.

Learn-it:

FILED FROM
CO-SIGNERS
PAZ Academy
CONFIDENCE
HIGH
REPRINTS
© PAZ - PARAMETRIC ACADEMY ZURICH · ALL RIGHTS RESERVED

SOURCE ·

PAZ Kaffi · multidisciplinary editorial, led by PAZ Academy

⚑ REPORT AN ERROR · SUBMIT A CORRECTION
◂ BACK TO FRONT PAGE · PAZ KAFFI

© 2026 PAZ Academy.