Grasshopper

algorithmic modeling for Rhino

hi all ,im a beginner of vb programming in gh ,but im very confused!!!

recently i found that only use the components provided by gh cant sovle some problems during my work.so i decided to learn VB scripting in GH.and try hard for many days,ive got some progress.

but when i read some little complicated programming,i.......found theres noting in my brain can help me to understand....the first problem is i dont know many varibles and function and methods provided by gh ,vb and windows.the second is when the structure of programming is a little complicated,im also complicated .....

i tried to lenrn vb by books,internet and i read the official gh book for many times also,but i found im a programming idiot as before ,almost.....

so ,is there a system introduction book about gh vb conding such as 101?ive found one ,named <grasshopper scripting>,but its under construsting....

or i need some advices about how to get progress ?how to learn?

 

-------------------------------------------------

 

best regards!!

Yuan.T

Views: 1280

Replies to This Discussion

Hi Yuan,

there's no single good book that teaches you the fundamentals of programming, the .NET framework, the RhinoCommon SDK and the Grasshopper SDK. The idea is that once you've learned generic programming you no longer need a specific course in RhinoCommon or Grasshopper, the source comments should be sufficient. 

Of course this is not true, there will always be questions but we're happy to answer those as they come up (normally at least, at the moment I'm spending a lot of time on the road).

Here's a list of things you need to understand in my opinion before programming in Grasshopper or RhinoCommon:

  1. Variables. How to declare them, how to assign them, what scope and lifetime they have.
  2. The difference between individual variables and collections (arrays, lists, ienumerables etc.).
  3. Basic logical structure. Conditionals (if statements) and Loops.
  4. Classes, structures and interfaces. What they are and how they differ from each other.
  5. Methods and properties. How to make them, how to use them.

I really should try and write some proper tutorials on this stuff, I sort of started with classes vs. structures but I never really got around to finishing them. However there are plenty of good resources online, especially for languages such as VB.NET and C#.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

To add to what David wrote, you might also want to consider starting out with Python. Depending on how your brain is wired it may be more readable and less confusing than VB or C#. At least that's the idea, readability counts, clear syntax, less code etc.

In case you're interested here's a link for the RhinoPython forum, the RhinoPython primer and the Python Grasshopper component. In any case the primer is probably a good place to start since it covers most of the points on Davids list above (I believe it is also based on the old RhinoScript primer, no?).

Not to confuse you any further ;)

thank you anders !!!!

at beginnig i faced the choosing problem:what programme language i should choose for beginning ,at last i decide to choose VB ,because its source is more than python on internet,and in my opnion,i thought the problems ill face during coding is the same ,and the structure of coding is more or less the same.....

so i choose VB easier than C#,the more resource than python for starting.but i dont know is it a correct way for me ...

thank you for advice!!!

 

best regards!!

yours truly

YUAN.T

thank you David! as you said ,i think i have much to learn in the furture!

now ive got some books ,such as rhino 4.net sdk.grasshopper sdk but i dont know how to use them......of course i have rhinocommon.sdk ,but i herad its used in rhino5.

or example: the book grasshopper primer second edition ,page 98

i dont know what is the  "doc.absolutetolerance" and where i can find about it....i dont kow it should be a class or a fuction,i tried to search the rhino4. net sdk,i cant find it ....maybe its my searching problem.

but according to the grasshopper primer, i indeed know many kind of Variables,many functions,basic structure, loops, and conditions,and what is onutil.xxxx and rhutil.xxxx.but i found all this imformation is not helpful enough to me when reading the examples downloaded from many disscussions.when i found a new variable or new funcion,i dont know where i can find the introduction about them,such as the upper coding:"doc.absolutetolerance".i tried to use the auto complete such as

dim xxxx as oncurve

xxxx.        to find the class oncurve's funtions and variables ,but its too uneffcient.

 

-----------------------------------------------

 

And,i dont know the difference between the components vb script and dotnet vb script....

because i found when i type onutil. the auto complete has noting appear...and the variables declaring is not the same. in vb script dim xxxx as curve but in dotnet vb script its dim xxxx as oncurve,which is the same as the grasshopper primer teached me...but i guess.... the vb script component is just like the rhinoscript(not the same),and the dotnet vb script is more powerful than it. am i right?

 

------------------------------------------------

 

at last i dont know these.

Imports System
Imports System.IO
Imports System.Xml
Imports System.Data
Imports System.Drawing
Imports System.Reflection
Imports System.Collections
Imports System.Windows.Forms
Imports Microsoft.VisualBasic
Imports System.Collections.Generic
Imports System.Runtime.InteropServices

 

when i search google about them,the introduction about them is too professinal for me to understand......i just want to know what i can do by using them ...

 

 

-------------------------

 

sorry for disturbing you so much!!!

best regards!

yours truly

YUAN.T

 

 

 

 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service