Brep and Plane Intersection Python

@stevebaer Hey could you show me the answered in this old python forum. I looking for a way to do a plane and brep intesection but don’t see a function under the python help. It’s funny google is still searching the old forums.

Sure. You can do this by creating a temporary planar surface and intersecting that with your brep

import rhinoscriptsyntax as rs
brep1 = rs.GetObject("Select the first brep", rs.filter.surface | rs.filter.polysurface)
if brep1:
    pl = rs.PlaneFromPoints((-500,-500,0), (0,-500,0), (-500,0,0))
    planesrf = rs.AddPlaneSurface(pl, 1000, 1000)
    curves = rs.IntersectBreps( brep1, planesrf)
    rs.DeleteObject(planesrf)
    rs.SelectObjects(curves)
1 Like

Thanks. I see how to do it now.

A post was split to a new topic: Convert rhinoscriptsyntax to Grasshopper