--- name: ifc-model-diff description: Compare two versions of an IFC model (by GlobalId) and produce a change log - elements added, removed, renamed, moved, retyped, re-levelled, re-materialised and every property value that changed. Use when a new model revision arrives and the user asks "what changed", "compare versions", "qué cambió entre la revisión A y B", needs a revision log for a drawing/model issue, or must check that only agreed changes were made. --- # IFC revision diff ## Inputs - Old and new .ifc of the same model (same authoring source). Read-only. - Optional: the list of changes the designer said they made (transmittal, RFI response, change order) to check against. ## Procedure 1. `pip install ifcopenshell` (tested with 0.9.0). Report schema and version. 2. Run `python scripts/ifc_diff.py old.ifc new.ifc --out changes.md --csv changes.csv` (`--tol` sets the placement tolerance in metres; default 0.001). 3. Read `changes.md` and explain: - Counts: added, removed, modified elements. - The modified fields grouped (placement, type, property set…). - Removed + added pairs of the same class at the same position: probably "deleted and re-drawn" in the authoring tool (new GlobalId), not a real design change. Say so; it breaks issue tracking and 4D/5D links that rely on GlobalId. 4. If the user gave the expected changes, produce a reconciliation table: expected change → found (yes/no, element ids) and **unexpected changes** found in the model. Unexpected changes are the most valuable output. 5. Suggest where the change log goes: revision table, transmittal, change-order backup, or the BCF/issue tool. ## Output - Summary line (added / removed / modified). - Top 10 changes that matter for cost, schedule or coordination (structure, openings, MEP routes, types with cost impact) with GlobalId and name. - Reconciliation table if expected changes were given. - `changes.csv` for the full record. ## Never - Never judge whether a change is acceptable; flag it for the responsible designer. - Geometry changes inside an element's shape (a wall made thicker without a type change) are not detected by default; say so and offer a quantity comparison with `ifc-quantity-takeoff` on both versions.