The Revit API uses different types of collections of curves as inputs.
Note: Newer API methods use .NET collections of Curves in place of CurveArray and CurveArrArray.
CurveLoop
A CurveLoop represents a specific chain of curves joined end-to-end. It can represent a closed loop or an open one. The members of the CurveLoop may be directly iterated, as the class implements IEnumerable<Curve>. The iteration provides copies of the curves directly contained in the loop; modification of the curves will not affect the curves that are contained in the loop. CurveLoops can be created using:
- CurveLoop.Create() - creates a new CurveLoop from a list of curves.
- CurveLoop.CreateViaCopy() - creates a new CurveLoop as a copy of an existing CurveLoop.
- CurveLoop.CreateViaThicken(Curve, double, XYZ) - creates a new closed CurveLoop by thickening the input curve with respect to a given plane.
- CurveLoop.CreateViaThicken(CurveLoop, double, XYZ) -creates a new closed curve loop by thickening the input open curve loop with respect to a given plane.
- CurveLoop.CreateViaTransform() - creates a new CurveLoop as a transformed copy of the input CurveLoop.
Note that the thickness parameter for the overloaded CreateViaThicken() method must result in a curve which exceed Revit's short curve tolerance (Application.ShortCurveTolerance), otherwise an exception will be thrown.
CurveLoop.Transform() performs similarly to CreateViaTransform(), but it transforms the curves contained within the CurveLoop rather than creating a transformed copy.
CurveArray
This collection class represents an arbitrary collection of curves. Create it using its constructor.
CurveArrArray
This collection class is a collection of CurveArrays. When this is used, the organization of the sub-elements of this array have meaning for the method this is passed to; for example, in NewExtrusion() multiple CurveArrays should represent different closed loops.