PigeonPost, The initial plug-in idea for adding parameters to Grasshopper

I love the popup search in the Grasshopper, I almost always use it in order to add any components, especially the shortcuts it provides us to put Sliders, Math operators and adding Point parameter.
The simplicity of the popup search has made it seem harder to work with other parameters. There are lots of situations on which I want to add a curve onto the Canvas from the Rhino:

  1. Adding a curve parameter.
  2. Right-clicking and choosing the set one curve option.
  3. Selecting the curve
  4. Internalizing the curve
  5. Deleting the curve in Rhino.

The popup search could have had more shortcuts for other parameters. I wanted to suggest adding more shortcuts for different parameters, but memorizing these shortcuts isn’t easy to do even right now. For that, I thought What if the popup search could have run Rhino’s commands?

It looks like that there is no way to have direct access to popup search events, but the InitCode ability can give a component the ability to receive some part of the text (inputted after the ‘=’). Since it was necessary to use the equal sign, I thought it is better to use “]” as an alias. So it is enough to operate the Macro, using [=RhinoMacros format. This component will put in any Geometry that is generated, as an internalised parameter.

There is no requirement to write the Macro completely; alternately, one can write a simple command then complete it in Rhino Workspace. When the command is done, we can get the outcome in Grasshopper.

The Rhino commands may be good enough for producing parameters containing Geometry, but it is not proper for other kinds of data types. That’s how I realized it could be useful to run python commands using a similar approach.

In my idea, the most logical alias for this purpose is “a”, so whatever we code with a=PythonCode format, the result will get in the Grasshopper as a parameter. I thought the rhinoscriptsyntax, Rhino.Geometry and ghpythonlib.treehelpers modules would suffice to use.
Then I thought the user will be needing to get autocomplete suggestions here. So I added this ability so if InitCode isn’t used after “a=”, a text editor would come up and help you out.

In the ideal condition, it would have been better to be able to give suggestions directly on the popup search.
In the end, I thought even the reverse process might be useful to be done. What I mean to have a command in Rhino to give us the ability to select the objects, and send them to the Grasshopper as parameters:

This way we could add a NickName for our parameters, and determine whether the object gets to the Grasshopper as a referenced or internalised geometry. We can also determine the type of the object, if we select plenty of objects, this command tries its best to find a common type. Furthermore, the autoClassify gives us this ability to receive the chosen objects according to their type on the basic parameters (Curve, Surface, Brep, Mesh). And oneByOne gives us this option to add any object in it’s simplest form onto the Grasshopper. Rhino doesn’t have a command starting with “x” so I think that the command xGrasshopper can be easily found.

I’d be so happy if you give me your opinions and suggestions on these plugins. I would put the installation files here, these files are compiled for Rhino 6.4.18124.12321. These files have not been tested, so you can try them at your own risk. Unfortunately at the time being it might cause a problem for Undo command on Rhino
PigeonPost.gha (37 KB)
PigeonPostRh.rhp (49.5 KB)

Looks useful , thank you
Share it in facebook grasshopper group

1 Like

I just saw this topic.
Very useful plugin!!