Grasshopper

algorithmic modeling for Rhino

So I've been to the general discussion part of the forum:
http://www.grasshopper3d.com/forum/topics/is-there-a-bounce-command-in

Basically, I would like to use the command bounce from rhino in grasshopper, so that when I modify the initial vector, the rest is modified.

Would there be any way to do this, knowing that I'm new to grasshopper and that I've never touched Visual basic or C#?

Thank you in advance.

Views: 1680

Replies to This Discussion

Hi Thomas,

I don't think so. Using Rhino commands from within Grasshopper is notoriously difficult (much harder than using Rhino SDK functions), as it involves you temporarily baking geometry, making sure the selection is set up correctly, calling commands with all the formatted options, then somehow figuring out which geometry was added by the command, reading that geometry back in and finally deleting all the gunk you added to the document.

--
David Rutten
david@mcneel.com
London, UK
Thank you for your reply David

I get that it would be difficult to have a back and forth between grasshopper and rhino, but wouldn't it be possible to create a grasshopper nod that take the same parameters as the bounce command; a/some reflective(s) surface(s), a starting point and a vector. For short, I would be taking the code behind the rhino bounce command and translating it to a VB nod.
In this manner, grasshopper wouldn't need to communicate with rhino.
Anyway, it sounds difficult and I'm not sure if I have time to learn enough Vb in a week to do this.
Depending on how much of Bounce is exposed in the SDK that would range from "trivial" to "daunting".

I'll ask for a proper RhinoCommon SDK exposure of this function so we can add a native Bounce component.

--
David Rutten
david@mcneel.com
London, UK
Oh wow this would be really great
I'm really thankful that you've taken in interest to my problem, and I've gotta say that grace hopper as really changed the way I work around a problem.
Once again, thank you.
Greetings All

I've been looking for a similar 'bounce' solution to simulate daylight rays etc..
I came across this url:

http://simonkallioinen.wordpress.com/2010/04/10/bouncing-rhinoscript/

It has an interesting rhinoscript which generate rays from a source grid of points to a direction grid of points. Unfortunately each source point wants to connect to each directional point.

Can someone explain how to modify this script so that point A1 (source) would only connect to point A1 (directional)?

Thanks in advance

Dwight
Attachments:
I'm not much of a rhino scripter, but I think this should do it. I just took out the nested loop. Now for each direction point (1st, 2nd, etc), the script looks for a corresponding point in the array of "center" points. It does its ray thing then it goes to the next direction point without cross referencing the points. I think this will break if there are not a matching number of points. Also, make sure they are selected / ordered in a corresponding manner.

Have fun.
Attachments:
David,
Any word on the Bounce SDK?

In lieu of such, any hints on how I could start doing such a crazy thing as having a grasshopper VB component do what you were talking about. I'm familliar with having GH VB bake objects, but I have no idea how to make it do the equivallent of Call Rhino.Command("selLast") or then telling Grasshopper to re-reference the selected geometry.

Thanks,
Peter

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service