Flatten imported IFC objects

I have converted an IFC-file to OBJ and then imported it into a number of different layers representing a building like walls, floors, roof and windows. I would like to use this geometry as input for a building energy simulation and therefore the building elements needs to be 2-dimensional and flat. Building elements are usually kind of 2-dimensional and right now each element is a mesh that could be split into 2 large parallell faces that are rather close to each other and a number of smaller faces that are the edges of the building element. I now wonder of sombedy knows how to convert these building elements to flat single surfaces, representing the middle part of the building element?

importedifc.gh (243.5 KB)

Hi @max.tillberg1 ,
Which software did you use to convert the IFC to OBJ?
Was it Revit?
If so, can you create rooms (Architecture->Room) and then export the Rooms from the 3D model (File->Export->gbXML) as gbXML and import it to Rhino with Cameleon plugin. Or again to Revit and then export as .dwg. A bit too much hassle, sorry.

I have tried IfcOpenShell, BlenderBIM, DDS-CAD Viewer and FZKViewer and they can all convert IFC to OBJ. The problem is that I have not access to the original architectural files that are usually made in Revit and ArchiCAD and very seldom I am to get in contact with the architect to ask them export gbXML. I fully agree that that would be the best option.

Thanks for the reply. I understand.
Yes, this is one of the main issues for thermal analysis.
I tried to convert everything to brep, then merge all planar neighbor brep faces (in order to later extract the largest one). But this method also failed.

This might be what you are looking for.

importedifc_re.gh (246.5 KB)

I’m still pretty new at grasshopper so there are probably better ways of doing this. I’ve sorted the curves by area. The curves at index 0 and 1 are the outside of the walls and the curves at index 2 and 3 are the inside of the walls. I’m guessing you want the curve at index 2 or 3.


Thanks, I think this is a very good start. I still have problems with the sloping roofs and windows though.


Here is another version. It uses a couple of components from Pufferfish.

importedifc_re_2.gh (254.4 KB)

I am not sure what logic you can use to separate the floor decks. After I separated the horizontal surfaces and sorted them by area, the first floor deck is at index 4 and the second floor deck is at index 6.

I separated out the roof surfaces by angle. Upper and lower roof surfaces are included in this file, you could cull them by Z position.

The windows are in a separate geometry component in your file, so they shouldn’t be too difficult to isolate.


This might work for your windows.

importedifc_windows.gh (250.0 KB)

Separated bounding boxes of window frames and glass (not sure what you’re after).