Interop
Contains static methods to marshal objects between RhinoCommon and legacy Rhino_DotNet or C++.
Methods
Create a command line option for a native pointer. Do not hold onto this class as it does not control the lifetime of the underlying pointer
Constructs a RhinoCommon Geometry class from a given ON_Geomety*. The ON_Geometry* must be declared on the heap and its lifetime becomes controlled by RhinoCommon.
Returns: The appropriate geometry class in RhinoCommon on success.
Returns the underlying const CRhinoFileReadOptions* for a Rhino.FileIO.FileReadOptions object. You should only be interested in using this function if you are writing C++ code.
Returns: A pointer to the Rhino const object.
Returns the underlying const CRhinoFileWriteOptions* for a Rhino.FileIO.FileWriteOptions object. You should only be interested in using this function if you are writing C++ code.
Returns: A pointer to the Rhino const object.
Create managed Font from native ON_Font*
Copies a Rhino_DotNet brep to a RhinoCommon brep class.
Returns: RhinoCommon object on success. This will be an independent copy.
Copies a Rhino_DotNet curve to a RhinoCommon curve class.
Returns: RhinoCommon object on success. This will be an independent copy.
Copies a Rhino_DotNet mesh to a RhinoCommon mesh class.
Returns: RhinoCommon object on success. This will be an independent copy.
Copies a Rhino_DotNet surface to a RhinoCommon Surface class.
public static Surface FromOnSurface()
source
Any of the following in the RMA.OpenNURBS namespace are acceptable. IOnSurface, OnSurface, IOnPlaneSurface, OnPlaneSurface, IOnClippingPlaneSurface, OnClippingPlaneSurface, IOnNurbsSurface, OnNurbsSurfac, IOnRevSurface, OnRevSurface, IOnSumSurface, OnSumSurface.
Returns: RhinoCommon object on success. This will be an independent copy.
Returns the underlying const ON_Geometry* for a RhinoCommon class. You should only be interested in using this function if you are writing C++ code.
public static nint NativeGeometryConstPointer()
Returns: A pointer to the const geometry.
Returns the underlying non-const ON_Geometry* for a RhinoCommon class. You should only be interested in using this function if you are writing C++ code.
public static nint NativeGeometryNonConstPointer()
Returns: A pointer to the non-const geometry.
Get CRhinoDisplayPipeline* for a DisplayPipeline instance
Get CRhinoGetPoint* from a GetPoint instance
Get CRhinoViewport* from a RhinoViewport instance
Get a CRhinoPrintInfo* for a given ViewCaptureSettings class
Get ON_Viewport* from a ViewportInfo instance
Gets the C++ CRhinoDoc* for a given RhinoCommon RhinoDoc class.
Returns: A pointer value.
Get native NSFont* from a Rhino Font. Only works on Mac
Returns: NSFont* on success. IntPtr.Zero on failure
Get native NSFont* from a Rhino Font. Only works on Mac
Returns: NSFont* on success. IntPtr.Zero on failure
Gets a C++ plug-in pointer for a given RhinoCommon plug-in.
This is a Rhino SDK function.
Returns: A pointer.
Returns the underlying const CRhinoObject* for a RhinoCommon class. You should only be interested in using this function if you are writing C++ code.
Returns: A pointer to the Rhino const object.
Constructs a RhinoCommon Rhino object from an unmanaged C++ RhinoObject pointer.
Returns: A new Rhino object, or null if the pointer was invalid or nint.Zero.
Convert a Rhino.Display.Viewport to an RMA.Rhino.IRhinoViewport.
Returns: Rhino_DotNet IRhinoViewport object on success. This will be an independent copy.
Constructs a Rhino_DotNet OnBrep that is a copy of a given brep.
Returns: Rhino_DotNet object on success. This will be an independent copy.
Constructs a Rhino_DotNet OnCurve that is a copy of a given curve.
Returns: Rhino_DotNet object on success. This will be an independent copy.
Constructs a Rhino_DotNet OnMesh that is a copy of a given mesh.
Returns: Rhino_DotNet object on success. This will be an independent copy.
Constructs a Rhino_DotNet OnSurface that is a copy of a given curve.
Returns: Rhino_DotNet object on success. This will be an independent copy.
Constructs a Rhino_DotNet OnXform from a given RhinoCommon Transform.
Returns: Rhino_DotNet object on success. This will be an independent copy.
Attempts to copy the contents of a RMA.OpenNURBS.OnArc to a Rhino.Geometry.Arc.
Returns: true if the operation succeeded; false otherwise.
Attempts to copy the contents of a Rhino.Geometry.Arc to a RMA.OpenNURBS.OnArc.
Returns: true if the operation succeeded; false otherwise.
Create a ViewCaptureSettings class from a native const CRhinoPrintInfo* The pointer values are copied