Trying to get started with grasshopper and scripting using C#. There is not a lot out there for this topic. The documentation provided by rhino seems useless, referring to the grasshopper SDK and others. They describe the component but not its parameters. How is someone meant to know how and what to impute in to the component to make it work? Any advice on this matter. This all came to be as I was trying to create simple geometry but due to the lack of information was unable to extrude a circle.
I’m not sure exactly what you’re looking for, but here are a some suggestions:
Google “Rhino grasshopper tutorials” and you’ll find lots of tutorials to get you started
If you right click on a component there is a help item that will give you some information about the component inputs.
If you want to write a C# script, you need to setup you input and outputs, then edit the script (you’ll probably need the Rhinocommon API reference to do any geometry manipulations)
Thanks for the reply. They question is purely about grasshopper C#. Which there is a lack of information for. The API information is useless, as mentioned before. How can you extrude a line with C#?
What I did not know in the beginning is the fact that you do Rhinocommon.
Grasshopper is simplified seen “just” the visual editor around Rhinocommon. When writing GH-C# scripts you hardly access Grasshopper.dll. So everything you need to know is C# and the Rhinocommon api, just as the others said.
With this information you will notice the documentation is very detailed. Rhino has one of the best documentation of an api out there. Furthermore there are tons of examples in this forum and on google. However if you don’t know much about C#, this doesn’t help. Thanks to reflection and as a consequence with intellisense, you don’t even need an api anymore. Thats one of the biggest advantages of C#.
Hi, it all seems just somewhat confusing… The documentation I presume is to provide all the relative information regarding grasshopper’s native commands. I have tried going through the rhino common API as suggested by Michael Pryor as well as going through the Grasshopper SDK. I have been looking for all native commands in these directories, but some just don’t show up e.g. Move command. Any guidance?
These are made by David (and some maybe by his assistants). AFAIK there’s no explicit info available and of course no source: for instance the 3 Populate components and numerous others.
For exposed to public Methods: use Rhino and GH SDK (Software Development Kit),
In some R SDK Methods (for instance: Intersection.CurveCurve Method etc) there’s code examples available that may (or may not) be useful.
In general: if GH is only a part of the arsenal of the apps that your practice uses … try to write code as GH neutral as possible. For instance DataTrees is a custom GH data organization schema … meaning that attempting to port code managing data that way into other apps may require major changes.
if you don’t read what people write to you, nobody can help you. There is no Grasshopper native command. Its a piece of code made out of Rhinocommon commands, which sometimes has a less technical term for beginners. So the move component does a “translation”, which is the right technical term for this.