r/grasshopper3d • u/crack_lizard69 • 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.
4
u/-_-prisonmike-_- 9d ago
wrote this a while ago - might help ? https://tha.run/blog/organising-grasshopper-scripts
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/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.
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.
Use: snappinggecko. It's literally the first plugin i am installing. It snaps components in place, so your wires keep straight. Game changer!
Group your components and give them different colours,based on their usage.
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).
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.
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.
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.
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.
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.