ConvertToBeziers command in Grasshopper

I would like to access Rhino’s ‘ConvertToBeziers’ command from Grasshopper and get all the consecutive Bezier Spans from a NURBS curve in a list? Any suggestions?

Thank you, that should clearly do the job. Can some body point me to an example how to use a Rhino Command within C#/VB withing Grasshopper or set me up an scripting component with “CreateBeziers”

private void RunScript(Curve C, ref object B)
    BezierCurve[] bzCrvs = BezierCurve.CreateBeziers(C);
    NurbsCurve[] bzNurbs = new NurbsCurve[bzCrvs.Length];

    for (int i = 0; i < bzCrvs.Length; i++)
      bzNurbs[i] = bzCrvs[i].ToNurbsCurve();

    B = bzNurbs;
  } (3.9 KB)

1 Like

Thank you Michael!