Recognize multilayer constructions in IFC models
A proof-of-concept standalone tool to recognize multilayer constructions in IFC models. Implements a lot of knowledge in computational geometry using OpenCascade, bottlenecks of IFC format and Revit export.

Overview
Architects and structural engineers model walls and slabs as independent elements. Even a federated model does not store a summary information of what is the final structure of a wall from one finish layer to another. Though it is not a problem for bill of materials and constructability, engineering calculations, thermal analysis first of all, require all layers to be combined in a single set and walls and slabs to be split into regions of same constructions.
The tool takes an IFC file or files and recognizes adjucent walls and slabs and combines them into multi-layered regions of same construction. The result is a new IFC model with multi-layered walls and slabs.
Additionally, the tool produces a report with a summary of the constructions and their areas.
What I did
I developed an algorithm to process BREPs in OpenCascade: calculate their "touch surface", split them into "touching" and "disjoit" parts and combine "touching" into single BREP.
The tricky part was to keep order of layers in normal direction - this required special handling of normals and faces as well as own attributes on BREPs to store their construction sequence.
Finally, I connected the algorithm to IFC format using IfcOpenShell library. Sounds as a single sentence but it was months of work.
Design decisions
The project had a steep learning curve due to the difference between pure mathematical geometry and reality of OpenCascade and IfcOpenShell limitations.
Choice of IFC format was actually made to make the tool more universal, but it turned out that IFC is still extremely unfriendly to developers.
Alternative solutions for neutral geometry processing based on Speckle was rejected as it stores only mesh representation of geometry and does not support BREP.
Outcome
A tool as a standalone command line application.
It was proven on most common cases of multilayer constructions in IFC models including curved surfaces and inclined walls.
The biggest limitation was IFC format itself and fact that Revit still cannot export 100% correct geometry in IFC for complex cases.
This project gave a start to work on Revit -> OpenCascade direct exporter but it was not finished.