Grasshopper

algorithmic modeling for Rhino

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

Views: 2528

Comment

You need to be a member of Grasshopper to add comments!

Join Grasshopper

Comment by gotjosh on September 24, 2017 at 4:06am

Thanks Andrew for the starting point!

I forked this post, here:

http://www.grasshopper3d.com/profiles/blogs/toggle-wire-display-for...

here is the gh file:

WireDisplayToggle-gotjosh.gh

I'd like to know how to attach a shortcut-key to the toggle...

Comment by zdjdevil on July 13, 2015 at 9:49pm

Hi,is any way to switch the wires between "default" and " Faint"?

Comment by William Carroll on June 11, 2015 at 5:09pm

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.

Comment by William Carroll on June 11, 2015 at 5:02pm
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...
Comment by Gui Talarico on June 11, 2015 at 4:21pm

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

Comment by Andrew Heumann on June 11, 2015 at 2:15pm

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

Comment by Andrew Heumann on June 11, 2015 at 2:15pm

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

Comment by William Carroll on June 11, 2015 at 10:23am

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!

Comment by Andrew Heumann on June 10, 2015 at 11:41pm

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. 

Comment by William Carroll on June 10, 2015 at 2:41pm

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!

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service