# Surface intersection between brep and surface

Hello everyone.

I am trying to obtain the surface intersection which results from the operation bewteen a surface and a brep. I have tried many Grasshopper options but all of them returns me breps, curves… All unless a surface.

I hope somebody of you can help me.
SurfaceIntersection.gh (816.8 KB)

Best regards!

That may be because a brep isn’t a surface? (object model wise- its a set of surfaces joined together)

A brep face is a surface though.

Do you have one face you’d like to cut or one face you’d like to look at afterward?

I don’t know! Could you upload the .gh file?

I don’t want to cut one face with the surface. I want to cut the entire brep with the surface and obtain the intersection surface as a result.

Is the result a single intersection surface?

If so, you can extract it.

If not, then the result is a polysurface, which is where Rhino stuck the data and called it a brep.

I looked at this earlier today… The intersections (plural) between your list of seven breps and the surface (BBX) is a list of curves. You can use those curves to split the surface (SrfSplit). But in this case, the breps are so irregular that the intersection curves are very poorly formed and in some cases, broken leaving gaps. With that particular geometry, the process fails in many ways.

P.S. It’s a mess!

SurfaceIntersection_2023Dec4a.gh (832.7 KB)

Here is an effective little trick using Connect Crvs. The green group and green surface fragment is what you’re looking for, eh?

SurfaceIntersection_2023Dec4b.gh (834.8 KB)

Yikes!

Anyway:

BrepFace_SplitWithBrep_Simple_V1B.gh (387.4 KB)

BTW: You can use the native thing included (Split) and compare results.

In case that you want an in depth explanation (what is a Surface, what is a BrepFace, what this (and that) etc etc) notify. Plus how the inside/outside option works in the attached C# (if is active: in relation with the “solid state” of cutters).

Note: no extensive tests are included (for the validity of the Brep/Cutters etc etc. This means that the C# MAY become red if you input bananas). Plus - as it is - no Brep List is supported.

Here’s a simplified demo “similar” with your task (where cutters are solid Breps [in order to activate the inside/outside option] out of closed Curves):

It doesn’t solve my problem. I want to obtain only the intersection surface, not all of them.

The List Item in the green group is what you want

Pull up your socks! (step up your GH game) Ignore or delete the ColorJa component.

Notice that I don’t want only the ‘0’ item, there are more surface to get.

I have no idea what you are talking about. Goodbye.

With `List Item` you are extracting only the first element of the list. The original brep has more than one element (it is a list), so the result must be as surfaces as breps intersect the original surface.

Regards