Python custom GUI component add-on to KUKA|prc?

Started by Nicholas Ziglio, August 10, 2020, 10:25:56 AM

Previous topic - Next topic

Nicholas Ziglio

Hello, I have decided to develop a solution to automate welding programming parametrically.
It would be really useful to minimize the amount of components to be created for each weld by creating a component like "KUKA|prc CORE" which has a button that opens a custom GUI.

Does anyone know how this can be done? I'd appreciate a link to any documentation for doing this in python, thanks in advance!  :)
-Nicholas

Nicholas Ziglio

Update, so apparently ironpython in grasshopper doesn't support tkinter?
I found Eto however which allows to program custom GUI interfaces for Rhino and Grasshopper. See the last section here: https://developer.rhino3d.com/guides/rhinopython/

I'm still uncertain on how to add a button on the actual component in grasshopper but I have tested it with a "open_window" bool input and that also works although less elegant.
If anyone knows how to make a custom python component with a "open window" button, that would be appreciated  :)

Johannes @ Robots in Architecture

Hello Nicholas,

Now this is not the "clean" solution by far, but just to get started, how about you make the GUI with a nice GUI library - no matter if IronPython, Python, or something else - and save the data from the GUI in a text file, that you observe from Grasshopper? So whenever that text file changes, Grasshopper updates.

The KUKA|prc GUI is done using WPF, which you can also design in a graphic editor within Visual Studio, so that is of course also an option.

Best,
Johannes

Nicholas Ziglio

Thanks Johannes! That is such a good idea, I hadn't thought of that  ::)

I'm guessing you used C# for KUKA|prc then? I don't know C# and am a bit streched for time with this project so I will probably go with your first suggestion for now if Eto doesn't work out.
Thanks,
-Nicholas

Johannes @ Robots in Architecture

Hello Nicholas,

Yes, KUKA|prc is written in C# and you could actually also run it without Grasshopper in a standalone app, we used it e.g. within Unity.

Best,
Johannes