When split brep fails, what to use to split and Untrimmed Surface?

So I’m trying to split an untrimmed surface with a plane, I created a Plane Srf and use it on the Split Brep. Sometimes this fails and the surfaces doesn’t split which kills everything else down the line.

Is there anything more stable to Split/Trim a surface with a plane?

I tried in python but didn’t had much luck

Rhino.Geometry.Brep.Split(B,C,0.001)

Split fails, returns nothing.

Rhino.Geometry.Surface.Split(

Needs a parameter as a float, but I can’t find any information about parameters and how to get it.

Rhino.Geometry.BrepFace.Split(

which uses a curve to trim, but I can’t convert a surface into a brepface

Rhino.Geometry.Surface.Trim(

How do I get the U V intervals of the plane, and will it work if the plane is not in the direction of the U V of the surface?

Any help would be great.
Thank you

Maybe something like this:

import Rhino.Geometry as rg

brp = rg.Surface.ToBrep(srf)
brpf = brp.Faces[0]
crv = rg.Intersect.Intersection.BrepPlane(brp,pl,0.001)[1][0]
sbrp = rg.BrepFace.Split(brpf, [crv],0.001)
a = [i for i in sbrp.Faces]

Where srf is your surface, and pl is the plane.

1 Like

this worked great.

is the brepface method the most reliable to split a surface?

Are you aware of the Plane Through Shape component? ‘Surface | Primitive | Plane Through Shape’.

So many threads this morning without GH code and/or geometry… :man_facepalming: