Grasshopper

algorithmic modeling for Rhino

I'm looking to create an analysis key for a GH file and would like the key to always appear along some edge of the Rhino viewport.  Any ideas? 

Views: 2397

Replies to This Discussion

Hi lmnts,

difficult. Very difficult. If I had to do this I think my first attempt would be to write a Display conduit that participated in the Viewport redrawing. It's still not going to be easy though and probably even harder if you have to do it from within a VB/C# component.

Are you absolutely certain you want to go down this path?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
I've also been considering this to table a bill of materials etc.

However, my current approach instead is to pipe this data from a custom component into a scribble pad or similar. I don't think a BOM is essential to be drawn on a conduit (and indeed for larger models would not be possible). However, if a conduit result is worked through, I might take advantage of it for this or another reporting aspect.
This could be handy, but probably not as sophisticated as you're looking for.

http://www.grasshopper3d.com/forum/topics/orient-surface-to-camera
I wasn't ready to go digging around to figure how to write a display conduit so I started thinking about just drawing the geometry in Grasshopper using a method similar to the orient surface to camera command that Taz suggested.

I used a VB component to extract a bunch of parameters of the camera such as camera location, camera target, distance between the two, view angle, blah, blah, blah. This information was used to create a plane normal to the view direction and centered within the viewport. Distance from camera to target and the lens length were used to figure out how big a planar surface would need to be to fit within the current viewport. The last step was to scale the surface towards the camera location so that it was the closest object in the scene. After this it was just a matter of performing some surface trims, coloring, and labeling.

I'm sure this is not the optimum way of doing this but it works...well mostly. Check out the following video and you'll see that the VB component needs to constantly be nudged to recalculate the plane.

http://www.grasshopper3d.com/video/analysisgriddemo-1
Alright the quality of that video was crap. Lets try this.

very clever - you could attach a timer to the vb component to avoid having to constantly reconnect it, if that wouldn't be too processor intensive.
The timer does work nicely for constantly updating the key. I've been leaving it out though because I sometimes need to look at dialog boxes for the I/O for longer than say 1 sec. Perhaps I should just switch the timer to a longer interval.
Sweet HUD!

Here's a (pretty sloppy) way of doing this - use Horster camera component, define a plane based on camera direction, then put whatever you want on that plane. Only works in perspective viewports.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service