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
Parameters:
| ptrCommandLineOption (nint) |
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.
Parameters:
| pGeometry (nint) | ON_Geometry* |
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.
Parameters:
| options (FileReadOptions) | A FileReadOptions object. |
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.
Parameters:
| options (FileWriteOptions) | A FileWriteOptions object. |
Returns: A pointer to the Rhino const object.
Create managed Font from native ON_Font*
Parameters:
| ptrManagedFont (nint) |
Copies a Rhino_DotNet brep to a RhinoCommon brep class.
Parameters:
| source (object) | RMA.OpenNURBS.IOnBrep or RMA.OpenNURBS.OnBrep. |
Returns: RhinoCommon object on success. This will be an independent copy.
Copies a Rhino_DotNet curve to a RhinoCommon curve class.
Parameters:
| source (object) | RMA.OpenNURBS.IOnCurve or RMA.OpenNURBS.OnCurve. |
Returns: RhinoCommon object on success. This will be an independent copy.
Copies a Rhino_DotNet mesh to a RhinoCommon mesh class.
Parameters:
| source (object) | RMA.OpenNURBS.IOnMesh or RMA.OpenNURBS.OnMesh. |
Returns: RhinoCommon object on success. This will be an independent copy.
Copies a Rhino_DotNet surface to a RhinoCommon Surface class.
Parameters:
| source (object) | 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.
Parameters:
| geometry (GeometryBase) | A geometry object. This can be null and in such a case nint.Zero is returned. |
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.
Parameters:
| geometry (GeometryBase) | A geometry object. This can be null and in such a case nint.Zero is returned. |
Returns: A pointer to the non-const geometry.
Get CRhinoDisplayPipeline* for a DisplayPipeline instance
Parameters:
| pipeline (DisplayPipeline) |
Get CRhinoGetPoint* from a GetPoint instance
Parameters:
| getPoint (GetPoint) |
Get CRhinoViewport* from a RhinoViewport instance
Parameters:
| viewport (RhinoViewport) |
Get a CRhinoPrintInfo* for a given ViewCaptureSettings class
Parameters:
| settings (ViewCaptureSettings) |
Get ON_Viewport* from a ViewportInfo instance
Parameters:
| viewport (ViewportInfo) |
Gets the C++ CRhinoDoc* for a given RhinoCommon RhinoDoc class.
Parameters:
| doc (RhinoDoc) | A document. |
Returns: A pointer value.
Get native NSFont* from a Rhino Font. Only works on Mac
Get native NSFont* from a Rhino Font. Only works on Mac
Parameters:
| font (Font) |
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.
Parameters:
| plugin (PlugIn) | A plug-in. |
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.
Parameters:
| rhinoObject (RhinoObject) | A Rhino object. |
Returns: A pointer to the Rhino const object.
Constructs a RhinoCommon Rhino object from an unmanaged C++ RhinoObject pointer.
Convert a Rhino.Display.Viewport to an RMA.Rhino.IRhinoViewport.
Parameters:
| source (RhinoViewport) | A RhinoCommon viewport. |
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.
Parameters:
| source (Brep) | A source 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.
Parameters:
| source (Curve) | A RhinoCommon source 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.
Parameters:
| source (Mesh) | A source brep. |
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.
Parameters:
| source (Surface) | A source brep. |
Returns: Rhino_DotNet object on success. This will be an independent copy.
Constructs a Rhino_DotNet OnXform from a given RhinoCommon Transform.
Parameters:
| source (Transform) | A RhinoCommon source 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.
Attempts to copy the contents of a Rhino.Geometry.Arc to a RMA.OpenNURBS.OnArc.
Create a ViewCaptureSettings class from a native const CRhinoPrintInfo* The pointer values are copied
Parameters:
| ptrViewCapture (nint) |