IFC software that is both open-source and available for Linux?

I am curious if there is a list of IFC software that meets the following criteria:

  1. Parses IFC4.
  2. Open-source.
  3. Available on Linux

Additional features that I would enjoy are:

  1. Writes IFC4.
  2. Visualises geometry.
  3. Supports querying and filtering.

I note that FreeCAD satisfies all the criteria. I have found that I am also able to compile IfcPlusPlus on Linux, although there is a bit of confusion over licensing (repo says MIT, website says “This application is free to use, but not open source.”, but perhaps it is only referring to the Windows-compiled IfcQuery tool, because the viewer I compiled seems to be a stunted version of IfcQuery.

The list of implementations leaves a lot to be desired, and some links are broken.

I hope others can share if they know of any other tools? Open source tools and platform independent tools (especially for Linux, which is an absolutely great platform for data wrangling and software development) is vital to the success of an international open standard.

IfcOpenShell matches those requirements. Latest builds [0] on v0.6 supports selecting 2x3 and 4 at runtime.

If you’re into Python, the pairing with PythonOCC for geometry manipulation/analysis/visualisation is quite powerful. Have a look at e.g. the python app [1] or some examples [2]

[0] https://github.com/IfcOpenBot/IfcOpenShell/commit/4380e1d86ab9e5745ccea612aca7d369145e899e#commitcomment-31769117
[1] https://pbs.twimg.com/media/C7EOo4jW0AAKXya.jpg
[2] http://academy.ifcopenshell.org/

Hi @aothms, I see you are the main developer for IfcOpenShell. I have successfully compiled it, and I have used IfcConvert, the Blender plugin, and I have now experimented with the IfcOpenShell python module to parse IFC files successfully. (I have also compiled PythonOCC in the process)

However, I did not find that viewer you have kindly linked to (of which I found the original screenshot here). Do you know where I can find this viewer? I’m ideally looking for a robust Linux IFC viewer that can show me a tree view just like that, but also show attributes (the IfcPlusPlus SimpleViewer does not show any attributes). I found this qtviewer in the IfcOpenShell codebase but it looks as though it was made for Qt4, and from a quick skim it looks as though it is pretty barebones. Where is the code for that viewer, or do you reckon it’d be easier to whip up a IfcOpenShell+PythonOCC combination to view IFC files?

I see you are the main developer for IfcOpenShell

Correct, could have mentioned that I guess.

However, I did not find that viewer you have kindly linked to

The source is here [0]. It’s a PyQt5-based viewer and also relies on PythonOCC for the graphical part. You can start it with:

from ifcopenshell.geom.app import application
application().start()

[0] https://github.com/IfcOpenShell/IfcOpenShell/blob/master/src/ifcopenshell-python/ifcopenshell/geom/app.py#L179

The C++ qtviewer in the repo is a bit of a tease unfortunately. Several people have mentioned they would like to contribute to it, but so far nothing concrete. So for the time being I leave it there.

Thanks @aothms, I have got it running and it works well. I noticed there are various issues using deprecated functions, such as:

/usr/lib64/python3.6/site-packages/OCC/gp.py:3: DeprecationWarning: OCC.gp is deprecated since pythonocc-0.18.2. Use OCC.Core.gp
  warnings.warn("OCC.gp is deprecated since pythonocc-0.18.2. Use OCC.Core.gp", DeprecationWarning)
/usr/lib64/python3.6/site-packages/OCC/Quantity.py:3: DeprecationWarning: OCC.Quantity is deprecated since pythonocc-0.18.2. Use OCC.Core.Quantity
  warnings.warn("OCC.Quantity is deprecated since pythonocc-0.18.2. Use OCC.Core.Quantity", DeprecationWarning)

… or:

/usr/lib64/python3.6/site-packages/ifcopenshell/geom/app.py:434: DeprecationWarning: GetObject is a deprecated function. It is not required anymore.
  ais.GetObject().SetSelectionPriority(self.counter)

I have modified the module to use OCC.Core.* instead, and that fixes most of them and fixes most of the crashes, but I haven’t looked too far into OCC’s docs to know the differences between that OCC version this was built for, and the OCC version I am currently using.

Do you have any intention on updating it to the latest PythonOCC version?

Hey thanks @Moult. I hadn’t built PythonOCC master for a while, seems that version is not officially released yet Releases · tpaviot/pythonocc-core · GitHub

Do you have any intention on updating it to the latest PythonOCC version?

Sure. Backwards compatibility of these changes seems like it’s going to be a bit painful, but I’ll need that for a while. Pull Request very welcome!

I’m bumping this thread because I received a message from @agron asking about which IFC viewer I used.

I use IfcOpenShell, which is a lightweight viewer developed by @aothms - I’ve written a summary about all of the IFC viewers that are both open source and cross platform here:

https://thinkmoult.com/how-to-view-bim-ifc-files-linux.html

The post is a bit out of date now, as Blender now has much more BIM capabilities, but I would still highly recommend IfcOpenShell as a viewer.