Click or drag to resize

GeometryEncoderToMesh Method (Mesh)

Converts the specified Rhino.Geometry.Mesh to an equivalent of Autodesk.Revit.DB.Mesh.

Namespace:  RhinoInside.Revit.Convert.Geometry
Assembly:  RhinoInside.Revit (in RhinoInside.Revit.dll) Version: 1.7.8130
Syntax
public static Autodesk.Revit.DB.Mesh ToMesh(
	this Rhino.Geometry.Mesh mesh
)

Parameters

mesh
Type: Rhino.Geometry.Mesh
Rhino mesh to convert.

Return Value

Type: Autodesk.Revit.DB.Mesh
Revit mesh that is equivalent to the provided Rhino mesh.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Rhino.Geometry.Mesh. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples
Using ToMesh(Mesh) as extension method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.Mesh revitMesh = rhinoMesh.ToMesh();
Using ToMesh(Mesh) as static method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.Mesh revitMesh = GeometryEncoder.ToMesh(rhinoMesh);
See Also