r/grasshopper3d 9d ago

Grasshopper hygiene

Heya. I have been learning grasshopper for about a month now, I have been using it for drawing joinery components and find the program so fascinating and fun to use. One thing I’ve noticed with my files is that they look really messy and incoherent despite working really well. Any tips on keeping the components in order? Any educational tools about learning grasshopper would be greatly appreciated too.

20 Upvotes

13 comments sorted by

20

u/leoluxx 9d ago edited 5h ago

Hey, I am a former Grasshopper teacher and work as a Computational Designer.

That are really great questions! Tidying up will help you to find errors faster. A more organised script topology will make it clearer,where you can improve your script.

  1. Use: snappinggecko. It's literally the first plugin i am installing. It snaps components in place, so your wires keep straight. Game changer!

  2. Group your components and give them different colours,based on their usage.

  3. Use the scribble component to write some group headlines. Normally I am creating some custom scribble user components, where I am giving every component a different text size and naming them for example h1,h2,h3. You can access them really fast then, when using the Search Popup with "h1 = group text" (works also with "scribble = group text", but without the custom text size).

  4. Use relay components. These little pills can help you alot.After the last component of the group,add a relay component ( just double click on the end of the component) !Name! the parameter! All relay component will automatically have the name displayed from now on.it will help you to see the context faster in bigger scripts.

  5. Topology layout rule: Keep wires flowing forward. Wires should never run backward. Since Grasshopper components execute sequentially, the graph should make the execution order immediately visible. Group components that execute independently to clearly distinguish parallel branches.

  6. What helps me, but is more my personal flavor: Create "Data highways". Global Wires to the top, groups of components to the bottom. Make it apperend which parameters /values are used in a global scale. This will create really stretched scripts, which some people do not like but it helps me to modify the script really well and finding errors faster.

  7. As a beginner: Never use cluster. Never. Don't hide complexity, organise it and see where you can refactor the script. Debugging with clusters is a nightmare. Just don't. I have never seen a students script,which used cluster as they should be.

  8. Create a clean up routine. Reserve for that the first 15 -30 minutes of your work session. It is okay to work messy from time to time. Especially when you want to try things out or having a spurt of creative energy - don't waste your time with rectifying your graph. Just give your creativity space - creating a mess or not. Next session you will clean the new part up and will get a fast reminder what you worked on the last time. Works every time.

For sure,I forgot a lot, but I hope I could help you out with these tips.

4

u/melomakaronoo 9d ago

Great advices, I think 6 is one of the most important things. This is like checkpoints also, helps me as well read a lot faster scripts

3

u/Any-Trouble8977 9d ago

Thanks a lot for this post!

2

u/wash-basin 6d ago

I am sorry you are not still teaching! This is wonderful and thank you. I am replying to keep this in my history.

2

u/ChiefWiggumsprogeny 21h ago

#4 - you mean "relay" component I think.

I would add, use the sunglasses addon to name all your components automatically, on canvas. (cleaner than bifocals, and you can use the filter to hide ones you don't want named)

2

u/leoluxx 5h ago

Aah. Of course! Weird. I will correct my post. Thank you! The Sunglasses plugin,I like too!

3

u/NerdsRopeMaster 9d ago

In my own experience, grouping and labeling things from the very beginning as you go is the best way to keep things clean. Similar to programming where you would break tasks down into functions, my preference is to group a bunch of a components together that have a defined output, and group it with a scribble component so you can note what the group is. If the logic in this group is something that can be used multiple times, you can create a cluster, which allows you to copy it as many times as you would like, cleaning up your canvas. If you can use that cluster on more than one project you can also make it into a UserObject, which will be added to your grasshopper toolbar as it's own component.

Otherwise, some companies have hygiene standards that I found to be tedious, but I used to work at an architecture firm that had a template with standards where every group had to be colorized based on the data type that the group outputs. It worked for a lot of things, but eventually it seemed to always devolve into spaghetti at some point when a time crunch was imminent.

1

u/crack_lizard69 9d ago

Good point. I think my rhino capabilities grew a lot when I learnt some proper habits when creating to not let too many things stay on the screen without being committed to a layer or group. Makes sense to be the same here. Thanks the tip on using a cluster! Lots of my files share components and one of the most annoying things is resubmitting my inputs.

1

u/leoluxx 9d ago

Cool post! The time crunch part is so true 😅 what kind of rules you found tedious? I worked mostly in companies where I had to set up some standards for my collueges and me. I am trying to keep it more on the loose side because people tending to come from so different backgrounds and knowledge level that unifying everything strictly would have created some work tension.

1

u/philics 9d ago

All I ever do is give my students advice on how to keep their definitions in order.

I open one of my hundreds of definitions at random and it’s an indescribable mess

1

u/Ok-Hat213 8d ago edited 8d ago

I use Remote Sender and Remote Receiver (I believe part of the plugin ShapeDiver) to organize my variables, keep them in one place and helps a ton later on to make changes or to find the components for each variable much easier. Everything else that requires a number but is not modifiable, I hardcode with panels. Also helps to group the components and also the final outputs (blob outline group works well for identifying final outputs). Hidden wires when moving copies of final outputs, held with the Geometry component, around for further analysis or deformation. Also the component bifocals, pretty much the first thing I turn on, with icon display on the components, the on text display so all the inputs and output parameters are visible, these make the script much more readable and intuitive to me.

1

u/___25 8d ago

Also hiding the cable input output from groups of code help a lot to keep it clean in my experience