It's not that simple: OCC thinks it can do the fillet. It's trying to do the fillet. And it's segfaulting because a chunk of memory that it assumes its earlier self initialized, it actually didn't. We can't "catch" something, etc., the OS is killing us because we're accessing memory that's not ours.
Now, knowing what the failure mechanism is, we could write some kind of stupid-looking test like:
Code: Select all
auto faces = getFacesForEdge(myEdgeToFillet);
OCC::Edge newEdge;
OCC::cherche_edge1(faces[0],faces[1], newEdge);
if (newEdge != myEdgeToFillet) {
throw ("Something bad has happened");
}
(If anyone else is looking at this, I'm at line 1969 of opencascade-7.5.0\src\ChFi3d\ChFi3d_Builder_C1.cxx -- that call to cherche_edge1 is not actually finding a shared edge between the two faces, but OCC never checks that)