CurveKnots

Returns the knots, or knot vector, of a curve object.

Syntax

rhinoscriptsyntax.CurveKnots (curve_id, segment_index=-1)

rhinoscript.curve.CurveKnots (curve_id, segment_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

List

The knot values of the curve  if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select a curve")

if rs.IsCurve(obj):

    knots = rs.CurveKnots(obj)

    if knots:

        for knot in knots: print "Curve knot value:", knot

Also See

CurveKnotCount

IsCurve