Can I use C++ to Create a gha file?


#1

Can I use C++ to Create a gha file?


(David Rutten) #2

No, GHA files need to be MSIL assemblies. You can use C++/CLI, but we do not recommend going down that route.
The approach we favour is to make the C++ dll easily PInvokable. We’ve made parts of RhinoCommon available on GitHub so you can see how we’ve approached this in our own SDK: https://github.com/mcneel/rhinocommon


#3

can I use RMA.Rhino.RhUtil.RhinoBrepGet2dProjection() in gha develop?

And can I use Python to write a GHA file?


(Giulio Piacentino) #4

Hi Huaxiamengqing

right now, GhPython does not support the loading of GHA files, as there is no method to compile Python code to “normal” MSIL assemblies. Until either of the two is supported, you cannot use Python to compile GHAs. But – I’ve looked into this and I think it is possible and should be supported. I’ve added a bugtracker item here: https://github.com/mcneel/ghpython/issues/67


As I did not find a method similar to RhinoBrepGet2dProjection() in RhinoCommon, I’ve also added it to the list here: https://github.com/mcneel/rhinocommon/issues/155

Thanks,

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com


#5

Thank you,Thank you for your all hard work.