# SubDEdgeChain class

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md) · Since v8.36

```cs
public sealed class SubDEdgeChain : IDisposable
```

An ordered run of connected SubD edges.

Consecutive edges in a chain share a vertex, and each edge carries the direction it is traversed with, so the chain has a start and an end even when the individual edges do not agree on orientation. Chains are what commands like Bridge, Loft and edge sharpening operate on.

**Remarks:** A chain holds a reference to its SubD and does not keep it alive across edits that change the SubD topology; rebuild the chain after editing.

## Constructors

- [SubDEdgeChain](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/ctor.md): (2 overloads) Creates a chain containing a single starting edge. Grow it with [SubDEdgeChain.AddAllNeighbors(ChainDirection, SubDChainType)](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/addallneighbors.md) or [SubDEdgeChain.AddOneNeighbor(ChainDirection, SubDChainType)](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/addoneneighbor.md).

## Finalizer

- [~SubDEdgeChain](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/finalize.md): Finalizer.

## Properties

- [EdgeCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/edgecount.md): The number of edges in this chain.
- [Edges](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/edges.md): The edges of this chain, in order.
- [IsClosedLoop](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/isclosedloop.md): True when the chain closes back on itself.
- [ParentSubD](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/parentsubd.md): The SubD this chain runs through.

## Methods

- [AddAllNeighbors](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/addallneighbors.md): Extends the chain as far as it will go at one or both ends.
- [AddEdge](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/addedge.md): Adds an edge to whichever end of the chain it connects to.
- [AddOneNeighbor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/addoneneighbor.md): Extends the chain by one edge at one or both ends.
- [Begin](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/begin.md): Clears the chain and restarts it from a single edge.
- [Clear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/clear.md): Removes every edge from the chain.
- [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/dispose.md): Frees the unmanaged chain.
- [EdgeAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/edgeat.md): Gets the edge at the given position in the chain. The returned edge carries the direction the chain traverses it with, in [SubDComponent.ComponentDirection](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdcomponent/componentdirection.md).
- [IsConvexLoop](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/isconvexloop.md): True when the chain is a closed loop that is convex.
- [Reverse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/reverse.md): Reverses the direction of the chain.
- [SortEdgesIntoEdgeChains](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/sortedgesintoedgechains.md): (static) Sorts a set of edges into chains.
- [ToLoftCurve](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/toloftcurve.md): Gets a NURBS curve suitable for lofting SubDs, following this chain.
- [ToNurbsCurve](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/tonurbscurve.md): Gets a NURBS curve on the SubD surface following this chain.
- [TrimToRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/trimtorange.md): Trims the chain down to the run of edges between firstEdge and lastEdge, removing everything before firstEdge and everything after lastEdge.
- [VertexAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.subdedgechain/vertexat.md): Gets the vertex at the given position along the chain. A chain of N edges has N+1 vertices, or N when it is a closed loop.
