I know Python won't run inside Grasshopper, but since the new Grasshopper SDK works with RhinoCommon, can I just write new components with IronPython? Or is that a ridiculous notion?
By "clean" I meant something that works purely within the .NET framework. It is in fact possible to write Grasshopper plugins that use unmanaged dlls, but as long as you stay within .NET you can be sure that it will work.
I don't know if IronPython code can be compiled into a dll (gha).
Hmm. I think this would be a good question for Mr. Baer.
But it's not looking that good (quoted from here): How do I compile .py files to a DLL for linking into my C# or VB program? IronPython does not support building DLLs for a C# style of linking and calling into Python code. You can define interfaces in C#, build those into a DLL, and then implement those interfaces in Python code as well as pass the python objects that implement the interfaces to C# code.
That looks pretty bad indeed. I think Steve was working on a Grasshopper component with the IronPython runtime embedded so it wouldn't have to compile. Steve is currently at a tradeshow though so he won't be able to respond.
One thing I do know is that Steve has been able to solve pretty much every problem McNeel has thrown at him so far so I hardly think it's a question of possibility but rather a question of availability.
That's good news. Also, the RhinoCommon SDK has an Execute method on the PythonScript class, which passes on whatever is returned by the script. If I could find a way to pass arguments in to the method, then I think I could basically make a vb.net wrapper that called on a python script. Maybe tomorrow I'll try to just call a Python module from a GHA and return the Python output to Grasshopper.
Just tried this,
but VS seems to think that Execute() is not a member of Rhino.Runtime.PythonScript, though listed in the RhinoCommon SDK.
Oh well. I'll update this if any news comes up.