Click or drag to resize

GeometryEncoderToCurveArray Method

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

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

Parameters

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

Return Value

Type: Autodesk.Revit.DB.CurveArray
Revit curveArray that contains consecutive segments of 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 ToCurveArray(Curve) as extension method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.CurveArray revitCurveArray = rhinoCurve.ToCurveArray();
Using ToCurveArray(Curve) as static method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.CurveArray revitCurveArray = GeometryEncoder.ToCurveArray(rhinoCurve);
See Also