The project template to deploy a Speckle<-->Rhino.Compute workflow and all of the documentation necessary to cook this cake.
The example in this project uses Speckle to panellise a Wall according to custom Revit parameters that control a Grasshopper definition running on rhino-compute.
To test it, follow the instructions below.
- Revit 2022 / 2023
- Speckle server / account
- A deployed Rhino Compute Server
- A Fly.io account
Speckle Revit Plug-in Installed.
A bot account and its token.
Fly.io account
- Install Lunchbox plug-in (or any required to run your gH definition.
Use example.ghx as a template. Always save as .ghx
- Clone this repo
- Add your .ghx script
- Adapt main.py and fetch.py for the correct stream link + gHscript
- Generate requirements.txt
pip install pipreqs
pipreqs <your-project-dir>
-
Install fly
brew install flyctl
(mac)powershell -Command "iwr [https://fly.io/install.ps1](https://fly.io/install.ps1) -useb | iex"
(windows) -
Authenticate to your account:
flyctl auth login
- in terminal:
cd <your-project-dir>
flyctl launch
- pick app name
- choose region
- Make the changes to the newly created
fly.toml
:kill_signal = "SIGUSR1”
kill_timeout = 300
- before
[env]
, place:[build] builtin = "python" [build.settings] pythonbase = "3.9-slim-buster"
[env] PORT = "8080"
- Deploy your app -
flyctl deploy
- Wait until
deployed successfully
- Create two streams and add
computebot
as a collaborator:- Where you will send your geometry:
Send_to_Compute
- Where you will receive your geometry:
Receive_from_Compute
- Where you will send your geometry:
- In
Send_to_Compute
go to Webhooks>New Webhook:- URL: https://
<your-app-name>
.fly.dev/webhook - Events:
commit_create
- URL: https://
-
Create the shared parameters that will be inputs to your gH definition. In this example:
- xdir =
Float
- ydir =
Float
- xdir =
-
Set
Receive_from_Compute
to Auto-Receive -
Send your geometry (with parameter information!) to
Send_to_Compute
You can use ngrok
as a webhook mirror to your apps local address.
- In terminal:
ngork http http://0.0.0.0:8080
- Set your Speckle webhook URL as
http://<your-given-hash>.ngrok.io/webhook