Download this FREE Grasshopper Template!
Grasshopper definitions can become messy and difficult to understand, as they can quickly go from few components to hundreds of them. In this video tutorial, Edwin Hernandez, Lead Computational Designer at ShapeDiver, shares "3 Reasons Why Your Grasshopper Definitions Should Be Clean & Documented!"
1. Future-Proof Your Work
This simply means that when we look back at the duplicate grasshopper files, we can understand, in an instant, what was created and how it was created. And for this to be achieved, the ShapeDiver team has created a template here. This template includes a convenient list of elements that help in organizing your grasshopper definition quickly and easily.
These elements include "Parameters," which mainly control the entire Grasshopper script. Primary groups, Inputs, and outputs also are classified as elements in the template.
We then have an element called Exports, which is critically important when working on cloud applications like ShapeDiver. A separate element called "Display" includes components that help visualize the script, which the user will ultimately see in the viewer.
Local testing suggests the components are currently unsupported by ShapeDiver and need to be deleted later on before uploading. Lastly, "Ready to Organize" and "In Progress "elements help in the definition stage of a particular script. Here we have an example file organized using the different elements present in the template.
2. Debug, Edit, Extend
Modularizing your scripts and dividing them into smaller modular groups helps quickly iron out potential bugs without more significant impact to the overall larger definition. By working and dividing the more extensive definition into smaller sub-groups, we can easily reuse, move around, easily extend them or find the bug and focus our efforts on fixing it in that particular independent smaller group.
3. Collaborate & Receive Support!
If you work in teams, the last thing you want is your team to spend hours just understanding what you intended to do with the definition. Naming and, if needed, providing appropriate subtitles to groups and subgroups making it easier to locate and find things quickly.
Furthermore, color coding components are crucial to impart greater understanding to the overall script. Blue coded are inputs, and the green coded ones are outputs. Greater understanding regarding color coding can be looked up in the template file.
Bottom Line
We hope that these three reasons motivate you to keep your Grasshopper definitions clean and make it possible for you to document them easily. This will help your peers and help thousands of users when you decide to host your Grasshopper file online on ShapeDiver.