by Stijn Jansen
Learn how collaborative parametric design models allow you to work together for better solutions.
A great way of automating your Grasshopper scripts is by integrating them into your applications. There's just one downside to this: you cut out the Grasshopper user from the workflow. Overall, this is not an issue in mature design phases where the script was set. However, this is different for cases in which a Grasshopper script is still subject to change. Or whenever the model used in a VIKTOR application needs to be updated through a change in Grasshopper. No worries, because we created a solution to this: Grasshopper nodes, which you can use to let users on both sides of the flow push, pull and run analysis on data.
Keep reading for some examples, including the download files to use in your own apps!
Thanks to the VIKTOR API, we can now, using a Grasshopper node, retrieve information from a VIKTOR application in Grasshopper. This information can be anything. In the example video below, you can see that we are retrieving the bridge deck geometry from the VIKTOR application and are able to use it in Rhino and Grasshopper for further analysis or design. When we update and save the bridge deck, we can simply recompute it, and the latest geometry is loaded.
Download the Grasshopper file used for this example here.
Similarly to pulling data from a VIKTOR app into Grasshopper, we can just as simply push Grasshopper data back into an app.
In this example, we are pushing data for dashboarding. Dashboarding is one of the weak features of Grasshopper. Therefore, we want to push the data to VIKTOR to dashboard it there instead. In VIKTOR, we can use the power of Python and Plotly to make a custom and interactive dashboard of the latest model.
In this example, we parametrically design a roof structure and push the data to VIKTOR. The VIKTOR application then calculates lengths, volumes and the expected carbon footprint of the structure!
Download the Grasshopper file used for this example here.
In some cases, the designer may require information that is stored in VIKTOR. In this case, you can use VIKTOR compute
to run an analysis and use the VIKTOR application as the calculator for your Grasshopper script.
In this next example, we have a simple application that uses a VIKTOR app to calculate the cost and carbon footprint of the beam. Using this app, you can make more complex calculations in Grasshopper than before! Additionally, it introduces many options for optimization in Grasshopper.
Download the Grasshopper file used for this example here.
Although this fourth example may seem similar to the second example, pushing data and pushing geometry are done slightly differently. In this example, we are showing that the user of the VIKTOR application (in this case a structural engineer) can perform an analysis using OpenSeesPy – a finite element package designed for structural engineering.
In this application, the user creates the model using the grid in Grasshopper and pushes it to the VIKTOR application. In the VIKTOR application, the load case is added to the geometry and OpenSees creates a beautiful visual of the displacements. Updating the model takes just a few seconds!
Download the Grasshopper file used for this example here.
You can also find the full application here.
These examples pave the way for many more features. As more examples and use cases are realized, we work towards creating even more seamless, collaborative tools for Grasshopper users and other domain experts. Want to try Grasshopper and VIKTOR yourself? Join our community and start building your own custom web apps today!
Download links:
Subscribe to our newsletter and get the latest industry insights