Grasshopper Functions 2.0

⚠️ A few words of warning ⚠️

Using the new Grasshopper plugin will remove the old one from your Rhino — they are incompatible. You can always go back to the old version if needed — both are on the package manager — but you will find it hard to work on old Hypar functions built using the old version.
If you have the ShapeDiver plug-in installed, you might run into some conflicts — either uninstall the plug-in or remove Newtonsoft.Json.dll and AWSSDK.Core.dll from the Shapediver plugin folder (see here for more details.)


To get started using the new version of Grasshopper functions on Hypar, run the PackageManager command in Rhino (if you're in Rhino 6, use TestPackageManager — it might not look like it's there, but it's there - just type and hit enter.)
Search for Hypar, pick hypar-elements-for-grasshopper, select the latest available version, and click Install.
notion image


Let's create our first function!
Launch Grasshopper. Open the Hypar menu to log in:
notion image
Sign in with your Hypar credentials, and then open the Hypar menu again. Choose "Open Hypar Panel...":
notion image
Choose "Create a new Function" in the Hypar panel:
notion image
A new browser window should open to guide you through creating a function.
At this point you should see a wizard that looks like this.
notion image
Supply a name and a description for your function. On the next step, set up 3 "Range" inputs for Length, Width, and Height:
notion image
Click Next three times until you're at Step 5: Logic.
Click Publish Function, and then click the Copy To Clipboard button:
notion image
Return to Grasshopper, and paste the ID you just copied in the window. If for any reason it's not open, choose "Work on Existing Function" to reopen.
notion image
Click Set up function to proceed.
Two new components should show up on the canvas:
notion image
Add a Center Box component, followed by a Mesh parameter, and wire it up like so:
notion image
In the Hypar Panel, choose "Publish Function to Hypar." You'll be prompted to save the definition.
notion image
Then choose "Test function on Hypar," and pick "Create a new test workflow":
notion image
Give it a name, and choose "Create and open in browser"
notion image
A new browser window should open up with your function in a Hypar workflow:
notion image
Congrats! You've made a Grasshopper function on Hypar! Take a look at the links below to learn more.
Creating Elements
Connecting to other functions
Debugging your function
Working with instances
Grasshopper 2.0 FAQ