Possible solution: Use a Rhino.Commands.Command object to control the GH kernel; Cache the kernel to accelerate the command.
-
On the first call:
- Init the GH kernel, load the network
- Cache the kernel in the doc’s User Objects, to avoid the Kernel init on subsequent command calls
-
Subsequently:
- Get the cached GH kernel
- Collect the user input
- pass input to the GH kernel
- tell the GHkernel to bake the result to RHobjs
- Send the RHobjs to the RhinoDoc
@DavidRutten do I recall that you wrote a guide on essentially the same steps? If I am not mistaken, can you help me locate that note?
Other questions:
- Does my solution sketch omit any steps?
- Is the current doc’s User Objects the right place to persist the GH kernel?
Thanks David, Wim!
– Max
(Teakomatic)