Click or drag to resize

GeometryEncoderToGeometryObject Method

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

Namespace:  RhinoInside.Revit.Convert.Geometry
Assembly:  RhinoInside.Revit (in RhinoInside.Revit.dll) Version: 1.7.8130
Syntax
public static Autodesk.Revit.DB.GeometryObject ToGeometryObject(
	this Rhino.Geometry.GeometryBase geombase
)

Parameters

geombase
Type: Rhino.Geometry.GeometryBase
Rhino geometryBase to convert.

Return Value

Type: Autodesk.Revit.DB.GeometryObject
Revit geometryObject that is equivalent to the provided Rhino geometryBase.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Rhino.Geometry.GeometryBase. 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 ToGeometryObject(GeometryBase) as extension method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.GeometryObject revitGeomObj = rhinoGeom.ToGeometryObject();
Using ToGeometryObject(GeometryBase) as static method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.GeometryObject revitGeomObj = GeometryEncoder.ToGeometryObject(rhinoGeom);
See Also