Inserts a knot into a curve object.
rhinoscriptsyntax.InsertCurveKnot (curve_id, parameter, symmetrical=False)
rhinoscript.curve.InsertCurveKnot (curve_id, parameter, symmetrical=False)
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. |
Boolean |
True of False indicating success or failure. |
None |
On error. |
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 )