InsertCurveKnot

Inserts a knot into a curve object.

Syntax

rhinoscriptsyntax.InsertCurveKnot (curve_id, parameter, symmetrical=False)

rhinoscript.curve.InsertCurveKnot (curve_id, parameter, symmetrical=False)

Parameters

curve_id

Required.  String or Guid.  The identifier of the curve object.

parameter

Required.  Number.  The parameter on the curve.

symmetrical

Optional.  Boolean.  If symmetrical = True, then knots are added on both sides of the center of the curve. The default value is False.

Returns

Boolean

True of False indicating success or failure.

None

On error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select curve for knot insertion", rs.filter.curve)

if obj:

    point = rs.GetPointOnCurve(obj, "Point on curve to add knot")

    if point:

        parameter = rs.CurveClosestPoint(obj, point)

        rs.InsertCurveKnot( obj, parameter )

Also See

CurveKnotCount

CurveKnots