Grasshopper

algorithmic modeling for Rhino

Hi,
Is it possible to create a custom preview from within a VB component. I would like the previews of the geometry to be in a color other than the default red/green and would like to keep it all within a single node - and not have to use a gradient and custom preview component. I have tried digging through the grasshopper namespace but i am not so familiar with it - I have tried accessing some of the grasshopper.kernel stuff (conduit ... ) but I have only a fuzzy idea of what they are about. Any help greatly appreciated!

Views: 1190

Replies to This Discussion

Well, IMHO the steps that its going to take to actually get something like this working is not worth the minimization of components. If you're lucky, then the display conduit within GH is actually accessible and the main issue is tracking down the correct methods, etc. I would highly doubt that the class that controls that conduit is a public class, in which case you won't be able to access it at all. There is the potential to define a conduit class externally and compiling it as a dll, which you then reference within grasshopper. However, there could potentially be some issues with doing it this way.

Long and short, since this really isn't the kind of thing that grasshopper was made for (defining your own classes, overriding other ones, etc), its not going to be very easy to do. On top of that, the potential for instability is certainly significant. I just don't think for an extra component or two that this is worth the time it would take to set up and the risk that might come with this. But that's just me.

If you still want to do this, I'd take a look at the link below. Its about the only info out there on conduits, but it really doesn't explain as much as is probably needed to implement them properly.

http://en.wiki.mcneel.com/default.aspx/McNeel/DisplayConduitIntrodu...
Damien, thanks for responding so quickly, I was hoping that there would be some simple way to do it but it will probably be easier to do it through the standard grasshopper components - or just do it as a rhino plugin. Just out of curiousity, I have been using stuff from the opennurbs and rhino namespaces in my vb nodes - are there any useful classes/methods from the grasshopper namespace. Would I even want to start digging around in it? Also thanks for the link.
At this point, the intellisense that pops up is about all that's out there as to what's exposed from grasshopper, which you can of course take a look at. It depends on how willing you are to blow up your computer if you really want to snoop around with those methods or not. Some of them are somewhat self explanatory and others its much harder to understand what they are related to. Either way, its somewhat hard to actually tell if they're working or not. If you do find anything, just keep in mind that the next version is going to likely change those methods either by name or by function.

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