Grasshopper component folder

Grasshopper component folder

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Clone with HTTPS

Use Git or checkout with SVN using the web URL.


Want to be notified of new releases in RobotExMachina/Machina-Grasshopper ?

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio

Latest commit



Type Name Latest commit message Commit time
Failed to load latest commit information.

Machina for Grasshopper

Thanks for downloading Machina for Grasshopper, a Machina-based Grasshopper package for robot control.

Download the latest release. Just as with any other Grasshopper plugin, just drop the main .gha and .dll files in Grasshopper’s Components library. Make sure to right-click on both files and unblock them if necessary. Also, if running Windows 10, make sure you have extracted the files from the .zip file with something other than Window’s native extracter, such as 7Zip, WinRAR or similar (see below for reasons).

In order to install Machina for Grasshopper, you need to follow the following steps.

Go to the releases section and download the latest version of the distributable.

Extract the contents of the file somewhere in your computer: if you are running Windows 10, make sure extract the files from the .zip file with something other than Window’s native shell extracter (the one you use when double clicking on the file or right-clicking and choosing Extract ), such as 7Zip, WinRAR or similar. Failure to do so may cause Window’s security settings to internally flag the .dll file as downloaded-from-internet-suspicious, and block it forever.

Paste these files in Grasshopper’s Components folder: open Rhino and Grasshopper, and in GH, go to File > Special Fodlers > Components Folder . This should open a Windows Explorer window in a folder of the kind C:UsersyourUsernameAppDataRoamingGrasshopperLibraries . Once in this folder, paste the previously extracted .gha and .dll files there. You are welcome to also paste the sample files there as well, or keep them somewhere for your reference.

Unblock the files: in your Components folder, right click on Machina’s .gha and .dll files, choose Properties , and make sure they are unblocked in the lower right end of the popup menu.

Restart both Grasshopper and Rhino for the changes to take effect.

There are a bunch of Grasshopper files in the samples folder that comes with this package. These files will help you understand how to setup a Machina project. I will write a dedicated walkthrough section sometime soon.

A full set of tutorials on how to use the Machina framework can be found here:

Tutorials playlist:

Instructions on how to setup your machine to work with the Machina framework can be found here:

A playlist of projects built by the community with different Machina flavors:

Machina for Grasshopper is built on top of Machina, an open-source platform for action-based control of mechanical actuators.

Machina is also available for Autodesk’s Dynamo. Their API and Actions list is 99% identical.

Here are some videos of things you can do with Machina:

Working with robots is dangerous. Robotic actuators are very powerful machines, but for the most part extremely unaware of their environment; if it collides with something, including yourself, it will not detect it and try to keep going, posing a threat to itself and the operators surrounding it. This is particularly relevant when running in ‘automatic’ mode, where several security measures are bypassed for the sake of performance.

When using robots in a real-time interactive environment, please make sure:

  • You have been adequately trained to use that particular machine,
  • you are in good physical and mental condition,
  • you are operating the robot under the utmost security measures,
  • you are following the facility’s and facility staff’s security protocols,
  • and the robot has the appropriate guarding in place, including, but not reduced to, e-stops, physical barriers, light curtains, etc.

Machina is in a very early stage of development. You are using this software at your own risk, no warranties are provided herewith, and unexpected results/bugs may arise during its use. Always test and simulate your applications thoroughly before running them on a real device. The author/s shall not be liable for any injuries, damages or losses consequence of using this software in any way whatsoever.

Want to help develop/document Machina for Grasshopper? Get in touch! 🙂

The development of Machina was sponsored by Autodesk, Inc, as part of a summer research residency project in Boston, 2016. Please take a look at the detailed list of acknowledgments

Machina was created and is maintained by Jose Luis Garcia del Castillo.

How do I install a custom GHX component?

I feel like I’m missing something obvious. I’m reading through the SDK documentation on how to create a custom Grasshopper component. I’ve created the class library, inherited from GH_Component, built the dll, and renamed it to a GHA file.

But how do I tell grasshopper to load my GHA file?

Replies to This Discussion

drag and drop the gha file onto your grasshopper window. It should install on it’s own.

This won’t work for updates yet, I don’t think. But it does work for initial install.

Permalink Reply by Benjamin Golder on February 22, 2011 at 6:05pm

Permalink Reply by Eric Anastas on February 22, 2011 at 6:46pm

It appears that dragging in the GHA file just copies the files into the following user folder:

So I assume that Grasshopper just searches these folders for GHA files to load when it starts up?

Permalink Reply by David Rutten on February 23, 2011 at 12:22am

there are three ways to do this:

1) If you’re called David Rutten and about 1.95m high you’re allowed to put the GHA file in

2) If you’re a user who wants to install a GHA file written by someone else then you should put the file in Application DataGrasshopperLibraries You can either do so manually or drag+drop the gha file into Grasshopper and a copy of it will be placed in that folder (as you noted)

3) If you’re a developer who wants to compile and test your GHA assembly, I recommend you add an additional GHA folder path to the Grasshopper loading sequence. You can do this via the _GrasshopperDeveloperSettings command. Any GHA file in any of the folders listed there will be loaded.

Note that if you compile the GHA files yourself, you’ll end up with two different ones if you use the default Visual Studio setup. Namely one file in binDebug and another in binRelease, depending on the build flavour you pick at any given time. This is annoying. Really annoying.

I highly recommend you change the default behaviour of VS to always put the compiled file into just bin This will prevent Grasshopper loader conflicts.

Permalink Reply by David Rutten on February 23, 2011 at 12:24am

ok 4) If you’ve written an installer for your GHA and insist on putting it in a custom folder (maybe next to an RHP file that belongs to the same project) then you can change the grasshopper settings xml file from within your installer. This is basically the same as adding an extra search path via the _GrasshopperDeveloperSettings command, but it doesn’t involve starting Rhino.

Permalink Reply by Eric Anastas on February 24, 2011 at 1:22am

Permalink Reply by kristoffer josefsson on June 27, 2011 at 4:42am

Permalink Reply by Danny Boyes on June 27, 2011 at 4:57am

File menu > Special Folders will take you to the location of the xml file

Permalink Reply by Karamba3D on October 24, 2013 at 3:36am

I would like to install a GH plug-in that relies on a C++ dll. When placed in the ‘Components’-folder however Windows does not find the dll.

Would it make sense that Grasshopper adds the path to the ‘Components’-folder to the Windows ‘Path’ environment variable so that C++ dlls are automatically found there?

Permalink Reply by David Rutten on October 24, 2013 at 8:47am

do not put your files in the Components folder, that folder gets nuked when a Grasshopper update is installed. Either put it in %appdata%GrasshopperLibraries or use an RHI installer* or use a custom installer and put a *.ghlink file in the %appdata%GrasshopperLibraries folder.

We will try and load .NET dlls from all sensible locations, but I don’t think we handle C++ dlls at this point. I sincerely doubt we’ll be messing with environment variables (there’s all sorts of user privilege problems there I think). If the dll you need is next to your GHA file, you should be able to load it yourself from a GH_AssemblyPriority derived class.

* I’m not entirely sure whether this will work yet for non RHP installs, but this will definitely be the official recommended method soon

Permalink Reply by Giulio Piacentino on February 23, 2011 at 2:36am

(from 7:30 to about 8:30)

[email protected]
McNeel Europe, Barcelona

Permalink Reply by Nathaniel Musial on October 3, 2015 at 8:21am

How to install Ladybug for Grasshopper

Ladybug is a free plugin for Grasshopper that uses the EnergyPlus engine to provide a range of environmental calculations and visuals for input geometry. This guide will show you how to install Ladybug.

If you are looking to install the more recent Ladybug + Honeybee components for Grasshopper, this guide will help you too.

Check you have the right software

Firstly, you need Rhino 5. Rhino 4 won’t do! You can download a free trial here .

You also need Grasshopper, a free plugin for Rhino. Download the latest version here.

Then you need GHPython. Download it, and unzip it. In GH, open your components folder:

This should open a folder in a location like C:UsersjramsdenAppDataRoamingGrasshopperLibraries . Paste GHPython.gha into this folder.

Install Ladybug

Visit the Ladybug page, take a read of it and have a look at the video. Then download the unlocked version from the page (or quicklink here). This should download a zip folder. Unzip this folder (the next step won’t work if you don’t unzip it first!).

Within the folder should be about 28 .ghuser files. Select them all and drag them directly into the GH window.

Done! To double-check, go to your GH User Object folder under the Special Folders as above (e.g. C:UsersjramsdenAppDataRoamingGrasshopperUserObjects). The .ghuser folders should be in here.

Now a new tab should have appeared in your GH window called Ladybug.

There are 5 categories of components, labelled 0-4. In using Ladybug, these are run through roughly in order.


Meshedit is a set of components which extend Grasshopper’s ability to work with meshes.

  • Mesh from points
  • Mesh cull unused vertices
  • Mesh flip
  • Mesh unify normals
  • Mesh weld vertices with threshold
  • Mesh Area
  • Mesh Volume
  • Mesh explode
  • Mesh convert quads to triangles
  • Mesh add attributes
  • Mesh extract attributes
  • Mesh find naked edges

«based on MIConvexHull by David Sehnal, Matthew Campbell»

  • Convex Hull Points 2D/3D
  • Convex Hull Mesh/Plankton Mesh
  • Delaunay
  • Delaunay Tetrahedron Polyline/Plankton Mesh
  • Voronoi Polyline/Plankton Mesh

If you find anything else useful please let us know!

  • In Grasshopper, choose File > Special Folders > Components folder. Save the gha file there.
  • Right-click the file > Properties > make sure there is no «blocked» text
  • Restart Rhino and Grasshopper

if you encounter any problems or you need help, join our discussion now:

Your First Component (Windows)

This guide walks you through your first custom Grasshopper component library using Visual Studio.

It is presumed you already have the necessary tools installed and are ready to go. If you are not there yet, see Installing Tools (Windows).


We will use the Grasshopper Assembly templates to create a new, basic, component library called HelloGrasshopper.

If you are familiar with Visual Studio, these step-by-step instructions may be overly detailed for you. The executive summary: create a new project using the Grasshopper Assembly template, build and run, and then make a change.

We are presuming you have never used Visual Studio before, so we’ll go through this one step at a time.

File New

  1. If you have not done so already, launch Visual Studio (for the purposes of this guide, we are using Visual Studio 2017 Community Edition and C#).
  2. Navigate to File >New >Project
  3. A New Project wizard should appear. In the left column, find the Installed >Templates >Visual C# >Rhinoceros section. In the central list, select the Grasshopper Add-On template…
  4. For the purposes of this Guide, we will name our demo plugin HelloGrasshopper. At the bottom of the window, fill in the Name field. Browse and select a location for this project on your disk…
  5. The New Grasshopper Assembly dialog appears. Check the Provide sample code checkbox.
  6. This is where you fill out information about your first component:
    1. Add-on display name: the name of component library itself.
    2. Name: the name of the component as displayed in the ribbon bar and search menus.
    3. Nickname: the default name of the component when inserted into the canvas.
    4. Category: name of tab where component icon will be shown.
    5. Subcategory: name of group inside tab where icon will be shown.
    6. Description: description shown in tooltip when mouse is over the component icon in the menu.
  7. For the purposes of this guide, we will accept the defaults and click Finish
  8. A new solution called HelloGrasshopper should open…

Boilerplate Build

  1. Before we do anything, let’s build and run HelloGrasshopper to make sure everything is working as expected. We’ll just build the boilerplate Plugin template. Click Start (play) button in toolbar corner of Visual Studio (or press F5) to Start Debugging
  2. Rhinoceros launches.
  3. Since this is the first time you are debugging the components, you need to tell Grasshopper where to look. In the Rhino command prompt, run the GrasshopperDeveloperSettings command…
  4. Uncheck the Memory load *.GHA assemblies using COFF byte arrays checkbox.
  5. Click the Add Folder button and add your bin output folder of your project to Grasshopper’s search path. NOTE: You only need to do this step once during the development of your component, unless you move it elsewhere.
  6. (Optional) Automatically start Grasshopper every time Rhino starts…
    1. Navigate to Tools >Options >General.
    2. In the Run these commands every time Rhino starts text area, type _Grasshopper then click OK.
  7. Run the Grasshopper command to start Grasshopper. If you don’t blink, you might see Grasshopper say it is loading “HelloGrasshopper” in the status bar of the splash screen.
  8. Navigate to Curve >Primitive in the components menus. You should see HelloGrasshopper in the list with a blank icon. Drag this onto the canvas. The component should “work.”
  9. Exit Rhinoceros. This stops the session. Go back to Visual Studio. Let’s take a look at the…

Component Anatomy

  1. Use the Solution Explorer to expand the Solution (.sln) so that it looks like this… NOTE: Depending on your edition of Visual Studio, it may look slightly different.
  2. The HelloGrasshopper project (.csproj) has the same name as its parent solution…this is the project that was created for us by the Grasshopper Assembly template wizard earlier.
  3. Properties contains the AssemblyInfo.cs source file. This file contains the meta-data (author, version, etc) about the component library.
  4. References: Just as with most projects, you will be referencing other libraries. The Grasshopper Assembly template added the necessary references to create a custom Grasshopper component.
  5. GH_IO — or GH_IO.dll — is the Grasshopper Input/Output library required to read and write Grasshopper files.
  6. Grasshopper — or Grasshopper.dll — is the Grasshopper base namespace.
  7. RhinoCommon — or RhinoCommon.dll — is the Rhinoceros .NET SDK.
  8. System, System.Core, System.Drawing, System.Windows.Forms are .NET foundational libraries.
  9. HelloGrasshopperInfo.cs contains the component library information, such as the name, icon, etc.
  10. HelloGrasshopperComponent.cs is where the action is. Let’s take a look at this file…

Make Changes

    Open HelloGrasshopperComponent.cs in Visual Studio’s Source Editor (if it isn’t already).

Notice that HelloGrasshopperComponent inherits from GH_Component …

HelloGrasshopperComponent also overrides two methods for determining the input and output parameters …

The actual work done by the component is to be found in the SolveInstance method…

As you can see, this is where the action happens. This boilerplate component creates a spiral on a plane. Just to make sure everything is working, let’s change the default plane on which the spiral is constructed. On line 1 67, in SolveInstance , notice that an XY plane is constructed…

Further down in the SolveInstance method, you will notice that the input data is being fed into this plane…

Go back to the RegisterInputParams , and find the line where the Plane input is registered. The last argument being fed to the method — Plane.WorldXY — is the default value of the input…

Change the default value of the Plane input to be Plane.WorldYZ …

  • Now let’s examine what happens when inputs are given to this component…
  • Debugging

    1. Set a breakpoint on line 1 99 of HelloGrasshopperComponent.cs. You set breakpoints in Visual Studio by clicking in the gutter…
    2. Build and Run.
    3. In Grasshopper, place a HelloGrasshopper component on the canvas…as soon as you do, you should hit your breakpoint and pause…
    4. The reason you hit the breakpoint is because the SolveInstance method was called once initially when the component was placed on the canvas. With Rhino and Grasshopper paused, in Visual Studio switch to the Autos tab (if it not already there). In the list, find the plane object. Our plane is a Rhino.Geometry.Plane with a value of …an YZ plane, the default, as expected.
    5. Continue in Grasshopper by pressing the Continue button in the upper menu of Visual Studio (or press F5)…
    6. Control is passed back to Grasshopper and the spiral draws in the Rhino viewport. Now, place an XY Plane component on the canvas and feed it as an input into HelloGrasshopper’s Plane input. Notice you hit your breakpoint again, because the SolveInstance is being called now that the input values have changed.
    7. Exit Grasshopper and Rhino or Stop the debugging session.
    8. Remove the breakpoint you created above by clicking on it in the gutter.


    Congratulations! You have just built your first Grasshopper component for Rhino for Windows. Now what?

    Next Steps

    You’ve built a component library from boilerplate code, but what about putting together a new simple component “from scratch” and adding it to your project? (Component libraries are made up of multiple components after all). Next, check out the Simple Component guide.

    Related topics


    Line numbers in Visual Studio can be enabled and disabled in Tools > Options… > Text Editor section > All Languages entry > General sub-entry > Settings subsection > check Line numbers. Click OK to close the Options dialog. ↩ ↩ 2

    See also:  What Insects Would Eat Carrots or Beets in the Ground, Home Guides, SF Gate
    No comments

    Добавить комментарий

    Your e-mail will not be published. All fields are required.