# Exclude a surface from a result of Solid difference

Hello! This is my first time using Grasshopper, maybe this algorythm could be made in a more simple way, but well, I’m trying to learn writting it… I have doubt, I would like to know how can I exclude a surface or any kind of geometry of a result; in this case, from: Solid difference.

I attached a screenshot where you can see the surfaces in rhino, and I would like to exclude one of them (because, later I’ll use those surface to do a split, but one of them must stay original)

Well …

1. First ALWAYS attach something IF your issue is not an abstract one (like: I want to divide by zero: any ideas ?). That said a screenshot means nothing.
2. Second solid ops should being related with PolySurfaces (i.e. closed Breps) meaning that the result (if not null or invalid) would be some kind of closed Brep as well. So … your question is how to locate/query some BrepFace(s) from the result? (you need some very specific rules for that, you know). Or the question is related with splitting/trimming BrepFaces?
1 Like

Actually, the “Solid difference” result is those three surfaces in the first screenshot, but I would like to exclude one or more of them if I would like to do that…

I know the component at that point contains the information about those three surfaces, but I would like to say it in some way “ignore surface number 1 and work with 2 and 3.”

Well … while still no case posted:

1. These rings of yours are not surfaces: they are BrepFaces. A BF face is a surface with trim info. That said a “solid” is a collection of stitched BF’s
2. BrepFaces may contain inner loops (holes) and for sure an outer loop (as Curves). If they contain holes no “solid” is possible (some topology that could yield volume).
3. So one out of many filtering options could be to query the loops for, say, a point containment (a ccx event maybe).
4. Another (case planar stuff) could be to use the normal for some sort of “orientation” sort.

The orthodox way to deal with similar queries is to create a custom type class (containing info related with BrepFaces: ID, planarity, loops, orientation, area, ccx events, connectivity … you name it ) and then do classic LINQ stuff on the resulting List.

For instance: Find all the BrepFaces that are connected with 4 other faces where 2 of them are planar and 2 not and their area is > this and < that.

Or: Find all the BrepFaces that have 3 holes and are not planar.

That said what type of info to include in the class … is 100% case specific.

An example: locating “same” Breps: