Feature Request: Search for Components from GrasshopperDocs in gh canvas

Hi all,

I am writing to request a feature enhancement within the Grasshopper canvas to search for components not yet installed but available and listed on the Grasshopper Docs website. Would be great if someone with more tech skills would be able to create such a feature.

Background: Currently, the Grasshopper Docs (@Robinicks) website provides a comprehensive resource for over 10,000 components across more than 150 addons. While the site has a useful search feature for end-users, there is no direct way to programmatically access or query this search functionality from within Grasshopper.

Benefits: The search process can save time for users who frequently look up or find components by name, or get inspiration from unknown components by guessing a component node based on needed functionality.

Implementation Attempt: I tried to implement a simple Python node (R8) to look for components using web scraping. While this works, it crashes the browser window and sometimes Rhino after some time. If you want to check my approach, please be aware of potential crashes. :wink: Make sure to change in python code the path to your python venv. and I also had to install Selenium library and ChromeDriver to make this work

Thank you for considering this request.

EDIT: remove the files, as it was obsolete and crashes browsers

1 Like

Hi, this is really great.

Have you considered using the raw data feeds? You can build your own search functionality.

The feeds are machine-generated and up to date.

This is what I’m using for the search functionality - http://grasshopperdocs.com/feeds/searchBar.json

1 Like

I was going to suggest this as well, parse the json, return the results as a scrollable list of strings and on enter open the URL for the search result that corresponds to the selected entry in the default browser.

Or something along those lines.

I personally wouldn’t use this as a workflow as then you still need to install the package or gha and then you end up with all sorts of plugins being used when you could be using native GH components.

Not saying there isn’t a use case. I just would consider collaboration and interop with multiple plugins.

Maybe the search UI by default returns vanilla GH components only but if the vanilla results are none and it finds a matching search in the GH docs, then it shows that as a result with a little icon next to it indicating it’s 3rd party available extension.

So rather than having 2 separate searches (vanilla GH and GH docs)

You have 1 modified search showing both results but differentiating between the two with an icon

Hi, I still don’t see the benefit. Why wouldn’t you use the website for the search? You cannot and you should not load a component on the fly into GH anyways. It is really bad practice to install a dependency for 1 or 2 features. I see so many people installing 30-40 plugins and then wonder why the system gets broken. Given that all the tools are safe to use in terms of security, there is so much amateurism in GH that you likely introduce hidden problems. With each plugin in use, you also make it harder to share and you reduce the lifetime of your script (Given that plugins might not update or break on newer RH/GH versions).

Other than that, I would not scrape on the fly. You could scrape the information once and use only the scraped data. Better would be using public api if that is available. Why should people install heavy things like the Selenium Webdriver. Especially if you need to re-install a newer version for each browser update. Not to speak if scraping this information might be borderline in a legal way. In the end you install a lot of tooling for transferring functionality into another window, because this is what is in the end.

1 Like

extended it a bit, now includes search with provide summary as well. And include a boolean check to toggle all matches and those not yet installed as external libraries

Search_GrasshopperDocs.gh (10.9 KB)

Hi @TomTom ,
i agree that over the abundant use of external libraries in not per se a good habit, especially since there could be a overlap in similar components by multiple libraries (for one, I have 4 libraries installed that all ‘cull duplicated lines’ ). But then again, vanilla gh has it limitations and so many great components exists that sometime make life that much easier, especially if your not sharing files. PS: I skipped the dependency of external library Selenium library and ChromeDriver, didn’t know there was a json file

Yes, one can go to food4rhino or Grasshopper Docs, but just thought would be nice to have it inside the scripting environment.

Let me give an example, say you wants to do something with Perlin Noise. Can be a challenge to script from scratch, let alone in a method that is fast especially if one is not skilled in C# or python. Perlin gives many option of Food4Rhino, but ‘null’ when searching on Grasshopper Docs turned blank, as it only scans for components names. So I added the option now to include search the summary text as well. If people find it usefull great, feel free to use it. I am also not sure how and if I will use it :wink:

@Robinicks I am not sure how to parse your json file whithout downloading it
@Robinicks the Perlin Nosie was just a random trial, but I notice that libraries Tundra and Noise | Food4Rhino are not on your site. Do you add them manually or scrape food4rhino and add them automatically?

1 Like


Flag on the play. No.

By that reasoning, why install any third party plugins at all? In order to test whether they work for the user, the user needs to try them out. It might then be good practice for the user to uninstall plugins that aren’t necessary or immediately wanted, but you must not forbid it.

One reason is food4rhino.com looks kinda fake and unofficial.

On the other hand, I agree that I’d be concerned if a plugin search within Grasshopper were interpreted as an endorsement of that plugin (or a guarantee of its functionality) by Grasshopper/McNeel if it really isn’t. We see endless posts on the forums and tons of consternation about potentially great plugins going sour as Rhino gets updated.

I’m not arguing against plugin usage. Don’t get me wrong. I do use dependencies in my software projects as well. But from experience I do know that any 3rd party dependency is a potential project risk. The number of dependencies with high value is rather small and you should carefully select those and always review if you really need them. I see the problem with people who cannot code or those who are lacking basic knowledge. Those people are extremely inflexible, but instead of motivating people to install whatever is available, I would always motivate them trying to replace as much as possible with own logic. You’ll learn a lot by doing so, and then you often find simpler and better suited solutions.

I do mean http://grasshopperdocs.com/ not food4rhino.
All I’m saying is that this website already provides you with a search, and I’m seeing no advantage in moving this directly into the GH canvas.