CAD Exchanger SDK
Rhino Converter

Overview

Rhino_Reader can read files compliant with the Rhino file format from v1 to v5.
Rhino_Writer can write files compliant with the Rhino file format from v2 to v5.

Scope

  • B-Rep representations
  • polygonal representations
  • colors
  • layers
  • meta-data (names)
  • assembly structure

Mapping

Import Mapping

Below tables shows how Rhino entities are mapped into CAD Exchanger entities after import.

Product Structure

Rhino Entity CAD Exchanger Entity
Instance Definition One of:
Instance Ref ModelData_Instance
Xform ModelData_Transformation

Topology

Rhino Entity CAD Exchanger Entity
Brep ModelData_Body
BrepFace ModelData_Face
BrepLoop ModelData_Wire
BrepTrim ModelData_Edge
Point ModelData_Vertex
3dPoint

Geometry

Rhino Entity CAD Exchanger Entity
Surfaces
NurbsSurface ModelData_BSplineSurface
SumSurface
OffsetSurface ModelData_OffsetSurface
PlaneSurface ModelData_Plane
RevSurface ModelData_SurfaceOfRevolution
Curves
ArcCurve ModelData_Circle
ModelData_Circle2d
LineCurve ModelData_Line
ModelData_Line2d
NurbsCurve ModelData_BSplineCurve
ModelData_BSplineCurve2d
PolylineCurve
PolyCurve

Polygonal

Rhino Entity CAD Exchanger Entity
Mesh ModelData_IndexedTriangleSet

Parameters

Importer Parameters

The Rhino import parameters are controlled by Rhino_ReaderParameters.

Parameter Default value Description
DefaultMaterial() ModelData_Material with DiffuseColor set to white Specifies the default material. Rhino requires all entities to have a material, either through layer or directly attached. In case when there is no such one, the default material is used.
ImportMeshType() Default Specifies the type of the mesh to import. Rhino files can contain more than one polygonal representations. The one which will be imported is selected considering the parameter:
  • Default - the most comprehensive representation is selected automatically, usually this is Render mesh.
  • Render - import Render mesh.
  • Analysis - import Analysis mesh.
  • Preview - import Preview mesh.
ImportHiddenObjects() false Specifies whether hidden objects should be imported. Each Rhino entitiy has visibility property, which determines if it is visible or not. Depending on parameter invisible entities will be imported (true) or not (false, default).

Exporter Parameters

The Rhino export parameters are controlled by Rhino_WriterParameters.

Parameter Default value Description
Version() 5 Specifies the target Rhino file version.
The valid range: 2 - 5.
WriteBRepRepresentation() true See Base_WriterParameters::WriteBRepRepresentation().
WritePolyRepresentation() true

See Base_WriterParameters::WritePolyRepresentation().

If more than one polygonal representations is present in the model, only the one specified by PreferredLOD() is written.

PreferredLOD() ModelData_RM_Medium See Base_WriterParameters::PreferredLOD()

Known Limitations

Import

The following items are not currently supported for Rhino import:

  • PolyCurves without nurbs form.
  • External files (linked definitions).
  • Offset geometry with non-trivial offset function.

Export

The following items are not currently supported for Rhino export:

  • External files (linked definitions).
  • If an entity belongs to several layers, only first one will be considered.