Clean up a BREP with tiny edges and self intersection

Hi all! I was wondering if there any way to clean up a brep which has tiny edges and/or self intersections like these? In rhino i would Dup Border > Select the points that need to be culled > Delete > make a planar surface to get a clean BREP. How would I approach this in grasshopper? Is there any ‘Clean BREP With tolerance and self intersection’ component?



There is no special component to do this. But you can deconstruct the brep and filter faces which are smaller than a certain threshold and / or intersecting pairs. And then try to join the remaining surfaces…

Hi Martin

Your solution helps in eliminating self intersections. However, the super tiny BREP region on the right side doesnt actually self intersect. Here is a image that’s extremely zoomed in. How would I cut off these small extrusions?



Is this a 2D planar surface / polysurface or does it actually have a thickness?

There are various ways to rebuild the outlines.

It is a 2D Planar Surface with only 1 face

Since GH doesn’t recognize which details are undesired, we must specify our own rules to determine which part of the brep need to be “cleaned up”.

An example file might help people to better help you, but by looking at the images, I’d try offsetting the border inwards to force certain details to self-intersect or even disappear, from there you can do ‘boundary srf’ or similar methods to separate the main srf from the small craps, then offset outwards to its original border.

1 Like

:rotating_light:

Thank you so much, this worked for me! Apologies for not attaching the file initially. Have attached the solution in case anyone requires in the future.
brep_repair.gh (26.4 KB)

1 Like