# Rhino to IFC Example

## Rhino to IFC Simple Building Example

The below outlines the steps in order to use this process to set-up a simple building transfer as shown in the image below.

{% hint style="info" %}
Download the .3dm Rhino file for this example [here](https://drive.google.com/file/d/1Knaw3RakUtjcu8MxKqREW9vq80WFAJq5/view?usp=sharing).
{% endhint %}

The geometry has been created in Rhino from a variety of scripts and generic modelling. The building will be broken into 4 levels and the elements will be assigned to each. A triangular mesh also defines the existing topography of the land.

![Simple Rhino Building](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-62fc1d5b78c1c61a68e7829b027ed91be176b691%2Fimage%20\(4\).png?alt=media\&token=c2107e18-afce-4fb4-8643-cadd21f176bb)

### Generating the Layer Hierarchy

The first step is to create a Rhino Layer Hierarchy that applies to your project. Follow the steps here along with the image below:

1.0 Create a Root Layer for the **Project**.

2.0 Create a new Sub-Layer defining the Project **Site**.

{% hint style="info" %}
Assign the site topography mesh directly to the Site layer. This will ensure the topography will be assigned in the correct location on export.
{% endhint %}

3.0 Create a new Sub-Layer under the Site Layer defining the **Building**.

4.0 Create new Sub-Layers under the Building Layer to define each **Building Storey**.

{% hint style="warning" %}
For a small building such as this, it may not be 100% necessary to provide building stories, simplifying the layer hierarchy. The products/elements could all be defined underneath the Building layer itself.
{% endhint %}

![Generating the Rhino Layer System](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-e7617428f54cd307e2be6998f41bda36413af717%2Fimage%20\(33\).png?alt=media\&token=795f8a9a-eb2a-4f27-b9cb-2449b1df72f8)

5.0 Now that you have generated the primary hierarchy of the building you can start to defined the object which will be associated with each Story. The below shows an example on how to do this:

![Defining Object Layers](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-1434b3c9a4aa5dca39054c94baa08deda746897d%2Fimage%20\(24\).png?alt=media\&token=e01c30c7-7dfa-4674-9950-66aa8bc45917)

Each 'Type' should be defined as a separate layer and all the associated objects or 'instances' of these be stored within this layer. Taking the Foundation level as an example, a separate layer has been defined for both the 700 diameter pad foundation and the 500 diameter pad foundations. Each instance of the type is contained within the layer.

The Tripod foundation frames will be defined as IFC Assemblies (a joined collection of elements - as this will be a welded frame which sits on the foundations). For each *IfcAssembly* a separate local layer hierarchy should be defined and associated objects assigned to those layers. Similarly, the same can be completed with stairs which are built up of multiple elements such as treads and stringers as shown under the Ground Level Layer.

### Assigning IFC Information using ggRhinoIFC Layers

Once you have defined the object into a layer hierarchy you can use ggRhinoIFC Layers to define how the objects are to classified into the IFC file which will be exported.

#### Setting Project Information

The root or highest most layer should be defined with the classification of IfcProject as shown below. The name of the project will be taken from the Layer Name itself.

![](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-a9312d4b0dd6a9c136de884a98f300a784344cd1%2Fimage%20\(3\).png?alt=media\&token=74b37bbd-789e-4ebd-8fb1-f86d64f05760)

No Objects need to be defined within this layer. It is simply used to set-up the hierarchy of the project.

Once you have set the appropriate layer to the class of IfcProject there are a couple of different options that can be provided to the IFC project. For example, you can add a **Profile Library** to be used with the Project. This is an .ifc file definition which contains a library of profile definitions which can be applied to ifc classes which typically have extrusion representations such as *IfcMember*, *IfcBeam* and *IfcColumn*.

A Project Template can also be defined which can save you time in generating the layer hierarchy from scratch each time.

#### Set Site Information

Assign the second layer in the hierarchy to the *IfcSite* as shown in the picture below. Ensure that the topography mesh is assigned to the corresponding layer in Rhino. Typically this layer should be named Site.

![Assigning the IfcSite Classification](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-1a18681c71881bfb42811399fbaced72d45ef967%2Fimage%20\(32\).png?alt=media\&token=b4df809d-aeb3-4090-83bd-054eeeb68542)

The *IfcSite* context options allow you to set a position of the site by either Manually setting a plane by *SetPlacementPlane* or selecting an already defined Rhino Construction Plane. You can also set the site Latitude, Longitude and Elevation of the site from here.

![](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-59d696d54ddb735c69ab62cd58693cac4723ecc5%2Fimage%20\(22\).png?alt=media\&token=a65fdcb4-e0da-461a-885f-233cf24f2352)

{% hint style="warning" %}
Model positioning is poorly agreed and inconsistent across a number of software application implementations so always ensure you have a way of checking that your model is correct on export. If you are having issues with this please contact us for guidance.
{% endhint %}

#### **Set Building Information**

Once the site information has been set. Set the next layer to the classification of *IfcBuilding* as shown below. The building Name will be taken from the name of the corresponding layer.

![Assign IfcBuilding to Layer](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-874497a4db1905e97a4b3383c4592b688120f760%2Fimage%20\(2\).png?alt=media\&token=82358338-044b-443a-8773-e61233450043)

Again, you can set additional information such as the placement plane of the building and other description information. You should not need to have any geometric elements stored within this layer.

**Set Level Information**

For each of the levels I can use the right click context menu to assign the the children layers to that level. Right click to view the context menu set the layer classification to *IfcBuildingStorey*. The Storey name will be taken form the layer name itself.

![Assigning a layer to an IfcBuildingStorey](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-6902daea31a99aec85e7c571bbcc22f54c71a740%2Fimage%20\(31\).png?alt=media\&token=4d0dce73-ac1a-4c20-943a-28f4dadabed5)

Once you have set each Level layer to the appropriate classification you can again right click on the level layer and assign the elevation for each level as shown below. You can use *Set Children Layers* on the building level layer to set all layers to the *IfcStorey* Classification.

![Setting level elevation](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-e88b8e3dbedf41925e64453418c0572643483b0f%2Fimage%20\(19\).png?alt=media\&token=0e60becb-deba-4c7f-833c-cacc64f621ef)

{% hint style="info" %}
You may also want to assign the level by a placement plane as shown above.
{% endhint %}

#### **Set Assembly Information**

Sitting on top of the foundations will be a welded brace frame which will support primary beams. This frame is built up of a number of *IfcColumn* and *IfcMember*, which we will include in an *IfcElementAssembly*.

To define an assembly select the Parent layer of the assembly and assign it the appropriate assembly classification. You should not have any objects within the Assembly layer itself.

![Assigning an IfcElementAssembly](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-5493ee135b7fe57beba086883df0b2b619d17bcd%2Fimage%20\(26\).png?alt=media\&token=950bf48e-a48a-4d76-a57f-f5c02500a858)

Once you have assigned the *IfcElementAssembly* you can assign the elements in the children layers. In this instance assign the 3 legs of the tripod to an 100CHS Column Layer and nominate that layer as an *IfcColumn*. Nominate the 2 connecting plates of the tripod in an *IfcMember.Plate* classification.

At current each different assembly should be defined in its own layer system. Therefore, complete the above for the two other Tripods.

{% hint style="info" %}
If all the elements in the children layers are of a similar class you can bulk nominate all of these at the same time by selecting the *Set Children Layers* and then selecting the desired ifc classification.
{% endhint %}

**Set Typical Element Information**

The last step is to assign class information to elements contained within the different type layers for each level. This can take a little time depending on the size of the model and the number of different types. Below is an example of how the Ground Level Layer has been set up in this example. All of these classifications can be selected under **Ifc Classification > IfcElement > IfcBuildingElement** in the context menu.

![Assign IfcElements to a Level](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-55dcf23d26c876401d15841ef524eab23a8ea017%2Fimage%20\(13\).png?alt=media\&token=683c2807-4f6c-464a-b66b-adc61648e7f0)

You will notice that the stair has been broken down into a separate hierarchy (similar to the IfcAssembly) as there is more then one element that is defining the stair. This could also be done for the railing or even the different components for windows and doors but for simplicity they have been.

{% hint style="info" %}
If no classification has been defined for a layer within the hierarchy the exporter will export the objects contained in that layer as general elements of no specific.
{% endhint %}

When an element is selected as an element \*\*\*\*(i.e *IfcColumn*, *IfcMember*, *IfcBeam* etc.) which can be represented as an extrusion you can manually assign which profile within the Profile Library (defined at the project level) will be applied. We are not using the profile definition string in this example.

![Assigning a profile string to an element](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-bd07d02ed8af493fa3bc88e97d22e4f217c89415%2Fimage%20\(20\).png?alt=media\&token=27bdc8c1-9252-438e-85f3-0ec30dc6bdd3)

**Set Layers to Ignore**

In this instance there are two layers in which I do not want to include in the IFC file, Default and WORKING. In practice these layers by default would not be included in the export as they are not contained within the hierarchy underneath the root Project layer. You can also set layers within the root layer hierarchy to IGNORE and these will not be exported.

### **Exporting to .ifc**

Once you have set the information to the geometry you can export the IFC file by navigating to the defined project line in the RhinoIFC Layers panel. Right click on the root project layer and select **ExportToFile**.

![](https://2594167310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSS3F7HK0Nk5Ql9jbdt%2Fuploads%2Fgit-blob-543ce9d723842eb6977d4b38f68c2362ca516e56%2Fimage%20\(1\).png?alt=media\&token=b45b8566-d08c-4243-ade0-f35985873233)

The typical RhinoIFC Export options should appear and you can select the options you wish for your export. For explanation on export options please see here.

{% content-ref url="" %}
[](https://technical.geometrygym.com/rhino-grasshopper/ifc/ifc-for-rhino/ifc-export)
{% endcontent-ref %}

Once you have exported to Ifc try and import the ifc file into another application for viewing.
