Modify BrepFace the CV point position and keep trim

I have a trimmed single surface Brep. I converted it to NurbsSurface and modified (moved) the CV point position. What should I do to keep the trimmed state?
Can you give an example?

C++ or C#


Working with Breps can be complicated. If you haven’t I’d suggest you familiarize yourself with them more.

As for your problem you’re gonna wanna do something like this.

ON_Brep *pDuplicate = pOldBrep->Duplicate();

const ON_Surface *pOldSurface = pDuplicate->m_F[0].SurfaceOf();

ON_NurbsSurface oldSurface;

pDuplicate->RebuildTrimsForV2(pDuplicate->m_F[0], oldSurface);

int iNewSurfaceIndex = pDuplicate->AddSurface(pYourNewSurface);

pDuplicate->RebuildEdges(pDupBrep->m_F[0], RhinoApp().ActiveDoc()->AbsoluteTolerance() * 0.5, true, true);

HI @Joshua_Kennedy
Thank you very much!
I will study hard!