Call Rhino API by using Rhino.Compute

I posted a similar quite a while ago, but now I think I have the knowledge to fully dive into it.

I have developed a Rhino Plugin in C# that takes a brep as building envelope and then calculates building costs and estimated carbon values for different inputs (material, grids, …).
Now I want to implement that in a WebApp.

For that I created a WebApp with Vue.js that generates all the input the Plugin needs.

The normal approach for me would be to put the main function of my Plugin into an Http method of an ASP.Net Core Api Controller, send the input as a JSON-file and then visualize the results in the WebApp (using Three.js for the geometric results).

Of course this is not possible when I use intersections and so on, because Rhino is not installed on the server, so this would be in my eyes a perfect use case for Rhino.Compute, wouldn’t it?

Could anyone help me out if this is possible in that manner and what steps I need to take make API calls that embed Rhino functionality?

I really would be very thankful!

This sounds like an excellent use case for Rhino.Compute!

You should take a look at this example: rhino-developer-samples/compute/cs/ComputePlugIn at 7 · mcneel/rhino-developer-samples · GitHub

Is shows you how to expose your plugin functions as endpoints for Rhino.Compute. Here are a couple of important parts: