Plug-in architecture

Hello,

I am trying to write a few plug-in for Rhino, but before doing so I want to figure out what kind of software architecture should be implemented. I don’t have too much exprience in software develompment.
My plan is to write more plug-ins over time and some of them should communicate with each other. At least I know a couple of those plug-in will interact with all of them. What kind of architecture do you implement in Rhino? Microservices? Microkernal? and how should I organize plug-ins for it.
I would like to read your exprience and advices.
Thank you.

These plugins typically run local, and don’t need networked architecture like microservices.
When common functionality is shared between plugins, I would go for a common library that is used by each plugin. We use this approach for a suite of about 15 plugins and 10 grasshopper add-ins, and it works pretty well.
If you’re using RhinoCommon with C#, there is an example here:

1 Like

You can also look at the code for the Raytraced and Rhino Render plug-in RhinoCycles to see how it is created: GitHub - mcneel/RhinoCycles: The Cycles integration plug-in for Rhinoceros 3D . There is a common library here too, as the Raytraced and Rhino Render parts actually are presented as two separate plug-ins, but use the some core code. The plug-ins are RhinoCycles, which provides the Raytraced viewport, and RhinoRenderCycles, which gives the Rhino Render engine. The core code is in the RhinoCyclesCore library.

A couple of weeks ago I started a live coding stream series on creating a plug-in Live Coding Rhino - YouTube . Feel free to watch it and join future streams as we work on implementing a whole bunch of functionality.

Addendum: as a result of the live stream there will be literate documentation, which will essentially automatically update as we progress from episode to episode. The (at the moment ugly) index to the doc is at https://jesterking.github.io/rhics/. This will grow into a whole book-like document. The code for the live streams plug-in is at GitHub - jesterKing/rhics: Literate Programming Rhino C# Plug-ins..

3 Likes