Polyline vertices in Rhino Common

Very well hidden - I am hopeless over here.

Can someone help me finding a method to get the list of vertices of a polyline. Or control points of a degree 2 crv?

Thank you :slight_smile:

What do you want to do with the list?
A Polyline is already a Point3dList, so you can iterate through it or access points at a particular index like a regular list.

You can also use ToArray() to convert it to an array of Point3d.

Got it. Thanks :slight_smile:

x = Polyline Curve
a = rh.Collections.Point3dList.ToArray(x.ToPolyline())

Or more simply:
a = x.ToArray();

yep.

a = x.ToPolyline().ToArray()

in this case