Analyse and repair self intersecting edge of brep object

Dear all,

I am working with multiple brep objects that have been generated by a rhino or grasshopper script. For some objects the edges have been “extended” to long so that the corner of the object is now self-intersecting. This creates a strange corner, making problems in the further production:

Since there are many of these objects, I would like analyses and repair the corner by an python script. Can you give me some advice how ta approach this matter?

Falsecorner.3dm (124.4 KB)

Best Peter

Do you have access to the generating script code? The solution may lie there.

Unfortunately, I don’t have, also the person who did this work isn’t working any more. I am trying to use Rhinocommon for this problem, but with little success. Still I am not certain if there is a way to edit sub elements of breps, but I found some examples on how to move or duplicate edges.**

Hi Peter,
I would try something as following with regular grasshopper components: find the top most and bottom most brep face. Take its outer edge crvs. Find their self intersection points and split the curves at those places. Cull all the small curve segments, and rejoin the longer ones. This will provide a clean closed crvs for top and bottom brep faces. Loft them, then cap.

Hi Peter,

In addition to what @djordje suggested , if the faces are planar, the bordercurves can be split in separate regions with CurveBoolean functionality. I suppose you could filter the result to get only he largest as the new outline and rebuild the brep by extruding that.

-Willem

1 Like

Dear all,

thank you for your advice. I think I am following now the path to fix the self-intersection of the edge curves and to rebuild the brep from scratch. I still wonder if the Rhinocommon would give more possibilities to “repair” the brep directly instead of rebuilding it. Although I have been working with python scripts for quite a while, I don’t really understand how Rhino is structured on the Rhinocommon level.

Best Peter

Hi Peter,

Just ask for help here if you run into (specific) problems!

-Willem

also FWIW: