# Polyline 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)

```cs
[Serializable]
public class Polyline : Point3dList, ICloneable
```

Represents an ordered set of points connected by linear segments.

Polylines are closed if start and end points coincide.

## Constructors

- [Polyline](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/ctor.md): (3 overloads) Initializes a new empty polyline.

## Properties

- [IsClosed](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/isclosed.md): Test a polyline to see if it is closed.
- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/isvalid.md): Gets a value that indicates whether this polyline is valid. Valid polylines have at least one segment, no Invalid points and no zero length segments. Closed polylines with only two segments are also not considered valid.
- [Length](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/length.md): Gets the total length of the polyline.
- [SegmentCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/segmentcount.md): Gets the number of segments for this polyline.

## Methods

- [BreakAtAngles](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/breakatangles.md): Breaks this polyline into sections at sharp kinks. Closed polylines will also be broken at the first and last vertex.
- [CenterPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/centerpoint.md): Compute the center point of the polyline as the weighted average of all segments.
- [ClosestParameter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/closestparameter.md): Gets the parameter along the polyline which is closest to a test-point.
- [ClosestPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/closestpoint.md): Gets the point on the polyline which is closest to a test-point.
- [CollapseShortSegments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/collapseshortsegments.md): Collapses all segments until none are shorter than tolerance. This function is significantly slower than DeleteShortSegments, since it recursively operates on the shortest segment. When a segment is collapsed the end-points are placed in the center of the segment.
- [CreateByJoiningLines](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/createbyjoininglines.md): (static) Creates polylines by joining lines.
- [CreateCircumscribedPolygon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/createcircumscribedpolygon.md): (static) Create a regular polygon circumscribe about a circle. The midpoints of the polygon's edges will be tangent to the circle.
- [CreateInscribedPolygon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/createinscribedpolygon.md): (static) Create a regular polygon inscribed in a circle. The vertices of the polygon will be on the circle.
- [CreateStarPolygon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/createstarpolygon.md): (static) Create a regular star polygon. The star begins at circle.PointAt(0) and the vertices alternate between being on circle and begin on a concentric circle of other_radius.
- [DeleteShortSegments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/deleteshortsegments.md): Removes all points that are closer than tolerance to the previous point. Start and end points are left intact.
- [Duplicate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/duplicate.md): Returns a deep copy of this polyline instance.
- [GetSegments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/getsegments.md): Constructs an array of line segments that make up the entire polyline.
- [IsClosedWithinTolerance](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/isclosedwithintolerance.md): Test a polyline to see if it is closed.
- [IsConvexLoop](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/isconvexloop.md): Determines if a polyline is convex.
- [MergeColinearSegments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/mergecolinearsegments.md): Merge co-linear consecutive segments in a polyline. This method will automatically remove any zero-length segments as well.
- [PointAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/pointat.md): Gets the point on the polyline at the given parameter. The integer part of the parameter indicates the index of the segment.
- [ReduceSegments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/reducesegments.md): Constructs a reduction of this polyline by recursively removing the least significant segments.
- [RemoveNearlyEqualSubsequentPoints](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/removenearlyequalsubsequentpoints.md): Removes one copy of a point that is equal to the previous or later point, by an absolute tolerance factor.
- [SegmentAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/segmentat.md): Gets the line segment at the given index.
- [Smooth](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/smooth.md): Smoothen the polyline segments by averaging adjacent vertices. Smoothing requires a polyline with exclusively valid vertices.
- [ICloneable.Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/system-icloneable-clone.md)
- [TangentAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/tangentat.md): Gets the unit tangent vector along the polyline at the given parameter. The integer part of the parameter indicates the index of the segment.
- [ToNurbsCurve](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/tonurbscurve.md): Constructs a nurbs curve representation of this polyline.
- [ToPolylineCurve](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/topolylinecurve.md): Constructs a polyline curve representation of this polyline.
- [TriangulateClosedPolyline](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/triangulateclosedpolyline.md): Attempts to create a list of triangles which represent a triangulation of a closed polyline
- [Trim](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.polyline/trim.md): Constructs a polyline out of a parameter sub-domain in this curve.

## Inherited Members

- From [Point3dList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist.md): [BoundingBox](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/boundingbox.md), [X](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/x.md), [Y](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/y.md), [Z](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/z.md), [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/add.md), [ClosestIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/closestindex.md), [Equals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/equals.md), [GetHashCode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/gethashcode.md), [SetAllX](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/setallx.md), [SetAllY](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/setally.md), [SetAllZ](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/setallz.md), [Transform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist/transform.md)
- From [RhinoList<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1.md): [Capacity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/capacity.md), [Count](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/count.md), [First](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/first.md), [Last](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/last.md), [NullCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/nullcount.md), [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/item.md), [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/add.md), [AddRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/addrange.md), [AsReadOnly](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/asreadonly.md), [BinarySearch](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/binarysearch.md), [Clear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/clear.md), [Contains](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/contains.md), [ConvertAll<TOutput>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/convertall.md), [CopyTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/copyto.md), [Exists](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/exists.md), [Find](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/find.md), [FindAll](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/findall.md), [FindIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/findindex.md), [FindLast](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/findlast.md), [FindLastIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/findlastindex.md), [ForEach](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/foreach.md), [GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/getenumerator.md), [GetRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/getrange.md), [IndexOf](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/indexof.md), [Insert](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/insert.md), [InsertRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/insertrange.md), [LastIndexOf](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/lastindexof.md), [RemapIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/remapindex.md), [Remove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/remove.md), [RemoveAll](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/removeall.md), [RemoveAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/removeat.md), [RemoveNulls](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/removenulls.md), [RemoveRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/removerange.md), [Reverse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/reverse.md), [Sort](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/sort.md), [ToArray](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/toarray.md), [TrimExcess](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/trimexcess.md), [TrueForAll](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/trueforall.md)
