Hi everyone,I know there is a “Rebuild” function in rhino that can reassign the edited surfaces to control points,

But in RhinoCommand I have tried,
_nurbssurface = surface.Rebuild(uDegree, vDegree, uPointCount, PointCount); doc.Objects.AddSurface(_nurbssurface);
It always shows me the deleted part.
Is there any other way to solve this problem to achieve my goal?
i am not sure i understand, are you scripting something? in any case there should be a Retrim
option, in the command and hopefully also for scripting it. and by the way its cut, cut cut
not cutted.
I guess you’re looking for Brep.CreateTrimmedSurface:
import Rhino
from scriptcontext import doc
def RebuildTrimmedSrf():
filter = Rhino.DocObjects.ObjectType.Surface
rc, objref = Rhino.Input.RhinoGet.GetOneObject("Select surface to rebuild", False, filter)
if not objref or rc != Rhino.Commands.Result.Success: return rc
brep = objref.Brep()
if not brep: return Rhino.Commands.Result.Failure
face = brep.Faces[0];
rebuilt = face.ToNurbsSurface().Rebuild(3, 3, 10, 10)
rebuilt = Rhino.Geometry.Brep.CreateTrimmedSurface(face, rebuilt, 0.01)
doc.Objects.AddBrep(rebuilt)
doc.Views.Redraw()
return Rhino.Commands.Result.Success
if __name__=="__main__":
RebuildTrimmedSrf()
RebuildTrimmedSrf.py (677 Bytes)