Wire Display Toggle Switch

There is an ongoing debate in my office between those who like to organize their definitions with hidden wires for the sake of cleanliness, and those who hate them because it makes definitions hard to debug. In order to sidestep any drama, I made a little script that lets you switch all the wires in a document between "Hidden" and "Faint." It will leave all wires set to default alone. 

Download it here: WireDisplayToggle.gh

  • David Rutten

    I'm squarely in the 'hate hidden wires' camp myself. They're a terrible solution to the spaghetti problem.

  • Andrew Heumann

    couldn't agree more!

  • Thibault Schwartz

    Well, hidden wires are a pain in the ***, except if you properly use "proxy" parameters to cleanly decompose your definition into small, intelligible functions (that eventually can become clusters or custom components), with proper naming, typing etc.

    I am using this method for several years now and this is also the one I teach, and I think that it is (to my knowledge of course) the most readable and robust solution to use GH for both small and big projects. In fact, this way of using these hidden wires + local parameters is a straight translation of what we do in text-based programming when we specify arguments (the hidden wire can be considered as a pointer). I also use also a simple color code to simplify the visual rendering in GH: color=input, black=output, white=process. And when a process is only for display, it's grey. When it's a cluster, I mark it as a blue element, which means "waiting to be compiled" ;).

  • Thibault Schwartz

    When used:

  • Rémy Maurcot

    Hi Andrew,

    it's possible to add a function for convert defaut wire on faintwire ?

    Thanks

  • Andrew Heumann

    Yes, it's possible. But it sounds like a terrible idea to me so I'm going to be difficult and leave it up to you to modify the script :)
  • Rémy Maurcot

    Thanks.

  • Pablo

    i think the wires should always accommodate themselves for simple reading, similar to puredata 

  • William Carroll

    Forgive me for such a beginner question, but if I were planning on 1. installing this component and 2. modifying the script, how would I accomplish these tasks? Do I need to install the WireDisplayTogge.gh as a UserObject? I have tried double-clicking the component so that I could view the script but, alas, that didn't work.

    Anyways, thank you for this, Andrew. I have found most of your GH components to be indispensable for my GH workflow, while in a professional environment (i.e. not just in academia...). Thanks!

  • Andrew Heumann

    Hi William - if you want to save the object as a user object, you can select it and choose "Create User Object" from the file menu. If you want to edit the code for the script, right-click the name (where it says WDT) and choose edit source. Double-clicking the component should also work. 

  • William Carroll

    Thanks, Andrew. The "Create User Object" method worked just fine. I am still lost when it comes to editing the source code. I have re-downloaded the *.gh file and tried double-clicking it, and for whatever reason, the code C# editor won't display. This is bizarre since it has worked in the past with similar components...

    ...right-click the name (where it says WDT) and choose edit source.

    Surely I must be looking in the wrong location because I can't seem to find 'WDT' anywhere as an option. Again, forgive me if any of this is painfully ignorant. I am a beginner when it comes to GH development, but I do have a few years of experience programming. Hopefully I can learn the idiosyncrasies of Grasshopper so that I don't keep getting in my own way... Thanks again!

  • Andrew Heumann

    ahh - you've got icon view on. Try double-clicking the icon - double clicking where it says "showfaintwires" won't do a thing. 

  • Andrew Heumann

    same for right clicking - it matters where on a component you click. 

  • Gui Talarico

    Very Nice.

    Personally use a mix of all 3 types (but mostly default+hidden),

    but whenever I do use the "hidden", I pass the data through a labeled container on both ends (sender end receiver) to make debugging easier

  • William Carroll

    While we're on the subject of wire management, is there a way to connect one component to another without click-dragging the wire? For instance can I select both components, right-click, and choose "connect components"? This may sound like a quibble, and surely it is, but when definitions begin to occupy a lot of real estate on the canvas it becomes increasingly harder to connect components. I understanding that it would be difficult to implement since many components have multiple inputs and outputs, but maybe there's a simple spluton available. Just a random musing since GH2 is under development...
  • William Carroll

    Just to followup, if you haven't noticed, it is impossible to pan around the canvas while you're click-dragging, so my usual workaround has been to zoom out/in until I reach my destination. Is this the typical solution to connecting far-away components? I imagine that one could click the "nub" of the variable to be input -- it becomes active (maybe it glows) -- and then their mouse is free to pan, zoom, etc. until they reach the other component where they can click the desired nub for connection. Et Voila! But, this might be simplistic and it is definitely unnecessary... but interfaces like Grasshopper's already accommodate multiple mean to achieve the same end.