Brep.Trim() failure

Hi ,

Can someone please let me know why this minimal-example trim is not returning a trimmed brep? The surfaces are coplanar, and the smaller cutter resides within the larger surface to be cut.
(There are reasons why I am not using python-rhinoscript TrimBrep() )

Thank you!


import  Rhino.Geometry as Geom
from    scriptcontext import doc

if __name__ == "__main__":

    nc = Geom.Circle( Geom.Point3d(0,0,0), 10. ).ToNurbsCurve()
    breps = Geom.Brep.CreatePlanarBreps( nc )
    plate_surf = breps[0]

    nc = Geom.Circle( Geom.Point3d(0,0,0), 5. ).ToNurbsCurve()
    breps = Geom.Brep.CreatePlanarBreps( nc )
    hole_surf = breps[0]

    breps = plate_surf.Trim( hole_surf, doc.ModelAbsoluteTolerance  )
    print( len(breps) )

Hi
The CreatePlanarBreps method can generate trimmed surfaces.

import  Rhino.Geometry as Geom
from    scriptcontext import doc

cvs = []
nc1 = Geom.Circle( Geom.Point3d(0,0,0), 10. ).ToNurbsCurve()
cvs.append(nc1)
nc2 = Geom.Circle( Geom.Point3d(0,0,0), 5. ).ToNurbsCurve()
cvs.append(nc2)

breps = Geom.Brep.CreatePlanarBreps(cvs)

doc.ActiveDoc.Objects.AddBrep(breps[0])
doc.ActiveDoc.Views.Redraw()

Naruto,
This is exactly what I needed. Many thanks for taking the time to respond.