Invalid Brep & Surface in Grasshopper

Hi David,

It would be super amazing if the “Invalid Brep/Surface” could be fixed in the next Grasshopper version.

Many thanks in advance :slight_smile:

1 Like

We can’t fix it unless you tell us how you made an invalid brep. What component generated it? What were the inputs?

It was made by trimming surfaces (formed from big spheres) with smaller spheres (added by generating points over the surfaces).
The result was a surface (formed from a part of a sphere), with circular holes in it (resulted from the smaller spheres).

There were many surfaces, and most of them were okay, yet when the number of the small spheres would increase, some of the resultants would become invalid.

This was then solved by using brep/brep intersect (to get the circular curves), then trimming the big spheres with the resultant circular intersections, which gave better results without “invalid surfaces”. This latter solution was okay, yet it took much more time to execute, and the definition extremely slow and not responsive.

Although I have found rather a slow solution to that, this may occur in other instances, giving “invalid breps/surfaces”.

1 Like

Can you upload the gh file so I can repeat the problem?

Ok, I don|t have the file currently. Will upload it in few days.

Invalid_Srf.3dm (749.7 KB) (84.1 KB)
Hi David,

So, I have attached here the files. Since it is office work, I have internalized the invalid surface and baked the edges in a layer so that you find it (as it is far from the origin).

Basically, this is the result of solid difference of many spheres (the main big surface), then trimming with smaller spheres.

I have solved this by using the intersection curves and then trimming the surface with the curves-instead of with spheres, and it worked out fine. However, this solution proved to be extremely slow, taking hours to respond every time I make a single change.

I hoped not to have “invalid” surfaces/breps in the first place.

In any case, kindly take a look.


Hello, I came across an invalid brep while converting a mesh into brep using BullAnt “Mesh to Brep” component, does anyone know how to fix it?

This topic is a few years old and was revived. I looked at the file and saw you’re remapping values to a domain from 0.0 to 0.4. What sort of sphere do you expect with a radius of 0.0?

The radius domain isn’t the main problem here. The edges of spheres can cause problematic intersections due to their edge curve. Mostly when the edge is maybe just touching and not intersecting nicely. A cylinder, on the other hand, has a clean intersection with the surface. Trimming with the cylinders is succesful here and takes a fraction of the time compared to trimming with spheres.

Therefore I would suggest trimming with oriented cylinders instead of spheres.

Now capping cylinders with radii in the target domain of 0.0 to 0.4 fails for some instances, which is no surprise. Luckily it is not a problem for the trimming of the surface however because it creates a null item in the list.

Nothing to fix for McNeel. (86.3 KB)

I had Invalid Brep from a defintion and the way I fixed it was changing the absolute tolerance on the units configuration and matching with decimals of milimeters which Rhino could not recognize before. That fixed my issue.

1 Like

Thanks for the tip which solved this issue I encountered, too, that puzzled me for quite a while. I owe you a cup of coffee, to say the least.

I get an invalid brep when sending floor geometry from Revit to Rhino. Since the floor is projected onto the topography, there could have issues. But how should I get a healthy brep :face_with_peeking_eye:

Hi C Zou, Can you create a new post in the Rhino.Inside.Revit forum category with this question as well as the geometry you are trying to work with? Thanks.

1 Like