# Is there any command line tool to diff two ifc models?

**URL:** <https://forums.buildingsmart.org/t/is-there-any-command-line-tool-to-diff-two-ifc-models/1252>\
**Category:** Tooling\
**Created:** [March 29, 2019, 11:54am UTC](https://forums.buildingsmart.org/t/is-there-any-command-line-tool-to-diff-two-ifc-models/1252 "2019-03-29T11:54:04Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![Herb](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/herb/32/757_2.png) [@Herb](https://forums.buildingsmart.org/u/Herb)\
**Post date:** [January 13, 2020, 6:15am UTC](https://forums.buildingsmart.org/t/is-there-any-command-line-tool-to-diff-two-ifc-models/1252/19 "2020-01-13T06:15:36Z")

</div>

If you compare IFC file versions (revisions or variants) generated by the same authoring software there are only minor challenges to solve.  
Examples for authoring software deficits:

a) each subsequent IFC export is “new” again, no difference information supported ( attribute “ChangeAction” in “IfcOwnerHistory”, see thread [IfcOwnerHistory](https://forums.buildingsmart.org/t/ifcownerhistory/2246))

b) changed GUIDs for unchanged items

c) minimal changes in real values (e.g. in the magnitude of 1E-17 caused by rounding errors)

d) same object type e.g. WindowType is stored separately for each window even if the imported IFC4 DTV IFC file had one common WindowType for all equal windows

… to be continued by the community  
@jwouellette:  
Where can a systematic collection of such current drawbacks (future improvements) be found?

If two or more different (authoring) software applications are in use then there is the big challenge of “different representation paradigms”:

> **[IFC](https://3d.bk.tudelft.nl/projects/geobim-benchmark/ifc.html)**
>
> 3D geoinformation research group at TU Delft

As @jwouellette mentioned: _" two tools can create different IFC files for the same model data."_  
And they really do! (e.g. wall represented by extruded area versus brep)  
Even worse: currently NO roundtrip-preservation on IMPORT - NO CHANGE - EXPORT (NO “conservative IFC processing”):  
Your IFC4 DTV file is completely dissassembled by the authoring software during import. If you export without planning changes you get back the same model in a different representation paradigm. Comparing the differences based on text and formal information structure only,without taking into account the geometric semantics is impossible.  
See:

> [@IFC tool performance: normalization and round-trip preservation as enabler for BIM-Level 3-CDEs](https://forums.buildingsmart.org/t/ifc-tool-performance-normalization-and-round-trip-preservation-as-enabler-for-bim-level-3-cdes/2052):
>
> Originally coming from automotive electronics industries, I am trained in creating efficient embedded solutions (small electronic circuitry, small code, small data, …). It is painful to see resource-hungry solutions beeing a matter of course in software-industry. The time has come to release the parking brake instead of installing more and more powerful engines. After this general statement I step directly into technical details: WHY do you destroy my IFC? Testcase: IFC model with 1 project \>…

Solution: BIM Level 3:

- shift building model to a CDE
- (authoring) software applications operate on the model (using an open IFC API) by using standardized basic model manipulation operations (similar to DML of DBMS)

 ![Bild4](https://us1.discourse-cdn.com/flex016/uploads/buildingsmart1/original/1X/d0887e2dc3d7137263b02b12f07c923697f8bbd9.png)

Comments welcome!

---

_[View the full topic](https://forums.buildingsmart.org/t/is-there-any-command-line-tool-to-diff-two-ifc-models/1252)._
