Parametric Bridge

Today, I introduce you Louis-Marie Borione, one of my colleague and friend, to talk about his work with Grasshopper for civil engineering.

Hi everyone, I am a BIM Manager in a large infrastructure engineering company in France, and I thank BIM42 to give me the opportunity the present you my work on parametric Bridge.

I recently worked on a preliminary design for a bridge in the Middle East. When starting looking at conceptual design drawings I came with the impression that we would have to make a lot of hypothesis.

Bridge

For example the height above ground at bridge ends is not dimensioned . The idea was to produce any kind of BIM model of this bridge therefore I first thought of using Rhinoceros and Grasshopper.

So I listed all of my hypothesis:

GH

And I started building the wireframe model:

Rhino

And the final model:

FinalModel

Then I had to produce cross sections, longitudinal sections and plan views. I tried to do it within Rhinoceros but the result wasn’t good enough. Additionally some cross beam had a different shape, and using Grasshopper it is difficult to customize some elements.

My next idea was to be able to transfer this model to Revit. After a quick tour on Google, I found the grasshopper plugin Hummingbird. Using Hummingbird plugin for Grasshopper you export geometry from Grasshopper to an Excel Spreadsheet and using Hummingbird plugin for Revit you import that Excel Spreadsheet.

BrideFinal

At the end the process became quite complicated. When changing in input value in Grasshopper it took more 30 minutes to populate that changes to Revit.

I finally thought about using Dynamo to create directly a parametric model of the bridge within Revit. Unfortunately Dynamo is quite hard to use and I think it would make a great subject for a future post on BIM 42.

Thank you so much for this content, and I must say I totally agree with you about Dynamo, I should already have started to work with it.

Use Grasshopper to produce fabrication drawings

I recently have to produce fabrication drawings from a set of panels covering a single curved surface.

These panel were modeled in Rhino 3D, so I decide to extract their boundary curves and use AutoCAD to produce a drawing for every one of them.

I build here an example by extruding a surface between two symmetrical splines.

1_BaseSurface

This construction method create a single curved surface, which is the easiest to cover with plane panel, here with the “Quad Panels” component from the LunchBox plugin.

2_PanelSurface

Then I extract every panel edge and orient it horizontally on the base XY plane.

3_PanelEdges

My objective here is to bake every panel boundary curve on a different layer to be able to sort them separately in AutoCAD. To do so, I use the “Object Bake” component from LunchBox. I also use a “Series” to create a layer names for each panel. Here the names are only numbers formatted as text.

4_BakeEdges

The next step is to add dimensions. Sadly, since native grasshopper dimension does not have any output object, we cannot bake them with the “Object Bake”. So I’m using my own Linear Dimension creation component. As you can see, the code is quite straightforward. I use standard Rhino functions to create my dimensions, and have a small private function for selecting or creating the layer to place our dimension.

 private void RunScript(bool Bake, Point3d A,
                        Point3d B, Point3d C, 
                        string Layer, ref object O)
  {

    if (Bake == true)
    {

      Point3d A0 = new Point3d(A.X, A.Y, 0);
      Point3d B0 = new Point3d(B.X, B.Y, 0);

      double a = (B0.X - A0.X) / (B0.Y - A0.Y);
      double Xc = 1;
      double Yc = Xc / a - A0.X / a + A0.Y;

      Point3d C0 = new Point3d(C.X, C.Y, 0);

      Plane refPlane = new Plane(A0, B0, C0);

      double u,v;
      refPlane.ClosestParameter(A0, out u, out v);
      Point2d A2d = new Point2d(u, v);

      refPlane.ClosestParameter(B0, out u, out v);
      Point2d B2d = new Point2d(u, v);

      refPlane.ClosestParameter(C0, out u, out v);
      Point2d C2d = new Point2d(u, v);

      Rhino.Geometry.LinearDimension dimension = 
                  new LinearDimension(refPlane, A2d, B2d, C2d);

      ObjectAttributes dimAtt = new ObjectAttributes();
      dimAtt.LayerIndex = ensureLayer(tag);

      if (Rhino.RhinoDoc.ActiveDoc.
Objects.AddLinearDimension(dimension, dimAtt) != Guid.Empty)
      {
        doc.Views.Redraw();
      }
    }

  }

  // <Custom additional code> 
  private int ensureLayer(string lay)
  {
    int i = doc.Layers.Find(lay, true);
    if(i < 0)
      return doc.Layers.Add(lay, Color.Black);
    else
      return i;
  }

With the “Disc” component, I retrieve every summit of my panel boundary, and place a dimension between two of these points. I also use an offset of my panel boundary to set up the position of the dimension line.

5_LinearDimension

Angular dimensions follow more or less the same principle, with two shift to retrieve the point before and the point after a given submit to create our angle measure.

6_AngularDimension

These two dimension components are linked to layer names, so when hitting Bake, each panel curve end up in its layer along with its dimensions. You can see the result below, with every layer displayed and with only one layer visible.

7_Result

I can now export every curve and its dimensions to a DWG file. This file is edited with an AutoCAD script to paste each layer in a new template file where the titleblock is prepared. It also add the panel number in the titleblock.

7_FinalDrawing

Coordination with Grasshopper

I recently coordinate a complex ceiling with the concrete structure and mechanical equipment. This ceiling is composed of flat panels, with no particular pattern or general repetitive shape. These panels are modeled as a set of surfaces in Rhinoceros 3D.

General View

For those who are not familiar with it, Rhinoceros is a 3D modeling software solution, develop by Mc Neel Associate, and broadly used by architects in the early stage of the design. It comes in handy for design complex free-form shapes.

My ceiling surfaces have to be modified to include enough space in the plenum for mechanical equipment, while keeping the ceiling constructible.

I use different models as a reference during my work, coming mostly from Revit. Once exported in DWG, inserting them in Rhino is quite easy. These models show structural concrete and ducts to be integrated in the plenum space.

The next step is to integrate fabrication constrains, in order to keep every ceiling panels constructible while editing them. To do so, I use Grasshopper, the visual programming interface of Rhinoceros.

With a layer pipeline, I extract every panel of the ceiling surface. I then apply the construction rules on these panels, and display the result with a specific presentation in Rhino.

For example, since every panel must be planar, I display every non-flat panel in red, and correct them as soon I see them in Rhino.

IsFlatGH

IsFlatRhino

I also display the naked edge curves of every panel to identify junction problems between two supposedly contiguous panels.

EdgesGH

EdgesRhino

Each ceiling panel needs also some space behind it for its supporting structure. The volume of this structure is modeled in real time using the offset command in Grasshopper. Another constrain is the angle of the panel vertices. After fighting with some angle measure in Grasshopper, I ending up by just counting the number of edge of a panel, displaying it as a color scheme in Rhino, and assuming that the smallest edges count was the better.

EdgeCountGH

EdgesCountRhino

Once these construction constrains are displayed in real time in the Rhino viewport, I can easily modified the ceiling surface while making sure it still constructible. These modifications are conducted here with basic surface modeling tools, and entirely by hand. But once you have immediate feedback on what you are doing thanks to Grasshopper, editing these surfaces become almost fun.

Walls in Geometry Gym

A recent webinar about interoperability between Grasshopper and Revit make me look again on these tools, particularly for importing walls, In fact, I generally test these kinds of tools with a set a beams, more or less intricate, but never with walls, so I decide to generate a set of walls using the Geometry Gym IFC Importer for Revit.

Using Geometry Gym require at least some basic knowledge of the IFC structure. In fact, using this tool can be a really good starting point for studying the model behind Industry Foundation Classes.

Any IFC building object must be included in a (IFC) building, itself included in a (IFC) project, both of them must have a GUID and a name. So we start by placing these components on the Grasshopper’s caneva.

In order to have our NURBS path curve understood by Revit, we approximate it into a set of lines and arcs, using the specific Geometry Gym component.

We create an ggIFCElementParameter component to give a pretty name to our wall.

In order to create the multy-layer structure, we add two materials, both of them linked to a MaterialLayer component where we define the thickness of each layer. These component are merged into a MaterialLayerSet, itself link to a wall type.

The IFC class used by Revit for generating walls is the IFCWallStandardCase, so we use this component in our Grasshopper definition. We link all these components to our IFC Wall Standard Case, had a height parameter, and bake the whole think.

The resulting IFC file contains a pretty good wall, with every expected parameter. We check it in my favorite IFC viewer, the Solibri Model checker.

Once imported in Revit, using the embedded plugin, it creates a generic component looking like our wall. It appears in a schedule with the family name and type as set, but it’s still not an editable Revit wall.

I generally use the massing tool to create walls in Geometry Gym. I create a simple IFCExtrudedAreaSolid (for example) from a base NURBS curve, and then import it in Revit to generate a mass.

 

I can now use this mass to create my curved walls in Revit, along with the floors slabs. This method need an additional step (creating the wall from the Revit mass faces), but create native Revit walls.

As I write these lines, a new version of the IFC Import plugin for Revit have been posted on the Geometry Gym blog, I still have to review the improvement.

Parametric modeling in Revit

There is a trendy topic on the Grasshopper forum these days about links between Grasshopper and Revit, and this refers to a more general subject : How to generate parametric geometry in Revit.

Since embedded tools in Revit are mostly oriented toward classical design, workarounds have been developed to create a more complex geometry.

The Revit plug-in Dynamo, developed by Ian Keough, is one of these tools. Starting as an open source side project, it has been integrated into the Autodesk lab to became one of its most popular projects.

This tool is a graphical user interface (GUI) for parametring design directly into Revit. It looks pretty much like Grasshopper, with a canevas where we drag components link together to directly create native Revit elements.

WhiteFeet is also a Revit Plugin, which allow creating native Revit elements from an Excel datasheet. It can be used alone, but I rather use it with Hummingbird, a Grasshopper extension used to generate these Excel datasheets. There is a Grasshopper component for each major Revit command.

Designing these element in Grasshopper follow pretty much the same logic than in Revit, with family name and type, points and parameters, except of course for the possibilities offered by natives Grasshopper components.

Here is a little example for generating beams on a double-curved surface from LunchBox.

Make sure you have the correct Excel 2010 worksheet opened; I struggled for a while before realizing that my Excel version was outdated.

The Hummingbird component writes a few lines in our Excel file, something like that:

Then we go the Add-Ins panel of Revit and start the WhiteFeet Model Builder to import our datasheet. There are a few options to set, with everything quite self-explanatory.

The plugin generated smoothly these beams in Revit, with all the requested parameters:

Among Grasshopper plugins, Chameleon allows to create Revit adaptative components directly from Grasshopper. It also includes components to edit Revit parameters directly on the model.

All these plugins, among others, became a very interesting alternative to the average modeling in Revit, and fill the gap between parametric modeling and a more average BIM modelisation.

From Grasshopper to Tekla

I keep on trying the Grasshopper Plugin Geometry Gym, and one of our current projects made me search more extensively in the Tekla export module.

It presents itself as a set of tools to create beams, plates, bolts and welds. There is also a TeklaBakeStructure component to send our Grasshopper geometry to Tekla.

Creating beams is pretty easy, all you need is a BeamProfileProperty before, where you set all Tekla parameters of your expected beam. Then you just link your wireframe lines to the beam component.

I struggled for a while to set the Insertion Point property in order to set the position of the beam axis before realizing that I only had to right-click on the parameter to set it. I finally extracted it to keep it visible.

The plate component is also quite simple, with a polyline as input and more or less the same set of property as for beams.

To link two parts together, and so create a Tekla assembly, you have to create a group of bolts (or a weld), then assign it to the main part with the specific input, and add to the assembly all secondary parts you need. I am not sure if it is realistic to create assembly for a whole project directly in Grasshopper, but maybe I am missing some point here. My current project involves a lot of connexions, so I will keep on exploring these features.

 

To exploit a model imported in Rhino, Jon Mirchtin has developed two specific components call Reverse Engineer. You can use it to retrieve beams or plates properties from geometry. Here is an example of a plate recreated from a standard Rhino Closed PolySurface.

Once all you profiles and other parts are created into Grasshopper, you can export them. Just run Tekla, start a new project, and click on the TeklaBakeStructure component on your Grasshopper canvas.

Your model is now export in your Tekla project.

This plug in fill one of the most lack in the Tekla functionalities, the ability to create complex shape quickly. With this module, it became pretty easy to adapt a lot of beam on a double-curved roof, and create them in Tekla.

Geometry Gym

I was talking on a previous article about the Grasshopper plugin develop by Jon Mirtschin called Geometry Gym.

This set of tool for building modeling firstly came as a plugin for Rhino, implementing commands for designing structures and linking these models to structural analysis software.

These tools where integrated as commands in Grasshopper, allowing generating building elements parametrically, a very interesting feature at an early stage of the project.

But for me, the most interesting part of this plugin is its ability to generate IFC files into Grasshopper. A large part of the IFC classes are implemented directly as Grasshopper functions.

By combining these functions, we generate the structure of our IFC file exactly as we want it, and if our favorite BIM software is known for missing some IFC classes, we can still use a workaround by designing yourself your IFC data structure.

Using this plugin requires a little understanding of the IFC data structure, but examples can be found on the Geometry Gym blog, and are quite self-explaining.

Combined with the building modeling tools described above, it provides a powerful way of designing building, especially at the early stage of the project.

Geometry Gym came also with various plugins used as bridges for other BIM software

The plugin for Revit implement a new IFC Import module, especially design to import files generated in Grasshopper. This allows integrating native Revit element from an IFC file.

There is also a direct link with Tekla, use to generate native Tekla elements directly from the Grasshopper model.

If this software need some time to get used to it, and a little knowledge about the IFC Data structure, once taken in hand, it become powerful enough for replace any conventional BIM software, at least at the beginning of a project, and especially for complex shapes and structures.

About Grasshopper

Did you ever try using Rhino? I know, I know, it’s not a BIM software, it’s just able to make pretty 3D drawings and nice pictures. But, as I have already said, nice pictures are still the best way to sell the BIM, and Rhino is actually a great software.

Apart from its capacities to design every shape you can imagine and its user friendly interface, Rhino come with a lot of plugin which make it really powerful.

Among these plugins, my favorite is Grasshopper. It’s a graphical interface for designing parametric shapes in Rhino. In other word, instead of simply drawing what you imagine, you explain to Grasshopper what you’re imagining, and it designs it for you.

As an illustration, here is the interface of Grasshopper, alongside with Rhino. Pretty, isn’t it? The red surface in Rhino is the visualization of what we are designing in Grasshopper by wiring these little boxes together.

As an example, we can start by generating twenty points randomly:

Then we use them to draw twenty circles:

And finally, we extrude each circle to create cylinders:

And the best part is that we can still edit anything you want.

If you want fewer cylinders, just change the number of origin points:

Or change the circle’s radius:

The possibilities are almost endless, and, shame on me, I start to think that this little plugin can even be more powerful than the almighty CATIA. At least, it’s far less expensive, since it came freely with a license for Rhino.

You can find a lot of help on the Grasshopper forum, and a beginners Guide here. I’m also very fond of the Grasshopper Learning Material made by Woo Jae Sung

Grasshopper has its own plugins and developing interface, which make it even more useful. I will probably talk again about these plugins, some of them has become a full part of our BIM workflow.