From GH1 to GH2 - Parametric Robot Control in Grasshopper 2

Hello All,

In case that is interesting or relevant to anyone, I just brought PRC (Parametric Robot Control - our experimental version of KUKA|prc) from Grasshopper 1 to Grasshopper 2 and tested it within Rhino WIP.

Considering there are many components (e.g. every robot in the library as its own component) I mostly let Claude Code do the heavy lifting. With some provided context that worked really fine and I was done in half a day. I assume that will get easier and more reliable with more GH2 code references in the future - for now I had to provide most references as context in a separate folder and it was able to quickly find examples to integrate features. The only interesting issue were some “stubs” - .cs files where the structure was complete and they showed up as components - but the Process() method was completely empty. But in a subsequent prompt it identified them and also translated that logic to GH2.

That being said, that cannot be fully generalized as in the new PRC, the core calculations take place in a separate server that communicates with the client (GH1, GH2, but could be nearly anything from Javascript to Python to C++) via gRPC. So the complex logic did not have to be ported (though the basic Rhino stuff stays mostly the same anyways between RH8 and RH9/WIP).

For now it’s a nearly 1:1 translation of the GH1 plugin and works nicely on both Windows and macOS within Rhino WIP. For the future it will be nice to see how we can leverage GH2 features to go beyond what is possible in GH1.

If anyone wants to give it a try, take a look at https://prc.robotsinarchitecture.org/ - there’s some documentation and a link to the download.

Feedback is very welcome!

Johannes @ Robots in Architecture

5 Likes