Can the 'Wires Renderer' Plug-in Be Made Native?

Hi! I’m a big fan of the wires renderer plugin (many thanks 秋水!), it makes my canvases look organised and it is easier to maintain overview. It doesn’t seem to load correctly in Rhino 8 and I understand it has something to do with .NET framework or Core not matching with the plugin’s build. Now my script looks like chaos in Rhino 8. Wondering if the wires renderer can become a native function in Grasshopper? Would be a fantastic future feature :wink:

Rhino 7:

Rhino 8:

https://www.food4rhino.com/en/app/wiresrenderer

Just be aware that this feature can only work if you patch Grasshopper (during runtime). I agree, that this is a great feature, but also be aware that using such plugins is risky.

Hi Tom thanks for your message. I agree and I try to minimise third party plugins as much as possible. Therefor a native solution would be a big plus.

100% agree, I made a similar thing some years ago where I gave each wire a unique color and replaced the bezier wires with polyline under certain condition. This is why I know whats possible. Essentially the difference to a normal plugin here is that it doesn’t only add features, it modifies the original code. This can not only cause problematic side-effects on each new GH version, it is essentially also typical behavior of malware. You cannot trust that McNeel is checking plugins properly.

i have installed rhino8 in a new machine and for some compatibility reason wire rendered plugin is not longer working, my massive defintions are now looking like spaghetti monster once again and i am very frustrated.

I wonder whats keeping mcneel form making something similar as a standard feature … i remember asking for this several time and a i can see many other users are asking the same.

@TomTom have you tried this ? does it have same potential “safety issues” as wire renderer ?

https://www.food4rhino.com/en/app/straight-wire?lang=it#downloads_list

Whenever the application interface does not allow you to modify something, you can only modify the application itself. This can happen during Runtime in memory or on the binaries itself (“to patch software”). This is highly problematic (as already mentioned).

In Grasshopper, the rendering of wires is not something you can override for all components. You can only override them for your own custom components. And because of this, it would require you to patch the rendering function of the default components attribute class. So any plugin providing this feature has to modify Grasshopper (in memory). Is this a concern. Yes, I think so.

The actual problem you have, is that you obviously have to deal with spaghetti definitions. A better solution is to use scripting here. It would a neat feature to override wires, but overall its not a critical feature. It rather reminds you to refactor definitions constantly.

You should always ask yourself if you need a certain dependency. What can go wrong? What is the cost for the features? You have to trust the developer about the skills and the required care. If you patch software doing runtime, who know what else is being patched. You can of course download whatever you like. You just need to be aware, that you might install malware. But in the end, you can’t trust anyone. You can only minimise the risk.

I love Wires Renderer and experienced the same thing (not working recently). So I vibe coded an emergency solution. This is not as good, but it will cleanup the spaghetti temporarily. Put it in your Components folder and it will be in the Display tab.

WiresElectricRenderer.gha (19.5 KB)

@TomTom Very clear explanation , i appreciate , it all makes sense.

I will keep practising with C# scripting and try to replace as much GH as possible with it. cheers

thanks @declan i will give it a try for sure. cheers

back to spaghetti monster…sooo disapponting :tired_face:

Didn’t work for you? Here’s what I see:

HI Declan and thank You very much for asking , i think you did a remarkable job and yes, of course i gave it a try. it works !!! , only 1 thing to report is that wires we doubling when adding relay …i usually make wide use of relay , this is what happen…

this added to above experts concern on patching the software lead me to the very hard decision to switch back to the horrible spaghetti monster …

being the defintions i am working on very massive and hard to maintain i decided to go back to spaghetti style to avoid introducing potential buggy behavior.

that said i really appreciate your support and i wish i could make something like that , cheers buddy

@DavidRutten : sorry to bother but going back to spaghetti has brought me back to the unmissed past.

some of the projects i have been working on were turned from unreadable mass of wires to very ordinate and clean projects thanks to the use of the discussed ( and not longer usable ) “wire renderer” plugin.

I was super happy with it, the new look, the meintainance and the scalability of the project were now easier than never before.

I think that to add some chance of customization for the wires routing isn’t just an added value but a must to this point also on GH1. We all will be using GH1 for a long time before switching to GH2 and many projects will never be translated in GH2.

Isn’t really possible to do something on the native code to allow switching from those bulky bezier like wires to something straighter , cleaner and more compact such as straight polilines at least?

thanks if you’d ever consider fulfilling this request if you ever can. regards.

This is an interesting solution. Great! Thank your for sharing the sources. It can modify the rendering by subscribing to the “GH_Canvas.CanvasPrePaintWires” and
“GH_Canvas.CanvasPostPaintWires” event. It essentially removes the existing handlers and injects their own. It however requires quite a lot to be replaced and quite deep understanding of the Grasshopper source code. Its technically seen not patching, but it alters the default behaviour in a very odd way.
I wonder if these events existed in Rhino 6?! :smirking_face:
Interesting. Yet what, I’m saying is not untrue. I can only warn for using dependencies which modify default behaviour. But this is a less invasive hack. All this expert knowledge, seems to prove pointless with AI nowadays… :see_no_evil_monkey: