Click or drag to resize

GeometryEncoderToCurve Method (Curve)

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

Namespace:  RhinoInside.Revit.Convert.Geometry
Assembly:  RhinoInside.Revit (in RhinoInside.Revit.dll) Version: 1.7.8130
Syntax
public static Autodesk.Revit.DB.Curve ToCurve(
	this Rhino.Geometry.Curve curve
)

Parameters

curve
Type: Rhino.Geometry.Curve
Rhino curve to convert.

Return Value

Type: Autodesk.Revit.DB.Curve
Revit curve that is equivalent to the provided Rhino curve.

Usage Note

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

DB.Curve revitCurve = rhinoCurve.ToCurve();
Using ToCurve(Curve) as static method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.Curve revitCurve = GeometryEncoder.ToCurve(rhinoCurve);
See Also