Moving grips of a surface creates a polysurface

Hi everybody,
I have tried to move some grips of a sphere with the code in this link https://developer.rhino3d.com/guides/cpp/moving-curve-and-surface-grips/. Sometimes the sphere turns into a polysurface and for this reason the points are switched off. If I try to do the same dragging the grips from the Rhino GUI the problem does not show up. Anyone knows how to prevent this?
Thanks
G.

Make sure that CreaseSplitting is disabled. Either set it with the command of that name, or use CRhinoKeepKinkySurfaces In you C++ code.

https://developer.rhino3d.com/api/cpp/class_c_rhino_keep_kinky_surfaces.html