I recently attended an event hosted by the San Francisco Computational Design Institute (SFSDI) in which I learnt about a new initiative by McNeel & Associates, developers of Rhino, to bring the power of Rhino and its Grasshopper add-in to Revit. Up until now, the only integration of Rhino and Grasshopper with a BIM application was with ARCHICAD. While Revit already integrates with Autodesk’s own Dynamo application for design scripting, the ability to now also be able to use Grasshopper for this has the potential to dramatically improve Revit’s modeling capabilities, given that Grasshopper is the most well-established, sophisticated, and widely-used algorithmic modeling application currently available.
The new initiative by McNeel & Associates, known as Rhino.Inside Revit, is part of a large initiative called Rhino.Inside, which allows Rhino and Grasshopper to run inside other 64-bit Windows applications such as Revit, AutoCAD, Unity, etc. Before exploring it in more detail, let’s take a broader look at the area of design scripting in AEC.
The idea behind design scripting—also known by various other terms including visual programming, algorithmic design, algorithmic modeling, or computational design— is to generate a form for a design by writing a script instead of modeling it. The script captures the logic that generates the form. You can change the form just by modifying the script, which not only allows the modeling of very complex forms but also enables many design iterations to be quickly explored. Since the script is encoding the key parameters that drive the form, it is also sometimes referred to as parametric design.
The earliest example of design scripting in AEC was Bentley’s GenerativeComponents, which was launched in 2007. It was available as a stand-alone algorithmic design application for several years and used by technologically advanced design firms such as Foster + Partners and Arup. GenerativeComponents has now been integrated into Bentley’s BIM application, OpenBuildings Designer, making it easier to create BIM models using script-driven computational design (as shown in Figure 1) rather than conventional modeling tools.
In contrast to Bentley, Autodesk got into design scripting much later, with the release of the standalone Dynamo Studio for design scripting in 2015. A year later, a Dynamo plug-in for Revit was introduced and it was open-sourced, spurring the development of an entire community around it (see https://dynamobim.org/). Last year, Autodesk also introduced Dynamo for Civil 3D to bring the power of design scripting to BIM for infrastructure.
With regard to design scripting in other BIM applications, GRAPHISOFT has preferred to have the “best of breed” bidirectional integration of ARCHICAD with Rhino/Grasshopper, Vectorworks developed it inhouse in 2016 with a tool called Marionette, and ALLPLAN is reportedly coming up with this capability in its Allplan BIM application.
Regardless of the application, the fundamentals of design scripting are more or less the same: the creation of the different components of the design is driven by scripts that are captured in the form of nodes and the connections between then. A simple example of a Dynamo script that draws a circle is shown in Figure 2. Needless to say, the script can get really large even for a simple design, and the script driving a complex design can get extremely complicated. This is why visual programming requires its own brand of expertise, and contrary to developers’ claims that you don’t need to be a programmer to be able to work with Dynamo or Grasshopper, it does help to have a basic knowledge of coding. (This point has been emphasized at: https://www.dynamonow.com/what-is-dynamo-for-revit/.)
Rhino is a powerful 3D modeling application that is developed by McNeel & Associates, and since its release in 1980, it has become the leading 3D design application used for architecture, manufacturing, and industrial and product design because of its sophistication and versatility. It uses NURBS (Non-uniform rational B-spline) for its underlying geometry and can therefore model curves and surfaces that are mathematically precise as opposed to mesh-based applications that simulate a curved surface by faceting it. What makes Rhino even more powerful is the large number of add-ins that have been developed for it, both by McNeel as well as third-party developers, not just for scripting but also for sketching, rendering, animation, etc. There is even a plug-in called VisualARQ that allows Rhino to be used to create architectural BIM models!
Rhino has several developments tools to further enhance its capabilities, including the more traditional scripting tools that use programming languages such as Python and C++, as well as Grasshopper for visual scripting. There is now a full-fledged community built around Grasshopper, and it has a growing number of plug-ins of its own. A step-by-step example of how to use a Grasshopper script to drive a design in Rhino is described in this article, “Modeling a Waffle Structure in Rhino and Grasshopper”. Some examples of architectural designs created using Grasshopper scripts are shown in Figure 3.
The broader Rhino.Inside initiative, which the Revit integration is a part of, is an open source project that is part of Rhino WIP (work in progress), leading towards the upcoming release of Rhino 7. (The current release is version 6.) As mentioned earlier, the objective of the initiative is to allow Rhino and Grasshopper to run inside other 64-bit Windows applications such as Revit, AutoCAD, BricsCAD, ArcGIS, Unity, etc., as an add-in, work with their APIs, and create objects in these applications. Since the initiative is open source, the developer code is hosted at GitHub and accessible to third-party developers.
The idea behind the initiative was not interoperability as such, since Rhino’s native file format, 3DM—which is also an open source format—is already supported by many CAD and modeling applications. The objective was to bring the power of Rhino and its many plug-ins including Grasshopper, to other design applications and workflows. It should be noted that you would still need to have a copy of Rhino installed on your computer to use the add-in, which makes this also a business decision for McNeel—more integrations mean more licenses and therefore more revenue.
In contrast to the CAD applications that are included in the Rhino.Inside initiative, the integration with Revit is more involved since it is a BIM application that includes not just geometric information about the elements in the model but also a whole host of property and attribute data related to the type of building component they represent. Thus, in order to be able to create objects in a Revit model using a Grasshopper script, Grasshopper needs a whole new set of Revit-aware components in its scripting interface, which is exactly what happens when the Rhino add-in to Revit is installed, as shown in Figure 4. Rhino is now running inside Revit’s memory space, and Grasshopper is, in turn, running inside of that Rhino’s memory space.
A simple example of what the integration can achieve is shown in Figure 5, in which a Grasshopper script has been written to bring Revit geometry into Rhino, with each category of elements being brought to Rhino step by step and placed in separate layers. The Grasshopper script essentially collects all the Revit elements in a category such as walls, roofs, doors, etc., creates a layer in Rhino with the name of the category, and then brings in all the elements into that layer. The end result is a Rhino model identical to the Revit model, which is now available for all the tasks that Rhino excels at such as 3D printing, analysis, rendering, and so on. Of course, getting Revit geometry into Rhino can also be achieved through exporting the Revit model as a 3DM file and then importing it into Rhino, but the example serves as a good illustration of what can be accomplished with a Grasshopper script.
Another simple example, but one that is more demonstrative of the power of Grasshopper to drive element creation in Revit, is shown in Figure 6. In this case, Rhino is not used as an intermediary; Grasshopper is launched directly from Revit. The simple script that is shown calls for the selection of two Revit edges, and it uses them to create a geometrical surface by lofting them; the surface is then used to create a roof in Revit. Thanks to the fact that this roof element is created by a script rather than modelled in Revit, any change in the size or position of the edges makes the corresponding changes to the roof element as well.
Some more complex examples of the Rhino.Inside Revit plug-in generated from training videos are shown in Figures 7 and 8. Figure 7 shows the use of a Grasshopper script in creating an entire building in Revit, including architectural as well as structural components; Figure 8 shows it being used to create a panelized structure with a varying pattern of apertures, the size of which is determined by the height of each panel from the ground. The structure is designed to be a roof over a courtyard and is an addition to an existing Revit model. The base surface for the structure was created by lofting three curves in Rhino.
The new Rhino.Inside Revit initiative has opened up a new whole avenue for design technologists who have been working with Rhino and Grasshopper for several years and want to translate their expertise to working with Revit. In addition to complex forms that are generated by algorithms—and which can therefore be changed by simply tweaking the algorithms, allowing multiple design iterations to be quickly explored—design scripting can also be used to create more traditional buildings using rules (as shown in Figure 7), as well as automate several of the many repetitive tasks that still need to be done in BIM. (We did not see the end of them with CAD, as we hoped we would.)
It should be interesting to compare Rhino.Inside Revit with how Dynamo works for design scripting in Revit, and we will explore this in a future article.
These are some useful resources I came across in the course of researching this article:
Lachmi Khemlani is founder and editor of AECbytes. She has a Ph.D. in Architecture from UC Berkeley, specializing in intelligent building modeling, and consults and writes on AEC technology. She can be reached at firstname.lastname@example.org.
Have comments or feedback on this article? Visit its AECbytes blog posting to share them with other readers or see what others have to say.
AECbytes content should not be reproduced on any other website, blog, print publication, or newsletter without permission.