algorithmic modeling for Rhino
Hi,
Totally new to VB and programming in grasshopper. I am trying to repeat the example in described the Grasshopper Primer on recursion. I noticed that there are significant difference between what's in the Primer and what's used in grasshopper now (I am using Rhino 5 and Grasshopper 0.8.0066). I made my attempt, but couldn't get it to work. Could anyone help me diagnose what's wrong?
Files and screen shorts are attached.
Thanks a lot!!
Tags:
Hi Wendong,
see attached. Hope it makes sense.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Oh yes, you might want to put a test in there to make sure that minimumLength is never equal to or less than zero, otherwise you'll crash hard.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks for the file! It works, but I am still a bit puzzled by how you use Transform and Vector3d without declaring variables. It seems that they are the names for structures (according to RhinoCommon SDK), but you use them independently.
By the way, where can I get more information on basic concepts such as structure, constructor, operators, and other terms used in the RhinoCommon? I guess that the explanations of these concepts in the Grasshopper Primer are outdated?
That is correct. The methods I call are Shared methods and they must therefore be called on the typename rather than any specific instance of that type.
Words like Class, Structure, Constructor, Operator etc. are not RhinoCommon specific. They are the same throughout .NET programming. Any introduction/reference that targets VB.NET should be sufficient to explain these concepts.
The Grasshopper primer is a little bit outdated, but when it comes to fundamental stuff like classes vs. structures, it will stay relevant for a very long time to come.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks for the info!
I wrote a blog post about Reference-Types vs. Value-Types. It's not really to my liking yet, I think it's still far more confusing than it could be, but maybe it will clarify a few things. I'll write another post soon that explains the different between Instance methods and Shared methods.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Very well written post. Thanks for sharing.
Thanks for the post. The analogy you used at the end of the post makes things easier to understand. Look forward to your next post.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by