Curve's point


#1

How do I select points on a curve using commands?

thanks in advance.


(NARUTO) #2

HI dafemoelche
This is what you want it?

import rhinoscriptsyntax as rs
import Rhino.Geometry as rg
import scriptcontext as sc
curve = rs.GetObject("Select curve",rs.filter.curve)
if curve:
    new_curve = rs.coercecurve(curve)
    new_curve.Domain = rg.Interval(0,1)
    pt = new_curve.PointAt(0.5)
    sc.doc.Objects.AddPoint(pt)
    sc.doc.Views.Redraw()