RHINO 4 SR9 sdk problem by c#


#1

I want to control surfaces or objects by cage editor, I read a sample from "http://wiki.mcneel.com/developer/sdksamples/cageedit ". It was wrote by c++ , but I need c# one.Although I tried to change the code by myself, there were some problems caused it didn’t work properly. Can u give me a hand?

By the way I found link from http://wiki.mcneel.com/developer/dotnetplugins.


(Dale Fugier) #2

What didn’t work properly?


#3

I guess it was caused by some wrong translations from c++ -> c#. For example , I don’t know how to change following code to c#
1.ON_Line line;
rc = RhinoGetLine( CArgsRhinoGetLine(), line );

2.RhinoCaptureObject( control_object, const_cast<CRhinoObject*>(captive) );

I am a rookie studying SDK. In many case, I can’t find some libraries of C++ related to c#. So,what is ur suggestion ?


(Dale Fugier) #4
MArgsRhinoGetLine args = new MArgsRhinoGetLine();
OnLine line = new OnLine();
RhUtil.RhinoGetLine(ref args, ref line);

This doesn’t appear to be exposed in Rhino 4.0’s .NET toolkit.