Grasshopper IFC import optimizations

Hi, I’m getting to know the GeometryGym capabilities in Grasshopper. I’d like to customize the import process using Grasshopper to get the most similar results to the Rhino command, but with some modifications.

One of the issues I can’t get past is how to import IFC and create Rhino Block Instances from repeating elements that will reference the same Block Definition. This dramatically affects the performance of the file. For many elements, such as curtain walls, it seems to me that it would be possible to create nested Blocks, where repeating mullions and panels refer to the same Block Definition.

In the past I’ve managed to create such optimized imports from Revit to Rhino using Rhino.Inside.Revit, but IFC is much more difficult for me and currently impossible to get through.

Is there a Grasshopper example file that shows how to do something like this?

Rhino command import, very few Block Definitions, efficient file

Grasshopper import attempts - hundreds of Block Definitions

It would be quite helpful to share an IFC file to review as part of this.
If the rhino import generates the correct result, then it should be possible in Grasshopper also. Certainly there might be needed to provide some improvements to the plugin, I don’t recall other users utilizing blocks in Grasshopper to date.

The minimal file and test would be to import these two curtain walls as two Block Definitions (or at least groups, but I don’t think those work in Grasshopper with Content Cache) whose nested elements are mullions and panels and all repeating geometry uses the same Block Definition (this happens to work with Rhino IFC Import).

IFC Test.zip (52.9 KB)

BIM Collab - tree structure of members

Thanks. It’s a tricky one, as blocks, block definitions etc are really rhino concepts with minimal support in Grasshopper. I recognize some progress of this in Rhino 8.

It might be more interesting to discuss how you wish to configure the import from grasshopper. This can be privately if you prefer. Ie we can provide the rhino import method that can be called from grasshopper where you hopefully can configure it as you require. If you can provide some details, I can take a look and provide feedback from our side.

Blocks in Grasshopper for Rhino 8 have been greatly improved and are now full citizens.

It would be nice to have options available during IFC import in Rhino as a preset in Grasshopper, without a big script and complicated configuration. It would also be nice if it was possible to save different IFC import settings in the Rhino GUI. However, using components in Grasshopper gives a lot of freedom in defining the import exactly, and that’s what interests me the most.


It all comes down to getting the object geometry in World Origin right to create Block Definitions and their transformations, which will be used to place Block Instances. You also need to get information about which element is hosted in which.

Rhino currently does not have a good Scene Browser, so placing such small elements as Curtain Wall elements in its Block Definition makes navigation much easier and can optimize the size and speed of the file.

GG Rhino IFC Import (2 files) = 96 Block Definitions total
Rhino IFC Imported.3dm (1.2 MB)

My Grasshopper Revit import (2 Files) = 133 Block Definitions total

The difference in the number probably results from some differences between IFC and direct import from Revit. From what I see, more Curtain Wall elements are created as unique Block Definitions in Revit than when importing from IFC.
It is not crucial for me.

The challenge for me is to create such a script in Grasshopper using GeometryGym that would import IFC files and create Block Definitions and Instances just like I did with the direct import from Revit.

Grasshopper Revit-Rhino import of 2 projects

Revit - Rhino Nested Blocks Example.3dm (4.1 MB)

test model - revit to nested blocks.gh (35.7 KB)

I am posting a Grasshopper script to import elements from Revit. I would like to achieve exactly the same, but from IFC.
I can handle assigning geometry to layers, the problem is extracting Geometry and information from IFC elements in such a way that will allow defining the minimum required number of Block Definitions to create at least 1-layer nested Block Definitions.

TEST 1 TEST 2 - IFC models.zip (223.2 KB)

I’ll keep tinkering, but if you had an example of how to make even one curtain wall a Block with nested Block Instances, that would be a huge help in scaling this solution and putting together a larger, general import script.