Edit control points by rhino common

Hi guys, I have some problems when I want to edit curve’s control points by python.

I search ‘control point’ or ‘grips’ in rhino common API, and I found one property called ‘GripsOn’, but that is in Rhino.DosObjects. I apply this to the curve I generated by Rhino.Geometry, it will report error and ask for a RhinoObject. I am confused about these now, what’s differennt of those namespaces? Which one I should choose? And how I can edit the control point of a curve of surface?

I don’t know with python, but with c# it’s like this:

This moves the first point of a nurbs curve by +10 in Y:

private void RunScript(Curve C, ref object A)
    Rhino.Geometry.NurbsCurve NC = C.ToNurbsCurve();
    int i = 0;
    NC.Points.SetPoint(i, NC.Points[i].Location + new Rhino.Geometry.Vector3d(0, 10, 0));
    A = NC;

Here’s a Python script I helped somebody esle with some time ago that might be helpful to you, too: