Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4148

Brep.Trim() failure

$
0
0

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) )

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4148

Trending Articles