Graph viewer of IFC structure in Bonsai: Interested? Features?
Hi Community,

I am updating my suite of educational tools to teach uni students about open BIM concepts,
Among them I have created
https://github.com/jakob-beetz/ifcopenshell-notebooks
https://github.com/jakob-beetz/IfcOpenShellScriptingTutorial/
and other stuff over the years.
As I had used have been using Blender(BIM) in education for a long time and am thinking of rolling all of this into Bonsai.
Such a graph viewer comes in handy to understand and debug models, get insights etc.
I am not sure how interesting this might be to you.
If it is, I will clean the code, add some features and put it in a separate repo (it creates additional dependencies, and I'd rather not pollute Bonsai with a PR with it...)
Things on my agenda:
- Interaction (click on a node, get the selection in Blender)
- All attributes and on the node labels
- auto-focus
- UI elements for graph recursion depth, ENTITY blacklists etc.
Any thoughts?
Thanks for any comments and suggestions
Jakob









Comments
I still consider myself a novice with IFC, so such a tool would be great!
um, awesome.
This is a good visualization of the fact that IFC is an entity relationship model.
I have used this software to visualize IFC files. Since it is open source, I will introduce it to you. Please translate as it is in Japanese.
https://github.com/kiyuka829/ifc-graph-viewer
This tool as another tab in the WebUI? How about it?
Thanks, this is a really good idea
I want it!
Hi guys thanks for the feedback!
Here is a first draft. Let me know if this works for you. Not sure about the installation on other platforms http://graphviz.org must be installed on your platform.
https://github.com/jakob-beetz/bonsaiGraph
fantastic!
@Jakob I just give your graph tool a try - really nice.
I had to tweak the code for an IFC4x3 model, otherwise, no issues at all. Super cool feature.
Thanks
Hi @Rick_Brice , thanks a lot for the feedback!
I'd be very happy to learn more about and incorporate your IFC4x3 tweaks. I have a few (cosmetic) updates and could add your modifications. Pull Request or some snippets here ... whatever works best for you. I also had a brief conversation with @dionmoult discussing some options to add this to the debug panel in bonsai itself and/or createing a WebUI panel with some nicer SVG rendering, interactivity etc. as @walpa suggested.
Jakob
@Jakob all i did was change the hard coded IFC4 to IFC4X3 in init.py
I think the ‘ifcopenshell.file.schema’ property gives the schema of the open file so maybe this works instead of hard coding. I haven’t tried it yet.
@Jakob Thank you for this awesome tool—it's perfect for an IFC schema newbie like me! 🙂
I've been searching for something like this for a long time, and I finally found it.
Unfortunately, I’m having trouble installing it. No matter what I try (manually install Numpy), I always end up (when I try to enable Graph in Bonsai) with the following error:
No module named 'numpy.exceptions'
Here’s my system setup:
Windows 10
Blender 4.3.2
Bonsai 0.8.2
Numpy 2.3.1
Could you help me resolve this issue?
Thank you in advance
Ifc & Python Newbie🙂
What's the output of the following:
Thanks, @aothms. Blender is returning this path:
C:\Program Files\Blender Foundation\Blender 4.3\4.3\python\Lib\site-packages\numpy__init__.py
But I'm not sure what that means.
I also tried downgrading Numpy to v1.26.4, but it didn't work?
Hi @Jakob ,
I find this project really useful, some notes on the packages from a cross-platform perspective:
On a different note, the attribute relationship graph is not showing Property Sets attached to IfcGroups, even if I increase the recursion depth to the maximum value of 10. Is this something that would need to be implemented, or I miss something? (I've created a few objects and put them into an IfcGroup and attached a dummy Pset to the group: the objects and the group itself is shown, but not the Pset. (Psets attached to the objects themselves appear as expected.)