# Interop class

Namespace: [Rhino.Runtime](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.runtime.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public static class Interop
```

Contains static methods to marshal objects between RhinoCommon and legacy Rhino_DotNet or C++.

## Methods

- [CommandLineOptionFromNativePointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/commandlineoptionfromnativepointer.md): (static) 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
- [CreateFromNativePointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/createfromnativepointer.md): (static) 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.
- [FileReadOptionsConstPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/filereadoptionsconstpointer.md): (static) 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.
- [FileWriteOptionsConstPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/filewriteoptionsconstpointer.md): (static) 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.
- [FontFromPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/fontfrompointer.md): (static) Create managed Font from native ON_Font*
- [FromOnBrep](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/fromonbrep.md): (static) Copies a Rhino_DotNet brep to a RhinoCommon brep class.
- [FromOnCurve](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/fromoncurve.md): (static) Copies a Rhino_DotNet curve to a RhinoCommon curve class.
- [FromOnMesh](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/fromonmesh.md): (static) Copies a Rhino_DotNet mesh to a RhinoCommon mesh class.
- [FromOnSurface](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/fromonsurface.md): (static) Copies a Rhino_DotNet surface to a RhinoCommon Surface class.
- [NativeGeometryConstPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/nativegeometryconstpointer.md): (static) 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.
- [NativeGeometryNonConstPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/nativegeometrynonconstpointer.md): (static) 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.
- [NativeNonConstPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/nativenonconstpointer.md): (5 overloads, static) Get CRhinoDisplayPipeline* for a DisplayPipeline instance
- [NativeRhinoDocPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/nativerhinodocpointer.md): (static) Gets the C++ CRhinoDoc* for a given RhinoCommon RhinoDoc class.
- [NSFontFromFont](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/nsfontfromfont.md): (2 overloads, static) Get native NSFont* from a Rhino Font. Only works on Mac
- [PlugInPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/pluginpointer.md): (static) Gets a C++ plug-in pointer for a given RhinoCommon plug-in. This is a Rhino SDK function.
- [RhinoObjectConstPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/rhinoobjectconstpointer.md): (static) Returns the underlying const CRhinoObject* for a RhinoCommon class. You should only be interested in using this function if you are writing C++ code.
- [RhinoObjectFromPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/rhinoobjectfrompointer.md): (static) Constructs a RhinoCommon Rhino object from an unmanaged C++ RhinoObject pointer.
- [ToIRhinoViewport](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/toirhinoviewport.md): (static) Convert a Rhino.Display.Viewport to an RMA.Rhino.IRhinoViewport.
- [ToOnBrep](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/toonbrep.md): (static) Constructs a Rhino_DotNet OnBrep that is a copy of a given brep.
- [ToOnCurve](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/tooncurve.md): (static) Constructs a Rhino_DotNet OnCurve that is a copy of a given curve.
- [ToOnMesh](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/toonmesh.md): (static) Constructs a Rhino_DotNet OnMesh that is a copy of a given mesh.
- [ToOnSurface](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/toonsurface.md): (static) Constructs a Rhino_DotNet OnSurface that is a copy of a given curve.
- [ToOnXform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/toonxform.md): (static) Constructs a Rhino_DotNet OnXform from a given RhinoCommon Transform.
- [TryCopyFromOnArc](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/trycopyfromonarc.md): (static) Attempts to copy the contents of a RMA.OpenNURBS.OnArc to a Rhino.Geometry.Arc.
- [TryCopyToOnArc](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/trycopytoonarc.md): (static) Attempts to copy the contents of a Rhino.Geometry.Arc to a RMA.OpenNURBS.OnArc.
- [ViewCaptureFromPointer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.interop/viewcapturefrompointer.md): (static) Create a ViewCaptureSettings class from a native const CRhinoPrintInfo* The pointer values are copied
