Returns the vertices of a polyline curve object.
rhinoscriptsyntax.PolylineVertices (curve_id, index=-1)
rhinoscript.curve.PolylineVertices (curve_id, index=-1)
curve_id |
Required. String or Guid. The object's identifier. |
segment_index |
Optional. Number. If curve_id identifies a polycurve object, then segment_index identifies the curve segment of the polycurve to query. |
Array |
An array of Point3d vertex points if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a polyline")
if rs.IsPolyline(obj):
points = rs.PolylineVertices(obj)
if points:
for point in points: rs.AddPoint(point)