This repository makes it possible to run Grasshopper definitions through a local Rhino-Compute instance.
This can be extremely useful to execute definitions very quickly, automate Grasshopper workflows, or integrate Grasshopper scripts into existing workflows. ππ±
To run your own Rhino Compute instance and start executing your Grasshopper definitions locally, follow the guide below:
- π» Windows PC
- π¦ Rhino 7
- π Python =< 3.10
- Download and install the Hops plugin for Rhino here
- Clone this repository and install the virtual environment using Python =< 3.10 (Rhino libraries are not yet compatible with Python 3.11)
- Edit your Grasshopper definition so that the Hops 'Get components' are connected to input and output. They can be found under Params Tab > Util Group
- Modify the Python code in this repo to match the inputs and outputs of your Grasshopper definition, and update the hardcoded paths
- Ensure that Rhino and Grasshopper are open (it is not necessary to open the Grasshopper definition you want to execute)
- Run the
main.py
script to execute the definition through Rhino Compute π
This solution opens the door to many exciting possibilities. With this method, you can integrate Grasshopper into existing Python workflows, call Grasshopper instances on a remote server from a client app, or easily automate complex workflows with multiple Grasshopper files. Happy coding! ππ