CurveWeights

Returns a list of weight values that are assigned to the control points of a curve.

Syntax

rhinoscriptsyntax.CurveWeights (curve_id, segment_index=-1)

rhinoscript.curve.CurveWeights (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 weight 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):

    weights = rs.CurveWeights(obj)

    if weights:

        for weight in weights:

            print "Curve control point weight value:", weight

Also See

CurveKnots

CurvePoint

IsCurve