algorithmic modeling for Rhino

Hi guys,

I've was trying to include the "boxmorph" functionality into a custom c# component. But I don't know how this functionality works. I had a look at the Rhino Common Classes for morphing - but no clue how to work with these classes.

Could someone help me with a small snippet?

- Karl

Views: 757

Reply to This

Replies to This Discussion

BoxMorph is implemented inside Grasshopper, there isn't a single RhinoCommon class/method for this. Basically I declared a new class that derives from Rhino.Geometry.SpaceMorph and then overrode the MorphPoint method to supply custom morphing logic.


David Rutten

Poprad, Slovakia

Thank you David,

that's probably the reason why it's not available for Rhino Python Script, but for Rhino Script. Very unfortunate.

My question would be: Is it somehow possible to call the functionality of a componente via .Net?- without using (the incredible) user interface?

(Since internally, that's probably what you are doing in GH. You have a function "Box Morph " and call it through your UI.)

I was thinking somthing like

- referencing the grasshopper dlls in addition to RhinoCommon, System-Collections, etc.

- call the function while pass it the 3 Parameters (Rhino.Geometry, BoundingBox1, BoundingBox2)

- go on working with the code.


- Karl

Hi Karl,

my own Box Morph algorithm is written inside the component, in order to use a component outside of the Grasshopper context, you'd need to instantiate it and call the SolveInstance() function while supplying proper Data Access. This is not easy.

There has been talk in the past about making it easier to call component functionality, but I'm not entirely sure all 3rd party developers would be OK with that. 

It's certainly possible to reference a GHA file in some other project, since GHA is just a dll with a different extension. However there is no guarantee that the functionality provided by the components in that dll can also be easily accessed in other ways. 


David Rutten

Poprad, Slovakia


this really doesn't sound easy.

It's always hard to let a program do something, it wasn't intended to do.

Maybe I'll try to rs.command() some panelling tool functionalities. (While hoping the box morph will be implemented into Rhino Common in the near future)


- Karl






  • Add Photos
  • View All

© 2019   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service