IfcOpenShell C++¶

The IfcOpenShell C++ core is the library that the rest of the ecosystem is built on: IfcOpenShell-Python, IfcConvert, IfcClash and the other utilities all use it. It is split into two libraries:

  • IfcParse reads and writes IFC-SPF files, and turns them into a typed object graph of generated C++ classes, one namespace per IFC schema.

  • IfcGeom turns the IFC representation items of that object graph into geometry, using a geometry kernel such as OpenCASCADE or CGAL.

Both are consumed from your own project with find_package(IfcOpenShell CONFIG), which exports them as the IfcOpenShell::IfcParse, IfcOpenShell::IfcGeom and IfcOpenShell::parse_schema_* targets. See Installation for how to build and install the library itself.

The pages below are a hands on introduction to using those libraries. Every snippet on them is a standalone program which is built with CMake and run as part of the documentation’s test suite, see Building and running the examples for how to build and run them yourself.

See also

The Python equivalents of these pages are in IfcOpenShell-Python. The machinery that both APIs share is described in Geometry iterator, Geometry settings, Serialiser settings and Formats.