PolylineVertices

Returns the vertices of a polyline curve object.

Syntax

rhinoscriptsyntax.PolylineVertices (curve_id, index=-1)

rhinoscript.curve.PolylineVertices (curve_id, index=-1)

Parameters

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.

Returns

Array

An  array of Point3d vertex points if successful.

None

If not successful, or on error.

Example

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)

Also See

AddPolyline

IsPolyline