diff --git a/src/ModelingAlgorithms/TKBO/BOPTools/BOPTools_AlgoTools.cxx b/src/ModelingAlgorithms/TKBO/BOPTools/BOPTools_AlgoTools.cxx index f708a5d2d9..e6e3bb5dfa 100644 --- a/src/ModelingAlgorithms/TKBO/BOPTools/BOPTools_AlgoTools.cxx +++ b/src/ModelingAlgorithms/TKBO/BOPTools/BOPTools_AlgoTools.cxx @@ -1072,6 +1072,14 @@ bool BOPTools_AlgoTools::GetFaceOff(const TopoDS_Edge& th { aAngle = aTwoPI; } + else if (!bIsComputed) + { + // Near-zero angle between different faces where the bi-normal direction could not be + // reliably computed (near-degenerate geometry, e.g. very thin face producing + // nearly-coincident intersection curves). Treat as maximum angle (2*PI) to prevent + // incorrect selection of this unreliable face over a proper closing face. + aAngle = aTwoPI; + } } // if (std::abs(aAngle) < anAngleCriteria || std::abs(aAngle - aAngleMin) < anAngleCriteria)