Need help with IfcOpenShell?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

702 Stars 394 Forks GNU Lesser General Public License v3.0 3.7K Commits 351 Opened issues


Open source IFC library and geometry engine

Services available


Need anything else?

Contributors list


IfcOpenShell is an open source (LGPL) software library for working with the Industry Foundation Classes (IFC) file format. Currently supported IFC releases are IFC2x3 TC1 and IFC4 Add2 TC1.

For more information, see *

Build Status



  • Boost
  • Open Cascade - optional, but required for building IfcGeom (official, "OCCT", or community edition, "OCE")
    For converting IFC representation items into BRep solids and tesselated meshes
  • OpenCOLLADA - optional
    For IfcConvert to be able to write tessellated Collada (.dae) files
  • SWIG and Python - optional
    For building the IfcOpenShell Python interface and the Blender add-on
  • 3ds Max SDK - optional
    For building the 3ds Max plug-in. All recent versions of 3ds Max (2014 and newer) are 64-bit only, so a 64-bit installation is assumed.

Building IfcOpenShell

Note: The path where the source code is cloned to can contain spaces but non-ASCII characters are very likely to cause problems with the build.

Compiling on Windows

The preferred way to fetch and build this project's dependencies is to use the build scripts in win/ folder. See win/ for more information.

Using Visual Studio

Instructions in a nutshell (assuming Visual Studio 2015 x64 environment variables set):

> cd IfcOpenShell\win
> build-deps.cmd
> run-cmake.bat


need to be ran from the directory containing it, i.e. the

You can now open and build the solution file in Visual Studio:

> ..\build-vs2015-x64\IfcOpenShell.sln

As the scripts default to using the

configuration, and a freshly created solution by CMake defaults to
, make sure to switch the used build configuration. Build the
project (right-click -> Project Only) to deploy the headers and binaries into a single location if wanted/needed.

Alternatively, one can use the utility batch file(s) to build and install the project easily from the command-line (installing a project will build it also, if required):

> install-ifcopenshell.bat

Using MSYS2 + MinGW

Start the MSYS2 Shell and then:

$ cd IfcOpenShell/win
$ ./
$ ./
$ ./

Using Bash on Ubuntu on Windows

Start Bash on Ubuntu on Windows and follow the instructions below. Compiling on Ubuntu 14.04.4 LTS using GCC 4.8.4 or Clang 3.5 has been confirmed to work.

Compiling on *nix

The following instructions are for Ubuntu, modify as required for other operating systems. nix/ script can be experimented with and studied for pointers for other operating systems, but note that this script is not currently meant to be used for a typical IfcOpenShell workspace setup.

Note: where

make -j
is written, add a number roughly equal to the amount of CPU cores + 1.

1) Install most of the prerequisites and dependencies:

$ sudo apt-get install git cmake gcc g++ libboost-all-dev

2a) Either use an OCE package from your operating system's software repository

$ sudo apt-get install liboce-foundation-dev liboce-modeling-dev liboce-ocaf-dev liboce-visualization-dev liboce-ocaf-lite-dev

2b) or (if not available, or the latest code is wanted) compile OCE yourself (note that the build takes a long time):

$ sudo apt-get install libftgl-dev libtbb2 libtbb-dev libgl1-mesa-dev libfreetype6-dev
$ git clone
$ cd oce
$ mkdir build && cd build
$ cmake ..
$ make -j
$ sudo make install

2c) or obtain and compile OCCT from

3) For building IfcConvert with COLLADA (.dae) support (on by default), OpenCOLLADA is needed:

$ sudo apt-get install libpcre3-dev libxml2-dev
$ git clone
$ cd OpenCOLLADA
Using a known good revision, but HEAD should work too:
$ git checkout 064a60b65c2c31b94f013820856bc84fb1937cc6
$ mkdir build && cd build
$ cmake ..
$ make -j
$ sudo make install

4) For building the IfcPython wrapper (on by default), SWIG and Python development are needed, if not already available:

$ sudo apt-get install python-all-dev swig

5) To build IfcOpenShell please take the following steps. Alternatively use environment variables for setting the dependencies' paths.

might be needed to set also.
(and potentially
) are needed if building with COLLADA support. (
disables it).
$ cd /path/to/IfcOpenShell
$ mkdir build && cd build
$ cmake ../cmake -DOCC_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu/ \
      -DOPENCOLLADA_INCLUDE_DIR="/usr/local/include/opencollada" \
      -DOPENCOLLADA_LIBRARY_DIR="/usr/local/lib/opencollada"  \
$ make -j

If all worked out correctly you can now use IfcOpenShell. See the examples below.

6) Install the project if wanted:

$ sudo make install

Installing IfcOpenShell with Conda

Another option for building and installing IfcOpenShell is to use the popular Anaconda Python Distribution. The requirements are spread across a number of channels. You can add these channels to your configuration, or specify them all on the command line:

$ conda install -c conda-forge -c oce -c dlr-sc -c ifcopenshell ifcopenshell

Usage examples

Invoking IfcConvert from the command line

$ wget
$ unzip
$ ./IfcConvert Munkerud_hus6_BE.ifc
$ less Munkerud_hus6_BE.obj

Using the IfcOpenShell Python interface

$ wget -O
$ unzip
$ python
>>> import ifcopenshell
>>> f ="Duplex_A_20110907_optimized.ifc")
>>> # Accessing entity instances by type:
>>> f.by_type("ifcwall")[:2]
[#91=IfcWallStandardCase('2O2Fr$t4X7Zf8NOew3FL9r',#1,'Basic Wall:Interior - Partition (92mm Stud):144586',$,'Basic Wall:Interior - Partition (92mm Stud):128360',#5198,#18806,'144586'), #92=IfcWallStandardCase('2O2Fr$t4X7Zf8NOew3FLIE',#1,'Basic Wall:Interior - Partition (92mm Stud):143921',$,'Basic Wall:Interior - Partition (92mm Stud):128360',#5206,#18805,'143921')]
>>> wall = _[0]
>>> len(wall) # number of EXPRESS attributes
>>> # Accessing EXPRESS attributes by name:
>>> wall.GlobalId 
>>> wall.Name = "My wall"
>>> wall.NonExistingAttr
Traceback (most recent call last):
  File "", line 1, in 
  File ".\", line 14, in __getattr__
    except: raise AttributeError("entity instance of type '%s' has no attribute'%s'"%(self.wrapped_data.is_a(), name)) from None
AttributeError: entity instance of type 'IfcWallStandardCase' has no attribute 'NonExistingAttr'
>>> wall.GlobalId = 3
Traceback (most recent call last):
  File "", line 1, in 
  File ".\", line 26, in __setattr__
    self[self.wrapped_data.get_argument_index(key)] = value
  File ".\", line 30, in __setitem__
    self.wrapped_data.set_argument(idx, entity_instance.map_value(value))
  File ".\", line 118, in 
    set_argument = lambda self,x,y: self._set_argument(x) if y is None else self
  File ".\", line 114, in _set_argument
    def _set_argument(self, *args): return _ifc_wrapper.entity_instance__set_argument(self, *args)
RuntimeError: INT is not a valid type for 'GlobalId'
>>> # Creating new entity instances
>>> f.createIfcCartesianPoint(Coordinates=(1.0,1.5,2.0))
>>> # Working with GlobalId attributes:
>>> import uuid
>>> ifcopenshell.guid.compress(uuid.uuid1().hex)
>>> new_guid = _
>>> owner_hist = f.by_type("IfcOwnerHistory")[0]
>>> new_wall = f.createIfcWallStandardCase(new_guid, owner_hist, None, None, Tag='my_tag')
>>> new_wall.ObjectType = ''
>>> new_wall.ObjectPlacement = new_wall.Representation = None
>>> # Accessing entity instances by instance id or GlobalId:
>>> f[92]
#92=IfcWallStandardCase('2O2Fr$t4X7Zf8NOew3FLIE',#1,'Basic Wall:Interior - Partition (92mm Stud):143921',$,'Basic Wall:Interior - Partition (92mm Stud):128360',#5206,#18805,'143921')
>>> f['2O2Fr$t4X7Zf8NOew3FLIE']
#92=IfcWallStandardCase('2O2Fr$t4X7Zf8NOew3FLIE',#1,'Basic Wall:Interior - Partition (92mm Stud):143921',$,'Basic Wall:Interior - Partition (92mm Stud):128360',#5206,#18805,'143921')
>>> # Writing IFC-SPF files to disk:
>>> f.write("out.ifc")

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.