Grasshopper

algorithmic modeling for Rhino

Hi,

Just spent hours searching for a way to access Grasshopper's built in components in a C# plugin.

The situation is like this: I have a definition that's getting ridiculously complex and is getting more brittle as I add more features to it so I've set up a dev environment in Visual Studio.

My Hope is to re-engineer the complex definition by encapsulating some of the complexity in C# code and I was looking for the best approach to translate the definition.

My current thinking is that there is a one to one mapping between GH components as they exist in the node editor and either Grasshopper SDK or RhinoCommon libraries.

Is this correct?

For example I got stuck in the first component which creates a polygon by using the Polygon component, where can this class be found?

The closest I got was Rhino.Geometry.PolyLine or Rhino.Geometry.PolyCurve but they don't provide the same functionality as the GH Polygon component.

It looks like I'm not on the right track on this and moving to writing plugins will mean having to replicate lots of the functionality that's available in GH UI editor.

Cheer

Paul

Views: 2558

Replies to This Discussion

Hi Paul - this is a question that comes up a lot, so I have posted a response in the FAQ section of the site:

http://www.grasshopper3d.com/forum/topics/is-it-possible-to-call-th...

The short answer is that, for best practice, yes, you will have to re-write a lot of the functionality embedded in components yourself. While there are ways to do call component functionality programmatically (outlined in my post) this is not recommended for plug-in development.

Thanks Andrew, that certainly clarifies things.

Great pointers - cheers

Paul

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