Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
The segments are represented by RebarShapeEdge objects. The segments are numbered starting with 0, and they have a direction; so the beginning of the shape is end 0 of segment 0, and the end of the shape is end 1 of segment (NumberOfSegments-1).
The ends and junctions are represented by RebarShapeVertex objects. The number of vertices is always one greater than the number of segments. The first vertex represents the start of the shape; the last vertex represents the end of the shape; and the intermediate vertices represent the bends between segments.